diff --git a/.gitignore b/.gitignore
index 42cb8635..0da665fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ dist/
.mypy_cache/
__pycache__/
poetry.toml
+.ruff_cache/
diff --git a/poetry.lock b/poetry.lock
index a3b66c9a..f43ded46 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -16,13 +16,13 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""}
[[package]]
name = "anyio"
-version = "4.4.0"
+version = "4.5.0"
description = "High level compatibility layer for multiple asynchronous event loop implementations"
optional = false
python-versions = ">=3.8"
files = [
- {file = "anyio-4.4.0-py3-none-any.whl", hash = "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7"},
- {file = "anyio-4.4.0.tar.gz", hash = "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94"},
+ {file = "anyio-4.5.0-py3-none-any.whl", hash = "sha256:fdeb095b7cc5a5563175eedd926ec4ae55413bb4be5770c424af0ba46ccb4a78"},
+ {file = "anyio-4.5.0.tar.gz", hash = "sha256:c5a275fe5ca0afd788001f58fca1e69e29ce706d746e317d660e21f70c530ef9"},
]
[package.dependencies]
@@ -32,19 +32,19 @@ sniffio = ">=1.1"
typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""}
[package.extras]
-doc = ["Sphinx (>=7)", "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.17)"]
-trio = ["trio (>=0.23)"]
+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)"]
+trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2024.7.4"
+version = "2024.8.30"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.6"
files = [
- {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"},
- {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"},
+ {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"},
+ {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"},
]
[[package]]
@@ -106,13 +106,13 @@ trio = ["trio (>=0.22.0,<0.26.0)"]
[[package]]
name = "httpx"
-version = "0.27.0"
+version = "0.27.2"
description = "The next generation HTTP client."
optional = false
python-versions = ">=3.8"
files = [
- {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"},
- {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"},
+ {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"},
+ {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"},
]
[package.dependencies]
@@ -127,18 +127,22 @@ brotli = ["brotli", "brotlicffi"]
cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"]
http2 = ["h2 (>=3,<5)"]
socks = ["socksio (==1.*)"]
+zstd = ["zstandard (>=0.18.0)"]
[[package]]
name = "idna"
-version = "3.7"
+version = "3.10"
description = "Internationalized Domain Names in Applications (IDNA)"
optional = false
-python-versions = ">=3.5"
+python-versions = ">=3.6"
files = [
- {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"},
- {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"},
+ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"},
+ {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"},
]
+[package.extras]
+all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"]
+
[[package]]
name = "iniconfig"
version = "2.0.0"
@@ -235,18 +239,18 @@ testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "pydantic"
-version = "2.8.2"
+version = "2.9.2"
description = "Data validation using Python type hints"
optional = false
python-versions = ">=3.8"
files = [
- {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"},
- {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"},
+ {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"},
+ {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"},
]
[package.dependencies]
-annotated-types = ">=0.4.0"
-pydantic-core = "2.20.1"
+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\""},
@@ -254,103 +258,104 @@ typing-extensions = [
[package.extras]
email = ["email-validator (>=2.0.0)"]
+timezone = ["tzdata"]
[[package]]
name = "pydantic-core"
-version = "2.20.1"
+version = "2.23.4"
description = "Core functionality for Pydantic validation and serialization"
optional = false
python-versions = ">=3.8"
files = [
- {file = "pydantic_core-2.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3acae97ffd19bf091c72df4d726d552c473f3576409b2a7ca36b2f535ffff4a3"},
- {file = "pydantic_core-2.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41f4c96227a67a013e7de5ff8f20fb496ce573893b7f4f2707d065907bffdbd6"},
- {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f239eb799a2081495ea659d8d4a43a8f42cd1fe9ff2e7e436295c38a10c286a"},
- {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53e431da3fc53360db73eedf6f7124d1076e1b4ee4276b36fb25514544ceb4a3"},
- {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1f62b2413c3a0e846c3b838b2ecd6c7a19ec6793b2a522745b0869e37ab5bc1"},
- {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d41e6daee2813ecceea8eda38062d69e280b39df793f5a942fa515b8ed67953"},
- {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d482efec8b7dc6bfaedc0f166b2ce349df0011f5d2f1f25537ced4cfc34fd98"},
- {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e93e1a4b4b33daed65d781a57a522ff153dcf748dee70b40c7258c5861e1768a"},
- {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7c4ea22b6739b162c9ecaaa41d718dfad48a244909fe7ef4b54c0b530effc5a"},
- {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4f2790949cf385d985a31984907fecb3896999329103df4e4983a4a41e13e840"},
- {file = "pydantic_core-2.20.1-cp310-none-win32.whl", hash = "sha256:5e999ba8dd90e93d57410c5e67ebb67ffcaadcea0ad973240fdfd3a135506250"},
- {file = "pydantic_core-2.20.1-cp310-none-win_amd64.whl", hash = "sha256:512ecfbefef6dac7bc5eaaf46177b2de58cdf7acac8793fe033b24ece0b9566c"},
- {file = "pydantic_core-2.20.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d2a8fa9d6d6f891f3deec72f5cc668e6f66b188ab14bb1ab52422fe8e644f312"},
- {file = "pydantic_core-2.20.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:175873691124f3d0da55aeea1d90660a6ea7a3cfea137c38afa0a5ffabe37b88"},
- {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37eee5b638f0e0dcd18d21f59b679686bbd18917b87db0193ae36f9c23c355fc"},
- {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25e9185e2d06c16ee438ed39bf62935ec436474a6ac4f9358524220f1b236e43"},
- {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:150906b40ff188a3260cbee25380e7494ee85048584998c1e66df0c7a11c17a6"},
- {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ad4aeb3e9a97286573c03df758fc7627aecdd02f1da04516a86dc159bf70121"},
- {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3f3ed29cd9f978c604708511a1f9c2fdcb6c38b9aae36a51905b8811ee5cbf1"},
- {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0dae11d8f5ded51699c74d9548dcc5938e0804cc8298ec0aa0da95c21fff57b"},
- {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:faa6b09ee09433b87992fb5a2859efd1c264ddc37280d2dd5db502126d0e7f27"},
- {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9dc1b507c12eb0481d071f3c1808f0529ad41dc415d0ca11f7ebfc666e66a18b"},
- {file = "pydantic_core-2.20.1-cp311-none-win32.whl", hash = "sha256:fa2fddcb7107e0d1808086ca306dcade7df60a13a6c347a7acf1ec139aa6789a"},
- {file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"},
- {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"},
- {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"},
- {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"},
- {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"},
- {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"},
- {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"},
- {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"},
- {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"},
- {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"},
- {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"},
- {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"},
- {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"},
- {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"},
- {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"},
- {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"},
- {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"},
- {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"},
- {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"},
- {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"},
- {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"},
- {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"},
- {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"},
- {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"},
- {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"},
- {file = "pydantic_core-2.20.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:4745f4ac52cc6686390c40eaa01d48b18997cb130833154801a442323cc78f91"},
- {file = "pydantic_core-2.20.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8ad4c766d3f33ba8fd692f9aa297c9058970530a32c728a2c4bfd2616d3358b"},
- {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41e81317dd6a0127cabce83c0c9c3fbecceae981c8391e6f1dec88a77c8a569a"},
- {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f"},
- {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaad4ff2de1c3823fddf82f41121bdf453d922e9a238642b1dedb33c4e4f98ad"},
- {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ab812fa0c845df815e506be30337e2df27e88399b985d0bb4e3ecfe72df31c"},
- {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5ebac750d9d5f2706654c638c041635c385596caf68f81342011ddfa1e5598"},
- {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2aafc5a503855ea5885559eae883978c9b6d8c8993d67766ee73d82e841300dd"},
- {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4868f6bd7c9d98904b748a2653031fc9c2f85b6237009d475b1008bfaeb0a5aa"},
- {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa2f457b4af386254372dfa78a2eda2563680d982422641a85f271c859df1987"},
- {file = "pydantic_core-2.20.1-cp38-none-win32.whl", hash = "sha256:225b67a1f6d602de0ce7f6c1c3ae89a4aa25d3de9be857999e9124f15dab486a"},
- {file = "pydantic_core-2.20.1-cp38-none-win_amd64.whl", hash = "sha256:6b507132dcfc0dea440cce23ee2182c0ce7aba7054576efc65634f080dbe9434"},
- {file = "pydantic_core-2.20.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b03f7941783b4c4a26051846dea594628b38f6940a2fdc0df00b221aed39314c"},
- {file = "pydantic_core-2.20.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1eedfeb6089ed3fad42e81a67755846ad4dcc14d73698c120a82e4ccf0f1f9f6"},
- {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:635fee4e041ab9c479e31edda27fcf966ea9614fff1317e280d99eb3e5ab6fe2"},
- {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:77bf3ac639c1ff567ae3b47f8d4cc3dc20f9966a2a6dd2311dcc055d3d04fb8a"},
- {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ed1b0132f24beeec5a78b67d9388656d03e6a7c837394f99257e2d55b461611"},
- {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6514f963b023aeee506678a1cf821fe31159b925c4b76fe2afa94cc70b3222b"},
- {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d4204d8ca33146e761c79f83cc861df20e7ae9f6487ca290a97702daf56006"},
- {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d036c7187b9422ae5b262badb87a20a49eb6c5238b2004e96d4da1231badef1"},
- {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ebfef07dbe1d93efb94b4700f2d278494e9162565a54f124c404a5656d7ff09"},
- {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6b9d9bb600328a1ce523ab4f454859e9d439150abb0906c5a1983c146580ebab"},
- {file = "pydantic_core-2.20.1-cp39-none-win32.whl", hash = "sha256:784c1214cb6dd1e3b15dd8b91b9a53852aed16671cc3fbe4786f4f1db07089e2"},
- {file = "pydantic_core-2.20.1-cp39-none-win_amd64.whl", hash = "sha256:d2fe69c5434391727efa54b47a1e7986bb0186e72a41b203df8f5b0a19a4f669"},
- {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a45f84b09ac9c3d35dfcf6a27fd0634d30d183205230a0ebe8373a0e8cfa0906"},
- {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d02a72df14dfdbaf228424573a07af10637bd490f0901cee872c4f434a735b94"},
- {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2b27e6af28f07e2f195552b37d7d66b150adbaa39a6d327766ffd695799780f"},
- {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084659fac3c83fd674596612aeff6041a18402f1e1bc19ca39e417d554468482"},
- {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:242b8feb3c493ab78be289c034a1f659e8826e2233786e36f2893a950a719bb6"},
- {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:38cf1c40a921d05c5edc61a785c0ddb4bed67827069f535d794ce6bcded919fc"},
- {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e0bbdd76ce9aa5d4209d65f2b27fc6e5ef1312ae6c5333c26db3f5ade53a1e99"},
- {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:254ec27fdb5b1ee60684f91683be95e5133c994cc54e86a0b0963afa25c8f8a6"},
- {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:407653af5617f0757261ae249d3fba09504d7a71ab36ac057c938572d1bc9331"},
- {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c693e916709c2465b02ca0ad7b387c4f8423d1db7b4649c551f27a529181c5ad"},
- {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b5ff4911aea936a47d9376fd3ab17e970cc543d1b68921886e7f64bd28308d1"},
- {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177f55a886d74f1808763976ac4efd29b7ed15c69f4d838bbd74d9d09cf6fa86"},
- {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:964faa8a861d2664f0c7ab0c181af0bea66098b1919439815ca8803ef136fc4e"},
- {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4dd484681c15e6b9a977c785a345d3e378d72678fd5f1f3c0509608da24f2ac0"},
- {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f6d6cff3538391e8486a431569b77921adfcdef14eb18fbf19b7c0a5294d4e6a"},
- {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6d511cc297ff0883bc3708b465ff82d7560193169a8b93260f74ecb0a5e08a7"},
- {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"},
+ {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"},
]
[package.dependencies]
@@ -410,6 +415,33 @@ files = [
[package.dependencies]
six = ">=1.5"
+[[package]]
+name = "ruff"
+version = "0.5.7"
+description = "An extremely fast Python linter and code formatter, written in Rust."
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "ruff-0.5.7-py3-none-linux_armv6l.whl", hash = "sha256:548992d342fc404ee2e15a242cdbea4f8e39a52f2e7752d0e4cbe88d2d2f416a"},
+ {file = "ruff-0.5.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:00cc8872331055ee017c4f1071a8a31ca0809ccc0657da1d154a1d2abac5c0be"},
+ {file = "ruff-0.5.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:eaf3d86a1fdac1aec8a3417a63587d93f906c678bb9ed0b796da7b59c1114a1e"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a01c34400097b06cf8a6e61b35d6d456d5bd1ae6961542de18ec81eaf33b4cb8"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fcc8054f1a717e2213500edaddcf1dbb0abad40d98e1bd9d0ad364f75c763eea"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f70284e73f36558ef51602254451e50dd6cc479f8b6f8413a95fcb5db4a55fc"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a78ad870ae3c460394fc95437d43deb5c04b5c29297815a2a1de028903f19692"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ccd078c66a8e419475174bfe60a69adb36ce04f8d4e91b006f1329d5cd44bcf"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7e31c9bad4ebf8fdb77b59cae75814440731060a09a0e0077d559a556453acbb"},
+ {file = "ruff-0.5.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d796327eed8e168164346b769dd9a27a70e0298d667b4ecee6877ce8095ec8e"},
+ {file = "ruff-0.5.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a09ea2c3f7778cc635e7f6edf57d566a8ee8f485f3c4454db7771efb692c499"},
+ {file = "ruff-0.5.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a36d8dcf55b3a3bc353270d544fb170d75d2dff41eba5df57b4e0b67a95bb64e"},
+ {file = "ruff-0.5.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9369c218f789eefbd1b8d82a8cf25017b523ac47d96b2f531eba73770971c9e5"},
+ {file = "ruff-0.5.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b88ca3db7eb377eb24fb7c82840546fb7acef75af4a74bd36e9ceb37a890257e"},
+ {file = "ruff-0.5.7-py3-none-win32.whl", hash = "sha256:33d61fc0e902198a3e55719f4be6b375b28f860b09c281e4bdbf783c0566576a"},
+ {file = "ruff-0.5.7-py3-none-win_amd64.whl", hash = "sha256:083bbcbe6fadb93cd86709037acc510f86eed5a314203079df174c40bbbca6b3"},
+ {file = "ruff-0.5.7-py3-none-win_arm64.whl", hash = "sha256:2dca26154ff9571995107221d0aeaad0e75a77b5a682d6236cf89a58c70b76f4"},
+ {file = "ruff-0.5.7.tar.gz", hash = "sha256:8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5"},
+]
+
[[package]]
name = "six"
version = "1.16.0"
@@ -445,13 +477,13 @@ files = [
[[package]]
name = "types-python-dateutil"
-version = "2.9.0.20240316"
+version = "2.9.0.20240906"
description = "Typing stubs for python-dateutil"
optional = false
python-versions = ">=3.8"
files = [
- {file = "types-python-dateutil-2.9.0.20240316.tar.gz", hash = "sha256:5d2f2e240b86905e40944dd787db6da9263f0deabef1076ddaed797351ec0202"},
- {file = "types_python_dateutil-2.9.0.20240316-py3-none-any.whl", hash = "sha256:6b8cb66d960771ce5ff974e9dd45e38facb81718cc1e208b10b1baccbfdbee3b"},
+ {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"},
]
[[package]]
@@ -468,4 +500,4 @@ files = [
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
-content-hash = "7fa2085bd251148908cf9a89f13b158fe85ccb037bb44614ae5f150ceecee53c"
+content-hash = "6f6c191c1028d17a97fdfa84cedfd3cef94b5d63d98b8c1d333b3398eeea9055"
diff --git a/pyproject.toml b/pyproject.toml
index 739b237b..b55fb3ff 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "MergePythonClient"
-version = "1.0.13"
+version = "1.1.0"
description = ""
readme = "README.md"
authors = []
@@ -34,6 +34,7 @@ Repository = 'https://github.com/merge-api/merge-python-client'
python = "^3.8"
httpx = ">=0.21.2"
pydantic = ">= 1.9.2"
+pydantic-core = "^2.18.2"
typing_extensions = ">= 4.0.0"
[tool.poetry.dev-dependencies]
@@ -42,6 +43,7 @@ pytest = "^7.4.0"
pytest-asyncio = "^0.23.5"
python-dateutil = "^2.9.0"
types-python-dateutil = "^2.9.0.20240316"
+ruff = "^0.5.6"
[tool.pytest.ini_options]
testpaths = [ "tests" ]
@@ -50,6 +52,9 @@ asyncio_mode = "auto"
[tool.mypy]
plugins = ["pydantic.mypy"]
+[tool.ruff]
+line-length = 120
+
[build-system]
requires = ["poetry-core"]
diff --git a/reference.md b/reference.md
new file mode 100644
index 00000000..6bec9fcb
--- /dev/null
+++ b/reference.md
@@ -0,0 +1,44838 @@
+# Reference
+## Ats AccountDetails
+client.ats.account_details.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get details for a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.account_details.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats AccountToken
+client.ats.account_token.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns the account token for the end user with the provided public token.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.account_token.retrieve(
+ public_token="public_token",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**public_token:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Activities
+client.ats.activities.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Activity` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.activities.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["user"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[ActivitiesListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[ActivitiesListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**user_id:** `typing.Optional[str]` β If provided, will only return activities done by this user.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.activities.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Activity` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import ActivityRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.activities.create(
+ model=ActivityRequest(),
+ remote_user_id="remote_user_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `ActivityRequest`
+
+
+
+
+
+-
+
+**remote_user_id:** `str`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.activities.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Activity` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.activities.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["user"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[ActivitiesRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[ActivitiesRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.activities.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Activity` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.activities.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Applications
+client.ats.applications.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Application` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.applications.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**candidate_id:** `typing.Optional[str]` β If provided, will only return applications for this candidate.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**credited_to_id:** `typing.Optional[str]` β If provided, will only return applications credited to this user.
+
+
+
+
+
+-
+
+**current_stage_id:** `typing.Optional[str]` β If provided, will only return applications at this interview stage.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ApplicationsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**job_id:** `typing.Optional[str]` β If provided, will only return applications for this job.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**reject_reason_id:** `typing.Optional[str]` β If provided, will only return applications with this reject reason.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**source:** `typing.Optional[str]` β If provided, will only return applications with this source.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.applications.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Application` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import ApplicationRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.applications.create(
+ model=ApplicationRequest(),
+ remote_user_id="remote_user_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `ApplicationRequest`
+
+
+
+
+
+-
+
+**remote_user_id:** `str`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.applications.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Application` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.applications.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ApplicationsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.applications.change_stage_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates the `current_stage` field of an `Application` object
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.applications.change_stage_create(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**job_interview_stage:** `typing.Optional[str]` β The interview stage to move the application to.
+
+
+
+
+
+-
+
+**remote_user_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.applications.meta_post_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Application` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.applications.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**application_remote_template_id:** `typing.Optional[str]` β The template ID associated with the nested application in the request.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats AsyncPassthrough
+client.ats.async_passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Asynchronously pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.async_passthrough.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Retrieves data from earlier async-passthrough POST request
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**async_passthrough_receipt_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Attachments
+client.ats.attachments.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Attachment` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.attachments.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**candidate_id:** `typing.Optional[str]` β If provided, will only return attachments for this candidate.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["candidate"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["attachment_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["attachment_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.attachments.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Attachment` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import AttachmentRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.attachments.create(
+ model=AttachmentRequest(),
+ remote_user_id="remote_user_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `AttachmentRequest`
+
+
+
+
+
+-
+
+**remote_user_id:** `str`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.attachments.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Attachment` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.attachments.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["candidate"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["attachment_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["attachment_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.attachments.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Attachment` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.attachments.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats AuditTrail
+client.ats.audit_trail.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets a list of audit trail events.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.audit_trail.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred before this time
+
+
+
+
+
+-
+
+**event_type:** `typing.Optional[str]` β If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred after this time
+
+
+
+
+
+-
+
+**user_email:** `typing.Optional[str]` β If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats AvailableActions
+client.ats.available_actions.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of models and actions available for an account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.available_actions.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Candidates
+client.ats.candidates.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Candidate` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.candidates.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**email_addresses:** `typing.Optional[str]` β If provided, will only return candidates with these email addresses; multiple addresses can be separated by commas.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CandidatesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**first_name:** `typing.Optional[str]` β If provided, will only return candidates with this first name.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**last_name:** `typing.Optional[str]` β If provided, will only return candidates with this last name.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**tags:** `typing.Optional[str]` β If provided, will only return candidates with these tags; multiple tags can be separated by commas.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.candidates.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Candidate` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import CandidateRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.candidates.create(
+ model=CandidateRequest(),
+ remote_user_id="remote_user_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `CandidateRequest`
+
+
+
+
+
+-
+
+**remote_user_id:** `str`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.candidates.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Candidate` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.candidates.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CandidatesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.candidates.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates a `Candidate` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import PatchedCandidateRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.candidates.partial_update(
+ id="id",
+ model=PatchedCandidateRequest(),
+ remote_user_id="remote_user_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `PatchedCandidateRequest`
+
+
+
+
+
+-
+
+**remote_user_id:** `str`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.candidates.ignore_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.candidates.ignore_create(
+ model_id="model_id",
+ reason="GENERAL_CUSTOMER_REQUEST",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model_id:** `str`
+
+
+
+
+
+-
+
+**reason:** `ReasonEnum`
+
+
+
+
+
+-
+
+**message:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.candidates.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Candidate` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.candidates.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.candidates.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Candidate` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.candidates.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Scopes
+client.ats.scopes.default_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.scopes.default_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.scopes.linked_account_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.scopes.linked_account_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.scopes.linked_account_scopes_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import (
+ IndividualCommonModelScopeDeserializerRequest,
+ ModelPermissionDeserializerRequest,
+)
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` β The common models you want to update the scopes for
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats DeleteAccount
+client.ats.delete_account.delete()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Delete a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.delete_account.delete()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Departments
+client.ats.departments.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Department` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.departments.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.departments.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Department` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.departments.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Eeocs
+client.ats.eeocs.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `EEOC` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.eeocs.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**candidate_id:** `typing.Optional[str]` β If provided, will only return EEOC info for this candidate.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["candidate"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[EeocsListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[EeocsListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.eeocs.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `EEOC` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.eeocs.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["candidate"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[EeocsRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[EeocsRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats FieldMapping
+client.ats.field_mapping.field_mappings_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.field_mapping.field_mappings_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.field_mapping.field_mappings_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**target_field_name:** `str` β The name of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**target_field_description:** `str` β The description of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `str` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `str` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**common_model_name:** `str` β The name of the Common Model that the remote field corresponds to in a given category.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.field_mapping.field_mappings_destroy(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.field_mapping.field_mappings_partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `typing.Optional[str]` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `typing.Optional[str]` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.field_mapping.remote_fields_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.field_mapping.remote_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Optional[str]` β A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
+
+
+
+
+
+-
+
+**include_example_values:** `typing.Optional[str]` β If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.field_mapping.target_fields_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.field_mapping.target_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats GenerateKey
+client.ats.generate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create a remote key.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.generate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Interviews
+client.ats.interviews.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `ScheduledInterview` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.interviews.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**application_id:** `typing.Optional[str]` β If provided, will only return interviews for this application.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[InterviewsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**job_id:** `typing.Optional[str]` β If provided, wll only return interviews organized for this job.
+
+
+
+
+
+-
+
+**job_interview_stage_id:** `typing.Optional[str]` β If provided, will only return interviews at this stage.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**organizer_id:** `typing.Optional[str]` β If provided, will only return interviews organized by this user.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.interviews.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `ScheduledInterview` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import ScheduledInterviewRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.interviews.create(
+ model=ScheduledInterviewRequest(),
+ remote_user_id="remote_user_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `ScheduledInterviewRequest`
+
+
+
+
+
+-
+
+**remote_user_id:** `str`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.interviews.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `ScheduledInterview` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.interviews.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[InterviewsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.interviews.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `ScheduledInterview` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.interviews.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Issues
+client.ats.issues.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets all issues for Organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.issues.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_token:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred before this time
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**first_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was after this datetime.
+
+
+
+
+
+-
+
+**first_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was before this datetime.
+
+
+
+
+
+-
+
+**include_muted:** `typing.Optional[str]` β If true, will include muted issues
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**last_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was after this datetime.
+
+
+
+
+
+-
+
+**last_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was before this datetime.
+
+
+
+
+
+-
+
+**linked_account_id:** `typing.Optional[str]` β If provided, will only include issues pertaining to the linked account passed in.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred after this time
+
+
+
+
+
+-
+
+**status:** `typing.Optional[IssuesListRequestStatus]`
+
+Status of the issue. Options: ('ONGOING', 'RESOLVED')
+
+- `ONGOING` - ONGOING
+- `RESOLVED` - RESOLVED
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.issues.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get a specific issue.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.issues.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats JobInterviewStages
+client.ats.job_interview_stages.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `JobInterviewStage` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.job_interview_stages.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["job"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**job_id:** `typing.Optional[str]` β If provided, will only return interview stages for this job.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.job_interview_stages.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `JobInterviewStage` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.job_interview_stages.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["job"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats JobPostings
+client.ats.job_postings.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `JobPosting` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.job_postings.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["job"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[JobPostingsListRequestStatus]`
+
+If provided, will only return Job Postings with this status. Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING')
+
+- `PUBLISHED` - PUBLISHED
+- `CLOSED` - CLOSED
+- `DRAFT` - DRAFT
+- `INTERNAL` - INTERNAL
+- `PENDING` - PENDING
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.job_postings.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `JobPosting` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.job_postings.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["job"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Jobs
+client.ats.jobs.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Job` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.jobs.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**code:** `typing.Optional[str]` β If provided, will only return jobs with this code.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[JobsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**offices:** `typing.Optional[str]` β If provided, will only return jobs for this office; multiple offices can be separated by commas.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**status:** `typing.Optional[JobsListRequestStatus]`
+
+If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING')
+
+- `OPEN` - OPEN
+- `CLOSED` - CLOSED
+- `DRAFT` - DRAFT
+- `ARCHIVED` - ARCHIVED
+- `PENDING` - PENDING
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.jobs.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Job` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.jobs.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[JobsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.jobs.screening_questions_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `ScreeningQuestion` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.jobs.screening_questions_list(
+ job_id="job_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**job_id:** `str`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[JobsScreeningQuestionsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats LinkToken
+client.ats.link_token.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a link token to be used when linking a new end user.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**end_user_email_address:** `str` β Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `str` β Your end user's organization.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `str` β This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
+
+
+
+
+
+-
+
+**categories:** `typing.Sequence[CategoriesEnum]` β The integration categories to show in Merge Link.
+
+
+
+
+
+-
+
+**integration:** `typing.Optional[str]` β The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
+
+
+
+
+
+-
+
+**link_expiry_mins:** `typing.Optional[int]` β An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
+
+
+
+
+
+-
+
+**should_create_magic_link_url:** `typing.Optional[bool]` β Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**hide_admin_magic_link:** `typing.Optional[bool]` β Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` β An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
+
+
+
+
+
+-
+
+**category_common_model_scopes:** `typing.Optional[
+ typing.Dict[
+ str,
+ typing.Optional[
+ typing.Sequence[IndividualCommonModelScopeDeserializerRequest]
+ ],
+ ]
+]` β When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
+
+
+
+
+
+-
+
+**language:** `typing.Optional[str]` β The language code for the language to localize Merge Link to.
+
+
+
+
+
+-
+
+**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` β A JSON object containing integration-specific configuration options.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats LinkedAccounts
+client.ats.linked_accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+List linked accounts for your organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.linked_accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]`
+
+Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+- `hris` - hris
+- `ats` - ats
+- `accounting` - accounting
+- `ticketing` - ticketing
+- `crm` - crm
+- `mktg` - mktg
+- `filestorage` - filestorage
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_user_email_address:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given email address.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given organization name.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given origin ID.
+
+
+
+
+
+-
+
+**end_user_origin_ids:** `typing.Optional[str]` β Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
+
+
+
+
+
+-
+
+**id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**ids:** `typing.Optional[str]` β Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
+
+
+
+
+
+-
+
+**include_duplicates:** `typing.Optional[bool]` β If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given integration name.
+
+
+
+
+
+-
+
+**is_test_account:** `typing.Optional[str]` β If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[str]` β Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Offers
+client.ats.offers.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Offer` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.offers.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**application_id:** `typing.Optional[str]` β If provided, will only return offers for this application.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**creator_id:** `typing.Optional[str]` β If provided, will only return offers created by this user.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[OffersListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.offers.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Offer` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.offers.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[OffersRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Offices
+client.ats.offices.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Office` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.offices.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.offices.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Office` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.offices.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Passthrough
+client.ats.passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ats import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats RegenerateKey
+client.ats.regenerate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Exchange remote keys.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.regenerate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats RejectReasons
+client.ats.reject_reasons.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RejectReason` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.reject_reasons.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.reject_reasons.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `RejectReason` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.reject_reasons.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Scorecards
+client.ats.scorecards.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Scorecard` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.scorecards.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**application_id:** `typing.Optional[str]` β If provided, will only return scorecards for this application.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ScorecardsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**interview_id:** `typing.Optional[str]` β If provided, will only return scorecards for this interview.
+
+
+
+
+
+-
+
+**interviewer_id:** `typing.Optional[str]` β If provided, will only return scorecards for this interviewer.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["overall_recommendation"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["overall_recommendation"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.scorecards.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Scorecard` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.scorecards.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ScorecardsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["overall_recommendation"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["overall_recommendation"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats SyncStatus
+client.ats.sync_status.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.sync_status.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats ForceResync
+client.ats.force_resync.sync_status_resync_create()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.force_resync.sync_status_resync_create()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Tags
+client.ats.tags.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Tag` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.tags.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats Users
+client.ats.users.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteUser` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.users.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**email:** `typing.Optional[str]` β If provided, will only return remote users with the given email address
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["access_role"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["access_role"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.users.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `RemoteUser` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.users.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["access_role"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["access_role"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ats WebhookReceivers
+client.ats.webhook_receivers.list()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `WebhookReceiver` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.webhook_receivers.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ats.webhook_receivers.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `WebhookReceiver` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.webhook_receivers.create(
+ event="event",
+ is_active=True,
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**event:** `str`
+
+
+
+
+
+-
+
+**is_active:** `bool`
+
+
+
+
+
+-
+
+**key:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AccountDetails
+client.filestorage.account_details.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get details for a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.account_details.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AccountToken
+client.filestorage.account_token.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns the account token for the end user with the provided public token.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.account_token.retrieve(
+ public_token="public_token",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**public_token:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AsyncPassthrough
+client.filestorage.async_passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Asynchronously pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.filestorage import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.async_passthrough.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Retrieves data from earlier async-passthrough POST request
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**async_passthrough_receipt_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AuditTrail
+client.filestorage.audit_trail.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets a list of audit trail events.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.audit_trail.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred before this time
+
+
+
+
+
+-
+
+**event_type:** `typing.Optional[str]` β If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred after this time
+
+
+
+
+
+-
+
+**user_email:** `typing.Optional[str]` β If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AvailableActions
+client.filestorage.available_actions.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of models and actions available for an account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.available_actions.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Scopes
+client.filestorage.scopes.default_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.scopes.default_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.scopes.linked_account_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.scopes.linked_account_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.scopes.linked_account_scopes_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.filestorage import (
+ IndividualCommonModelScopeDeserializerRequest,
+ ModelPermissionDeserializerRequest,
+)
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` β The common models you want to update the scopes for
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage DeleteAccount
+client.filestorage.delete_account.delete()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Delete a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.delete_account.delete()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Drives
+client.filestorage.drives.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Drive` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.drives.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**name:** `typing.Optional[str]` β If provided, will only return drives with this name. This performs an exact match.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.drives.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Drive` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.drives.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage FieldMapping
+client.filestorage.field_mapping.field_mappings_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.field_mapping.field_mappings_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.field_mapping.field_mappings_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**target_field_name:** `str` β The name of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**target_field_description:** `str` β The description of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `str` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `str` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**common_model_name:** `str` β The name of the Common Model that the remote field corresponds to in a given category.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.field_mapping.field_mappings_destroy(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.field_mapping.field_mappings_partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `typing.Optional[str]` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `typing.Optional[str]` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.field_mapping.remote_fields_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.field_mapping.remote_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Optional[str]` β A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
+
+
+
+
+
+-
+
+**include_example_values:** `typing.Optional[str]` β If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.field_mapping.target_fields_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.field_mapping.target_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Files
+client.filestorage.files.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `File` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.files.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**drive_id:** `typing.Optional[str]` β Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[FilesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**folder_id:** `typing.Optional[str]` β Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**mime_type:** `typing.Optional[str]` β If provided, will only return files with these mime_types. Multiple values can be separated by commas.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**name:** `typing.Optional[str]` β If provided, will only return files with this name. This performs an exact match.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.files.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `File` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.filestorage import FileRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.files.create(
+ model=FileRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `FileRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.files.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `File` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.files.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[FilesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.files.download_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns the `File` content with the given `id` as a stream of bytes.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.files.download_retrieve(
+ id="string",
+ mime_type="string",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**mime_type:** `typing.Optional[str]` β If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.files.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `FileStorageFile` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.files.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Folders
+client.filestorage.folders.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Folder` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.folders.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**drive_id:** `typing.Optional[str]` β If provided, will only return folders in this drive.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[FoldersListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**name:** `typing.Optional[str]` β If provided, will only return folders with this name. This performs an exact match.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**parent_folder_id:** `typing.Optional[str]` β If provided, will only return folders in this parent folder. If null, will return folders in root directory.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.folders.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Folder` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.filestorage import FolderRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.folders.create(
+ model=FolderRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `FolderRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.folders.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Folder` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.folders.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[FoldersRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.folders.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `FileStorageFolder` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.folders.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage GenerateKey
+client.filestorage.generate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create a remote key.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.generate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Groups
+client.filestorage.groups.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Group` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.groups.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.groups.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Group` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.groups.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Issues
+client.filestorage.issues.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets all issues for Organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.issues.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_token:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred before this time
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**first_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was after this datetime.
+
+
+
+
+
+-
+
+**first_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was before this datetime.
+
+
+
+
+
+-
+
+**include_muted:** `typing.Optional[str]` β If true, will include muted issues
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**last_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was after this datetime.
+
+
+
+
+
+-
+
+**last_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was before this datetime.
+
+
+
+
+
+-
+
+**linked_account_id:** `typing.Optional[str]` β If provided, will only include issues pertaining to the linked account passed in.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred after this time
+
+
+
+
+
+-
+
+**status:** `typing.Optional[IssuesListRequestStatus]`
+
+Status of the issue. Options: ('ONGOING', 'RESOLVED')
+
+- `ONGOING` - ONGOING
+- `RESOLVED` - RESOLVED
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.issues.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get a specific issue.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.issues.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage LinkToken
+client.filestorage.link_token.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a link token to be used when linking a new end user.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**end_user_email_address:** `str` β Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `str` β Your end user's organization.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `str` β This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
+
+
+
+
+
+-
+
+**categories:** `typing.Sequence[CategoriesEnum]` β The integration categories to show in Merge Link.
+
+
+
+
+
+-
+
+**integration:** `typing.Optional[str]` β The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
+
+
+
+
+
+-
+
+**link_expiry_mins:** `typing.Optional[int]` β An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
+
+
+
+
+
+-
+
+**should_create_magic_link_url:** `typing.Optional[bool]` β Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**hide_admin_magic_link:** `typing.Optional[bool]` β Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` β An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
+
+
+
+
+
+-
+
+**category_common_model_scopes:** `typing.Optional[
+ typing.Dict[
+ str,
+ typing.Optional[
+ typing.Sequence[IndividualCommonModelScopeDeserializerRequest]
+ ],
+ ]
+]` β When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
+
+
+
+
+
+-
+
+**language:** `typing.Optional[str]` β The language code for the language to localize Merge Link to.
+
+
+
+
+
+-
+
+**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` β A JSON object containing integration-specific configuration options.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage LinkedAccounts
+client.filestorage.linked_accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+List linked accounts for your organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.linked_accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]`
+
+Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+- `hris` - hris
+- `ats` - ats
+- `accounting` - accounting
+- `ticketing` - ticketing
+- `crm` - crm
+- `mktg` - mktg
+- `filestorage` - filestorage
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_user_email_address:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given email address.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given organization name.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given origin ID.
+
+
+
+
+
+-
+
+**end_user_origin_ids:** `typing.Optional[str]` β Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
+
+
+
+
+
+-
+
+**id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**ids:** `typing.Optional[str]` β Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
+
+
+
+
+
+-
+
+**include_duplicates:** `typing.Optional[bool]` β If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given integration name.
+
+
+
+
+
+-
+
+**is_test_account:** `typing.Optional[str]` β If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[str]` β Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Passthrough
+client.filestorage.passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.filestorage import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage RegenerateKey
+client.filestorage.regenerate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Exchange remote keys.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.regenerate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage SyncStatus
+client.filestorage.sync_status.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.sync_status.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage ForceResync
+client.filestorage.force_resync.sync_status_resync_create()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.force_resync.sync_status_resync_create()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Users
+client.filestorage.users.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `User` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.users.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**is_me:** `typing.Optional[str]` β If provided, will only return the user object for requestor.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.users.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `User` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.users.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage WebhookReceivers
+client.filestorage.webhook_receivers.list()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `WebhookReceiver` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.webhook_receivers.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.filestorage.webhook_receivers.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `WebhookReceiver` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.webhook_receivers.create(
+ event="event",
+ is_active=True,
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**event:** `str`
+
+
+
+
+
+-
+
+**is_active:** `bool`
+
+
+
+
+
+-
+
+**key:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm AccountDetails
+client.crm.account_details.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get details for a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.account_details.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm AccountToken
+client.crm.account_token.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns the account token for the end user with the provided public token.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.account_token.retrieve(
+ public_token="public_token",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**public_token:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Accounts
+client.crm.accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Account` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["owner"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**name:** `typing.Optional[str]` β If provided, will only return accounts with this name.
+
+
+
+
+
+-
+
+**owner_id:** `typing.Optional[str]` β If provided, will only return accounts with this owner.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.accounts.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Account` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import AccountRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.accounts.create(
+ model=AccountRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `AccountRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.accounts.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Account` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.accounts.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["owner"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.accounts.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates an `Account` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import PatchedAccountRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.accounts.partial_update(
+ id="id",
+ model=PatchedAccountRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `PatchedAccountRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.accounts.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `CRMAccount` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.accounts.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.accounts.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `CRMAccount` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.accounts.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.accounts.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.accounts.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm AsyncPassthrough
+client.crm.async_passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Asynchronously pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.async_passthrough.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Retrieves data from earlier async-passthrough POST request
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**async_passthrough_receipt_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm AuditTrail
+client.crm.audit_trail.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets a list of audit trail events.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.audit_trail.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred before this time
+
+
+
+
+
+-
+
+**event_type:** `typing.Optional[str]` β If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred after this time
+
+
+
+
+
+-
+
+**user_email:** `typing.Optional[str]` β If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm AvailableActions
+client.crm.available_actions.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of models and actions available for an account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.available_actions.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Contacts
+client.crm.contacts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Contact` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.contacts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_id:** `typing.Optional[str]` β If provided, will only return contacts with this account.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**email_addresses:** `typing.Optional[str]` β If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ContactsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**phone_numbers:** `typing.Optional[str]` β If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.contacts.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Contact` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import ContactRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.contacts.create(
+ model=ContactRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `ContactRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.contacts.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Contact` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.contacts.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ContactsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.contacts.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates a `Contact` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import PatchedContactRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.contacts.partial_update(
+ id="id",
+ model=PatchedContactRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `PatchedContactRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.contacts.ignore_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import IgnoreCommonModelRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.contacts.ignore_create(
+ model_id="model_id",
+ request=IgnoreCommonModelRequest(
+ reason="GENERAL_CUSTOMER_REQUEST",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model_id:** `str`
+
+
+
+
+
+-
+
+**request:** `IgnoreCommonModelRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.contacts.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `CRMContact` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.contacts.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.contacts.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `CRMContact` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.contacts.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.contacts.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.contacts.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm CustomObjectClasses
+client.crm.custom_object_classes.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `CustomObjectClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.custom_object_classes.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["fields"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.custom_object_classes.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `CustomObjectClass` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.custom_object_classes.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["fields"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm AssociationTypes
+client.crm.association_types.custom_object_classes_association_types_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `AssociationType` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.association_types.custom_object_classes_association_types_list(
+ custom_object_class_id="custom_object_class_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.association_types.custom_object_classes_association_types_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `AssociationType` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import (
+ AssociationTypeRequestRequest,
+ ObjectClassDescriptionRequest,
+)
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.association_types.custom_object_classes_association_types_create(
+ custom_object_class_id="custom_object_class_id",
+ model=AssociationTypeRequestRequest(
+ source_object_class=ObjectClassDescriptionRequest(
+ id="id",
+ origin_type="CUSTOM_OBJECT",
+ ),
+ target_object_classes=[
+ ObjectClassDescriptionRequest(
+ id="id",
+ origin_type="CUSTOM_OBJECT",
+ )
+ ],
+ remote_key_name="remote_key_name",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**model:** `AssociationTypeRequestRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.association_types.custom_object_classes_association_types_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `AssociationType` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.association_types.custom_object_classes_association_types_retrieve(
+ custom_object_class_id="custom_object_class_id",
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["target_object_classes"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `CRMAssociationType` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve(
+ custom_object_class_id="custom_object_class_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm CustomObjects
+client.crm.custom_objects.custom_object_classes_custom_objects_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `CustomObject` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.custom_objects.custom_object_classes_custom_objects_list(
+ custom_object_class_id="custom_object_class_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.custom_objects.custom_object_classes_custom_objects_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `CustomObject` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import CustomObjectRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.custom_objects.custom_object_classes_custom_objects_create(
+ custom_object_class_id="custom_object_class_id",
+ model=CustomObjectRequest(
+ fields={"test_field": "hello"},
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**model:** `CustomObjectRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `CustomObject` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
+ custom_object_class_id="custom_object_class_id",
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `CRMCustomObject` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve(
+ custom_object_class_id="custom_object_class_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Associations
+client.crm.associations.custom_object_classes_custom_objects_associations_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Association` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.associations.custom_object_classes_custom_objects_associations_list(
+ custom_object_class_id="custom_object_class_id",
+ object_id="object_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**custom_object_class_id:** `str`
+
+
+
+
+
+-
+
+**object_id:** `str`
+
+
+
+
+
+-
+
+**association_type_id:** `typing.Optional[str]` β If provided, will only return opportunities with this association_type.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["association_type"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.associations.custom_object_classes_custom_objects_associations_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.associations.custom_object_classes_custom_objects_associations_update(
+ association_type_id="association_type_id",
+ source_class_id="source_class_id",
+ source_object_id="source_object_id",
+ target_class_id="target_class_id",
+ target_object_id="target_object_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**association_type_id:** `str`
+
+
+
+
+
+-
+
+**source_class_id:** `str`
+
+
+
+
+
+-
+
+**source_object_id:** `str`
+
+
+
+
+
+-
+
+**target_class_id:** `str`
+
+
+
+
+
+-
+
+**target_object_id:** `str`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Scopes
+client.crm.scopes.default_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.scopes.default_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.scopes.linked_account_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.scopes.linked_account_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.scopes.linked_account_scopes_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import (
+ IndividualCommonModelScopeDeserializerRequest,
+ ModelPermissionDeserializerRequest,
+)
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` β The common models you want to update the scopes for
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm DeleteAccount
+client.crm.delete_account.delete()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Delete a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.delete_account.delete()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm EngagementTypes
+client.crm.engagement_types.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `EngagementType` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagement_types.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.engagement_types.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `EngagementType` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagement_types.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.engagement_types.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagement_types.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Engagements
+client.crm.engagements.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Engagement` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagements.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[EngagementsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**started_after:** `typing.Optional[dt.datetime]` β If provided, will only return engagements started after this datetime.
+
+
+
+
+
+-
+
+**started_before:** `typing.Optional[dt.datetime]` β If provided, will only return engagements started before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.engagements.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Engagement` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import EngagementRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagements.create(
+ model=EngagementRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `EngagementRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.engagements.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Engagement` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagements.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[EngagementsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.engagements.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates an `Engagement` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import PatchedEngagementRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagements.partial_update(
+ id="id",
+ model=PatchedEngagementRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `PatchedEngagementRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.engagements.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Engagement` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagements.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.engagements.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Engagement` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagements.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.engagements.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.engagements.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm FieldMapping
+client.crm.field_mapping.field_mappings_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.field_mapping.field_mappings_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.field_mapping.field_mappings_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**target_field_name:** `str` β The name of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**target_field_description:** `str` β The description of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `str` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `str` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**common_model_name:** `str` β The name of the Common Model that the remote field corresponds to in a given category.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.field_mapping.field_mappings_destroy(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.field_mapping.field_mappings_partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `typing.Optional[str]` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `typing.Optional[str]` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.field_mapping.remote_fields_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.field_mapping.remote_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Optional[str]` β A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
+
+
+
+
+
+-
+
+**include_example_values:** `typing.Optional[str]` β If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.field_mapping.target_fields_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.field_mapping.target_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm GenerateKey
+client.crm.generate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create a remote key.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.generate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Issues
+client.crm.issues.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets all issues for Organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.issues.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_token:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred before this time
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**first_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was after this datetime.
+
+
+
+
+
+-
+
+**first_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was before this datetime.
+
+
+
+
+
+-
+
+**include_muted:** `typing.Optional[str]` β If true, will include muted issues
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**last_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was after this datetime.
+
+
+
+
+
+-
+
+**last_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was before this datetime.
+
+
+
+
+
+-
+
+**linked_account_id:** `typing.Optional[str]` β If provided, will only include issues pertaining to the linked account passed in.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred after this time
+
+
+
+
+
+-
+
+**status:** `typing.Optional[IssuesListRequestStatus]`
+
+Status of the issue. Options: ('ONGOING', 'RESOLVED')
+
+- `ONGOING` - ONGOING
+- `RESOLVED` - RESOLVED
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.issues.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get a specific issue.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.issues.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Leads
+client.crm.leads.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Lead` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.leads.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**converted_account_id:** `typing.Optional[str]` β If provided, will only return leads with this account.
+
+
+
+
+
+-
+
+**converted_contact_id:** `typing.Optional[str]` β If provided, will only return leads with this contact.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**email_addresses:** `typing.Optional[str]` β If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[LeadsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**owner_id:** `typing.Optional[str]` β If provided, will only return leads with this owner.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**phone_numbers:** `typing.Optional[str]` β If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.leads.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Lead` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import LeadRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.leads.create(
+ model=LeadRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `LeadRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.leads.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Lead` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.leads.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[LeadsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.leads.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Lead` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.leads.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.leads.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.leads.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm LinkToken
+client.crm.link_token.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a link token to be used when linking a new end user.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**end_user_email_address:** `str` β Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `str` β Your end user's organization.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `str` β This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
+
+
+
+
+
+-
+
+**categories:** `typing.Sequence[CategoriesEnum]` β The integration categories to show in Merge Link.
+
+
+
+
+
+-
+
+**integration:** `typing.Optional[str]` β The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
+
+
+
+
+
+-
+
+**link_expiry_mins:** `typing.Optional[int]` β An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
+
+
+
+
+
+-
+
+**should_create_magic_link_url:** `typing.Optional[bool]` β Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**hide_admin_magic_link:** `typing.Optional[bool]` β Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` β An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
+
+
+
+
+
+-
+
+**category_common_model_scopes:** `typing.Optional[
+ typing.Dict[
+ str,
+ typing.Optional[
+ typing.Sequence[IndividualCommonModelScopeDeserializerRequest]
+ ],
+ ]
+]` β When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
+
+
+
+
+
+-
+
+**language:** `typing.Optional[str]` β The language code for the language to localize Merge Link to.
+
+
+
+
+
+-
+
+**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` β A JSON object containing integration-specific configuration options.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm LinkedAccounts
+client.crm.linked_accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+List linked accounts for your organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.linked_accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]`
+
+Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+- `hris` - hris
+- `ats` - ats
+- `accounting` - accounting
+- `ticketing` - ticketing
+- `crm` - crm
+- `mktg` - mktg
+- `filestorage` - filestorage
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_user_email_address:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given email address.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given organization name.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given origin ID.
+
+
+
+
+
+-
+
+**end_user_origin_ids:** `typing.Optional[str]` β Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
+
+
+
+
+
+-
+
+**id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**ids:** `typing.Optional[str]` β Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
+
+
+
+
+
+-
+
+**include_duplicates:** `typing.Optional[bool]` β If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given integration name.
+
+
+
+
+
+-
+
+**is_test_account:** `typing.Optional[str]` β If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[str]` β Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Notes
+client.crm.notes.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Note` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.notes.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_id:** `typing.Optional[str]` β If provided, will only return notes with this account.
+
+
+
+
+
+-
+
+**contact_id:** `typing.Optional[str]` β If provided, will only return notes with this contact.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[NotesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**opportunity_id:** `typing.Optional[str]` β If provided, will only return notes with this opportunity.
+
+
+
+
+
+-
+
+**owner_id:** `typing.Optional[str]` β If provided, will only return notes with this owner.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.notes.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Note` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import NoteRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.notes.create(
+ model=NoteRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `NoteRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.notes.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Note` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.notes.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[NotesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.notes.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Note` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.notes.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.notes.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.notes.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Opportunities
+client.crm.opportunities.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Opportunity` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.opportunities.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_id:** `typing.Optional[str]` β If provided, will only return opportunities with this account.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[OpportunitiesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**owner_id:** `typing.Optional[str]` β If provided, will only return opportunities with this owner.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_created_after:** `typing.Optional[dt.datetime]` β If provided, will only return opportunities created in the third party platform after this datetime.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**stage_id:** `typing.Optional[str]` β If provided, will only return opportunities with this stage.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[OpportunitiesListRequestStatus]`
+
+If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST')
+
+- `OPEN` - OPEN
+- `WON` - WON
+- `LOST` - LOST
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.opportunities.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Opportunity` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import OpportunityRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.opportunities.create(
+ model=OpportunityRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `OpportunityRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.opportunities.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Opportunity` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.opportunities.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[OpportunitiesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.opportunities.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates an `Opportunity` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import PatchedOpportunityRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.opportunities.partial_update(
+ id="id",
+ model=PatchedOpportunityRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `PatchedOpportunityRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.opportunities.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Opportunity` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.opportunities.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.opportunities.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Opportunity` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.opportunities.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.opportunities.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.opportunities.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Passthrough
+client.crm.passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm RegenerateKey
+client.crm.regenerate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Exchange remote keys.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.regenerate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Stages
+client.crm.stages.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Stage` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.stages.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.stages.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Stage` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.stages.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.stages.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.stages.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm SyncStatus
+client.crm.sync_status.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.sync_status.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm ForceResync
+client.crm.force_resync.sync_status_resync_create()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.force_resync.sync_status_resync_create()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Tasks
+client.crm.tasks.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Task` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.tasks.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TasksListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.tasks.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Task` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import TaskRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.tasks.create(
+ model=TaskRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `TaskRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.tasks.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Task` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.tasks.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TasksRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.tasks.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates a `Task` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import PatchedTaskRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.tasks.partial_update(
+ id="id",
+ model=PatchedTaskRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `PatchedTaskRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.tasks.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Task` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.tasks.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.tasks.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Task` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.tasks.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.tasks.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.tasks.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm Users
+client.crm.users.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `User` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.users.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.users.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `User` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.users.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.users.ignore_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.crm import IgnoreCommonModelRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.users.ignore_create(
+ model_id="model_id",
+ request=IgnoreCommonModelRequest(
+ reason="GENERAL_CUSTOMER_REQUEST",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model_id:** `str`
+
+
+
+
+
+-
+
+**request:** `IgnoreCommonModelRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.users.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.users.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Crm WebhookReceivers
+client.crm.webhook_receivers.list()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `WebhookReceiver` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.webhook_receivers.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.crm.webhook_receivers.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `WebhookReceiver` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.webhook_receivers.create(
+ event="event",
+ is_active=True,
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**event:** `str`
+
+
+
+
+
+-
+
+**is_active:** `bool`
+
+
+
+
+
+-
+
+**key:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris AccountDetails
+client.hris.account_details.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get details for a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.account_details.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris AccountToken
+client.hris.account_token.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns the account token for the end user with the provided public token.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.account_token.retrieve(
+ public_token="public_token",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**public_token:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris AsyncPassthrough
+client.hris.async_passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Asynchronously pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.hris import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.async_passthrough.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Retrieves data from earlier async-passthrough POST request
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**async_passthrough_receipt_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris AuditTrail
+client.hris.audit_trail.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets a list of audit trail events.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.audit_trail.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred before this time
+
+
+
+
+
+-
+
+**event_type:** `typing.Optional[str]` β If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred after this time
+
+
+
+
+
+-
+
+**user_email:** `typing.Optional[str]` β If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris AvailableActions
+client.hris.available_actions.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of models and actions available for an account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.available_actions.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris BankInfo
+client.hris.bank_info.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `BankInfo` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.bank_info.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_type:** `typing.Optional[BankInfoListRequestAccountType]`
+
+If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING')
+
+- `SAVINGS` - SAVINGS
+- `CHECKING` - CHECKING
+
+
+
+
+
+-
+
+**bank_name:** `typing.Optional[str]` β If provided, will only return BankInfo's with this bank name.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**employee_id:** `typing.Optional[str]` β If provided, will only return bank accounts for this employee.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["employee"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**order_by:** `typing.Optional[BankInfoListRequestOrderBy]` β Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["account_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.bank_info.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `BankInfo` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.bank_info.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["employee"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["account_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Benefits
+client.hris.benefits.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Benefit` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.benefits.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**employee_id:** `typing.Optional[str]` β If provided, will return the benefits associated with the employee.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["employee"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.benefits.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Benefit` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.benefits.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["employee"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Companies
+client.hris.companies.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Company` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.companies.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.companies.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Company` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.companies.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Scopes
+client.hris.scopes.default_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.scopes.default_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.scopes.linked_account_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.scopes.linked_account_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.scopes.linked_account_scopes_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.hris import (
+ IndividualCommonModelScopeDeserializerRequest,
+ ModelPermissionDeserializerRequest,
+)
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` β The common models you want to update the scopes for
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris DeleteAccount
+client.hris.delete_account.delete()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Delete a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.delete_account.delete()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Dependents
+client.hris.dependents.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Dependent` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.dependents.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_sensitive_fields:** `typing.Optional[bool]` β Whether to include sensitive fields (such as social security numbers) in the response.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.dependents.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Dependent` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.dependents.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_sensitive_fields:** `typing.Optional[bool]` β Whether to include sensitive fields (such as social security numbers) in the response.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris EmployeePayrollRuns
+client.hris.employee_payroll_runs.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `EmployeePayrollRun` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employee_payroll_runs.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**employee_id:** `typing.Optional[str]` β If provided, will only return employee payroll runs for this employee.
+
+
+
+
+
+-
+
+**ended_after:** `typing.Optional[dt.datetime]` β If provided, will only return employee payroll runs ended after this datetime.
+
+
+
+
+
+-
+
+**ended_before:** `typing.Optional[dt.datetime]` β If provided, will only return employee payroll runs ended before this datetime.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[EmployeePayrollRunsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**payroll_run_id:** `typing.Optional[str]` β If provided, will only return employee payroll runs for this employee.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**started_after:** `typing.Optional[dt.datetime]` β If provided, will only return employee payroll runs started after this datetime.
+
+
+
+
+
+-
+
+**started_before:** `typing.Optional[dt.datetime]` β If provided, will only return employee payroll runs started before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.employee_payroll_runs.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `EmployeePayrollRun` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employee_payroll_runs.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[EmployeePayrollRunsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Employees
+client.hris.employees.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Employee` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employees.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return employees for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**display_full_name:** `typing.Optional[str]` β If provided, will only return employees with this display name.
+
+
+
+
+
+-
+
+**employment_status:** `typing.Optional[EmployeesListRequestEmploymentStatus]`
+
+If provided, will only return employees with this employment status.
+
+- `ACTIVE` - ACTIVE
+- `PENDING` - PENDING
+- `INACTIVE` - INACTIVE
+
+
+
+
+
+-
+
+**employment_type:** `typing.Optional[str]` β If provided, will only return employees that have an employment of the specified employment_type.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[EmployeesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**first_name:** `typing.Optional[str]` β If provided, will only return employees with this first name.
+
+
+
+
+
+-
+
+**groups:** `typing.Optional[str]` β If provided, will only return employees matching the group ids; multiple groups can be separated by commas.
+
+
+
+
+
+-
+
+**home_location_id:** `typing.Optional[str]` β If provided, will only return employees for this home location.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_sensitive_fields:** `typing.Optional[bool]` β Whether to include sensitive fields (such as social security numbers) in the response.
+
+
+
+
+
+-
+
+**job_title:** `typing.Optional[str]` β If provided, will only return employees that have an employment of the specified job_title.
+
+
+
+
+
+-
+
+**last_name:** `typing.Optional[str]` β If provided, will only return employees with this last name.
+
+
+
+
+
+-
+
+**manager_id:** `typing.Optional[str]` β If provided, will only return employees for this manager.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**pay_group_id:** `typing.Optional[str]` β If provided, will only return employees for this pay group
+
+
+
+
+
+-
+
+**personal_email:** `typing.Optional[str]` β If provided, will only return Employees with this personal email
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[EmployeesListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[EmployeesListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**started_after:** `typing.Optional[dt.datetime]` β If provided, will only return employees that started after this datetime.
+
+
+
+
+
+-
+
+**started_before:** `typing.Optional[dt.datetime]` β If provided, will only return employees that started before this datetime.
+
+
+
+
+
+-
+
+**team_id:** `typing.Optional[str]` β If provided, will only return employees for this team.
+
+
+
+
+
+-
+
+**terminated_after:** `typing.Optional[dt.datetime]` β If provided, will only return employees that were terminated after this datetime.
+
+
+
+
+
+-
+
+**terminated_before:** `typing.Optional[dt.datetime]` β If provided, will only return employees that were terminated before this datetime.
+
+
+
+
+
+-
+
+**work_email:** `typing.Optional[str]` β If provided, will only return Employees with this work email
+
+
+
+
+
+-
+
+**work_location_id:** `typing.Optional[str]` β If provided, will only return employees for this location.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.employees.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Employee` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.hris import EmployeeRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employees.create(
+ model=EmployeeRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `EmployeeRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.employees.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Employee` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employees.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[EmployeesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_sensitive_fields:** `typing.Optional[bool]` β Whether to include sensitive fields (such as social security numbers) in the response.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[EmployeesRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.employees.ignore_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employees.ignore_create(
+ model_id="model_id",
+ reason="GENERAL_CUSTOMER_REQUEST",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model_id:** `str`
+
+
+
+
+
+-
+
+**reason:** `IgnoreCommonModelRequestReason`
+
+
+
+
+
+-
+
+**message:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.employees.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Employee` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employees.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris EmployerBenefits
+client.hris.employer_benefits.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `EmployerBenefit` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employer_benefits.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.employer_benefits.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `EmployerBenefit` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employer_benefits.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Employments
+client.hris.employments.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Employment` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employments.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**employee_id:** `typing.Optional[str]` β If provided, will only return employments for this employee.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[EmploymentsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**order_by:** `typing.Optional[EmploymentsListRequestOrderBy]` β Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[EmploymentsListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[EmploymentsListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.employments.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Employment` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.employments.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[EmploymentsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[EmploymentsRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris FieldMapping
+client.hris.field_mapping.field_mappings_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.field_mapping.field_mappings_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.field_mapping.field_mappings_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**target_field_name:** `str` β The name of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**target_field_description:** `str` β The description of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `str` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `str` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**common_model_name:** `str` β The name of the Common Model that the remote field corresponds to in a given category.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.field_mapping.field_mappings_destroy(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.field_mapping.field_mappings_partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `typing.Optional[str]` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `typing.Optional[str]` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.field_mapping.remote_fields_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.field_mapping.remote_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Optional[str]` β A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
+
+
+
+
+
+-
+
+**include_example_values:** `typing.Optional[str]` β If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.field_mapping.target_fields_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.field_mapping.target_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris GenerateKey
+client.hris.generate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create a remote key.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.generate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Groups
+client.hris.groups.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Group` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.groups.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**is_commonly_used_as_team:** `typing.Optional[str]` β If provided, specifies whether to return only Group objects which refer to a team in the third party platform. Note that this is an opinionated view based on how a team may be represented in the third party platform.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**names:** `typing.Optional[str]` β If provided, will only return groups with these names. Multiple values can be separated by commas.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**types:** `typing.Optional[str]` β If provided, will only return groups of these types. Multiple values can be separated by commas.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.groups.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Group` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.groups.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Issues
+client.hris.issues.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets all issues for Organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.issues.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_token:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred before this time
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**first_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was after this datetime.
+
+
+
+
+
+-
+
+**first_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was before this datetime.
+
+
+
+
+
+-
+
+**include_muted:** `typing.Optional[str]` β If true, will include muted issues
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**last_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was after this datetime.
+
+
+
+
+
+-
+
+**last_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was before this datetime.
+
+
+
+
+
+-
+
+**linked_account_id:** `typing.Optional[str]` β If provided, will only include issues pertaining to the linked account passed in.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred after this time
+
+
+
+
+
+-
+
+**status:** `typing.Optional[IssuesListRequestStatus]`
+
+Status of the issue. Options: ('ONGOING', 'RESOLVED')
+
+- `ONGOING` - ONGOING
+- `RESOLVED` - RESOLVED
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.issues.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get a specific issue.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.issues.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris LinkToken
+client.hris.link_token.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a link token to be used when linking a new end user.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**end_user_email_address:** `str` β Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `str` β Your end user's organization.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `str` β This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
+
+
+
+
+
+-
+
+**categories:** `typing.Sequence[CategoriesEnum]` β The integration categories to show in Merge Link.
+
+
+
+
+
+-
+
+**integration:** `typing.Optional[str]` β The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
+
+
+
+
+
+-
+
+**link_expiry_mins:** `typing.Optional[int]` β An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
+
+
+
+
+
+-
+
+**should_create_magic_link_url:** `typing.Optional[bool]` β Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**hide_admin_magic_link:** `typing.Optional[bool]` β Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` β An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
+
+
+
+
+
+-
+
+**category_common_model_scopes:** `typing.Optional[
+ typing.Dict[
+ str,
+ typing.Optional[
+ typing.Sequence[IndividualCommonModelScopeDeserializerRequest]
+ ],
+ ]
+]` β When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
+
+
+
+
+
+-
+
+**language:** `typing.Optional[str]` β The language code for the language to localize Merge Link to.
+
+
+
+
+
+-
+
+**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` β A JSON object containing integration-specific configuration options.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris LinkedAccounts
+client.hris.linked_accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+List linked accounts for your organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.linked_accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]`
+
+Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+- `hris` - hris
+- `ats` - ats
+- `accounting` - accounting
+- `ticketing` - ticketing
+- `crm` - crm
+- `mktg` - mktg
+- `filestorage` - filestorage
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_user_email_address:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given email address.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given organization name.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given origin ID.
+
+
+
+
+
+-
+
+**end_user_origin_ids:** `typing.Optional[str]` β Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
+
+
+
+
+
+-
+
+**id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**ids:** `typing.Optional[str]` β Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
+
+
+
+
+
+-
+
+**include_duplicates:** `typing.Optional[bool]` β If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given integration name.
+
+
+
+
+
+-
+
+**is_test_account:** `typing.Optional[str]` β If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[str]` β Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Locations
+client.hris.locations.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Location` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.locations.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**location_type:** `typing.Optional[LocationsListRequestLocationType]`
+
+If provided, will only return locations with this location_type
+
+- `HOME` - HOME
+- `WORK` - WORK
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["location_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["location_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.locations.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Location` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.locations.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["location_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["location_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Passthrough
+client.hris.passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.hris import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris PayGroups
+client.hris.pay_groups.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `PayGroup` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.pay_groups.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.pay_groups.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `PayGroup` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.pay_groups.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris PayrollRuns
+client.hris.payroll_runs.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `PayrollRun` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.payroll_runs.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**ended_after:** `typing.Optional[dt.datetime]` β If provided, will only return payroll runs ended after this datetime.
+
+
+
+
+
+-
+
+**ended_before:** `typing.Optional[dt.datetime]` β If provided, will only return payroll runs ended before this datetime.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[PayrollRunsListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**run_type:** `typing.Optional[PayrollRunsListRequestRunType]`
+
+If provided, will only return PayrollRun's with this status. Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', 'SIGN_ON_BONUS')
+
+- `REGULAR` - REGULAR
+- `OFF_CYCLE` - OFF_CYCLE
+- `CORRECTION` - CORRECTION
+- `TERMINATION` - TERMINATION
+- `SIGN_ON_BONUS` - SIGN_ON_BONUS
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[PayrollRunsListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**started_after:** `typing.Optional[dt.datetime]` β If provided, will only return payroll runs started after this datetime.
+
+
+
+
+
+-
+
+**started_before:** `typing.Optional[dt.datetime]` β If provided, will only return payroll runs started before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.payroll_runs.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `PayrollRun` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.payroll_runs.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[PayrollRunsRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris RegenerateKey
+client.hris.regenerate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Exchange remote keys.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.regenerate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris SyncStatus
+client.hris.sync_status.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.sync_status.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris ForceResync
+client.hris.force_resync.sync_status_resync_create()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.force_resync.sync_status_resync_create()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris Teams
+client.hris.teams.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Team` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.teams.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["parent_team"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**parent_team_id:** `typing.Optional[str]` β If provided, will only return teams with this parent team.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.teams.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Team` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.teams.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["parent_team"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris TimeOff
+client.hris.time_off.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `TimeOff` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.time_off.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**approver_id:** `typing.Optional[str]` β If provided, will only return time off for this approver.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**employee_id:** `typing.Optional[str]` β If provided, will only return time off for this employee.
+
+
+
+
+
+-
+
+**ended_after:** `typing.Optional[dt.datetime]` β If provided, will only return employees that ended after this datetime.
+
+
+
+
+
+-
+
+**ended_before:** `typing.Optional[dt.datetime]` β If provided, will only return time-offs that ended before this datetime.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TimeOffListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[TimeOffListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_type:** `typing.Optional[TimeOffListRequestRequestType]`
+
+If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT')
+
+- `VACATION` - VACATION
+- `SICK` - SICK
+- `PERSONAL` - PERSONAL
+- `JURY_DUTY` - JURY_DUTY
+- `VOLUNTEER` - VOLUNTEER
+- `BEREAVEMENT` - BEREAVEMENT
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[TimeOffListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**started_after:** `typing.Optional[dt.datetime]` β If provided, will only return time-offs that started after this datetime.
+
+
+
+
+
+-
+
+**started_before:** `typing.Optional[dt.datetime]` β If provided, will only return time-offs that started before this datetime.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[TimeOffListRequestStatus]`
+
+If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED')
+
+- `REQUESTED` - REQUESTED
+- `APPROVED` - APPROVED
+- `DECLINED` - DECLINED
+- `CANCELLED` - CANCELLED
+- `DELETED` - DELETED
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.time_off.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `TimeOff` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.hris import TimeOffRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.time_off.create(
+ model=TimeOffRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `TimeOffRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.time_off.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `TimeOff` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.time_off.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TimeOffRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[TimeOffRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.time_off.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `TimeOff` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.time_off.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris TimeOffBalances
+client.hris.time_off_balances.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `TimeOffBalance` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.time_off_balances.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**employee_id:** `typing.Optional[str]` β If provided, will only return time off balances for this employee.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["employee"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**policy_type:** `typing.Optional[TimeOffBalancesListRequestPolicyType]`
+
+If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT')
+
+- `VACATION` - VACATION
+- `SICK` - SICK
+- `PERSONAL` - PERSONAL
+- `JURY_DUTY` - JURY_DUTY
+- `VOLUNTEER` - VOLUNTEER
+- `BEREAVEMENT` - BEREAVEMENT
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["policy_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.time_off_balances.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `TimeOffBalance` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.time_off_balances.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["employee"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["policy_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris TimesheetEntries
+client.hris.timesheet_entries.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `TimesheetEntry` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.timesheet_entries.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**employee_id:** `typing.Optional[str]` β If provided, will only return timesheet entries for this employee.
+
+
+
+
+
+-
+
+**ended_after:** `typing.Optional[str]` β If provided, will only return timesheet entries ended after this datetime.
+
+
+
+
+
+-
+
+**ended_before:** `typing.Optional[str]` β If provided, will only return timesheet entries ended before this datetime.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**order_by:** `typing.Optional[TimesheetEntriesListRequestOrderBy]` β Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**started_after:** `typing.Optional[str]` β If provided, will only return timesheet entries started after this datetime.
+
+
+
+
+
+-
+
+**started_before:** `typing.Optional[str]` β If provided, will only return timesheet entries started before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.timesheet_entries.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `TimesheetEntry` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.hris import TimesheetEntryRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.timesheet_entries.create(
+ model=TimesheetEntryRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `TimesheetEntryRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.timesheet_entries.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `TimesheetEntry` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.timesheet_entries.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.timesheet_entries.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `TimesheetEntry` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.timesheet_entries.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Hris WebhookReceivers
+client.hris.webhook_receivers.list()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `WebhookReceiver` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.webhook_receivers.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.hris.webhook_receivers.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `WebhookReceiver` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.webhook_receivers.create(
+ event="event",
+ is_active=True,
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**event:** `str`
+
+
+
+
+
+-
+
+**is_active:** `bool`
+
+
+
+
+
+-
+
+**key:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing AccountDetails
+client.ticketing.account_details.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get details for a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.account_details.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing AccountToken
+client.ticketing.account_token.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns the account token for the end user with the provided public token.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.account_token.retrieve(
+ public_token="public_token",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**public_token:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Accounts
+client.ticketing.accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Account` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.accounts.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Account` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.accounts.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing AsyncPassthrough
+client.ticketing.async_passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Asynchronously pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ticketing import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.async_passthrough.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Retrieves data from earlier async-passthrough POST request
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**async_passthrough_receipt_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Attachments
+client.ticketing.attachments.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Attachment` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.attachments.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["ticket"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_created_after:** `typing.Optional[dt.datetime]` β If provided, will only return attachments created in the third party platform after this datetime.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**ticket_id:** `typing.Optional[str]` β If provided, will only return comments for this ticket.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.attachments.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Attachment` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ticketing import AttachmentRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.attachments.create(
+ model=AttachmentRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `AttachmentRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.attachments.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Attachment` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.attachments.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["ticket"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.attachments.download_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns the `File` content with the given `id` as a stream of bytes.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.attachments.download_retrieve(
+ id="string",
+ mime_type="string",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**mime_type:** `typing.Optional[str]` β If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.attachments.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `TicketingAttachment` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.attachments.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing AuditTrail
+client.ticketing.audit_trail.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets a list of audit trail events.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.audit_trail.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred before this time
+
+
+
+
+
+-
+
+**event_type:** `typing.Optional[str]` β If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred after this time
+
+
+
+
+
+-
+
+**user_email:** `typing.Optional[str]` β If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing AvailableActions
+client.ticketing.available_actions.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of models and actions available for an account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.available_actions.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Collections
+client.ticketing.collections.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Collection` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.collections.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**collection_type:** `typing.Optional[str]` β If provided, will only return collections of the given type.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["parent_collection"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**parent_collection_id:** `typing.Optional[str]` β If provided, will only return collections whose parent collection matches the given id.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["collection_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["collection_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.collections.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Collection` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.collections.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["parent_collection"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["collection_type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["collection_type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.collections.users_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `User` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.collections.users_list(
+ parent_id="parent_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**parent_id:** `str`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CollectionsUsersListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Comments
+client.ticketing.comments.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Comment` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.comments.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CommentsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_created_after:** `typing.Optional[dt.datetime]` β If provided, will only return Comments created in the third party platform after this datetime.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**ticket_id:** `typing.Optional[str]` β If provided, will only return comments for this ticket.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.comments.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Comment` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ticketing import CommentRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.comments.create(
+ model=CommentRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `CommentRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.comments.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Comment` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.comments.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CommentsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.comments.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Comment` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.comments.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Contacts
+client.ticketing.contacts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Contact` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.contacts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["account"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.contacts.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Contact` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ticketing import ContactRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.contacts.create(
+ model=ContactRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `ContactRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.contacts.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Contact` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.contacts.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["account"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.contacts.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `TicketingContact` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.contacts.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Scopes
+client.ticketing.scopes.default_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.scopes.default_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.scopes.linked_account_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.scopes.linked_account_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.scopes.linked_account_scopes_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ticketing import (
+ IndividualCommonModelScopeDeserializerRequest,
+ ModelPermissionDeserializerRequest,
+)
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` β The common models you want to update the scopes for
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing DeleteAccount
+client.ticketing.delete_account.delete()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Delete a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.delete_account.delete()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing FieldMapping
+client.ticketing.field_mapping.field_mappings_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.field_mapping.field_mappings_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.field_mapping.field_mappings_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**target_field_name:** `str` β The name of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**target_field_description:** `str` β The description of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `str` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `str` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**common_model_name:** `str` β The name of the Common Model that the remote field corresponds to in a given category.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.field_mapping.field_mappings_destroy(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.field_mapping.field_mappings_partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `typing.Optional[str]` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `typing.Optional[str]` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.field_mapping.remote_fields_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.field_mapping.remote_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Optional[str]` β A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
+
+
+
+
+
+-
+
+**include_example_values:** `typing.Optional[str]` β If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.field_mapping.target_fields_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.field_mapping.target_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing GenerateKey
+client.ticketing.generate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create a remote key.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.generate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Issues
+client.ticketing.issues.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets all issues for Organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.issues.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_token:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred before this time
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**first_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was after this datetime.
+
+
+
+
+
+-
+
+**first_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was before this datetime.
+
+
+
+
+
+-
+
+**include_muted:** `typing.Optional[str]` β If true, will include muted issues
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**last_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was after this datetime.
+
+
+
+
+
+-
+
+**last_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was before this datetime.
+
+
+
+
+
+-
+
+**linked_account_id:** `typing.Optional[str]` β If provided, will only include issues pertaining to the linked account passed in.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred after this time
+
+
+
+
+
+-
+
+**status:** `typing.Optional[IssuesListRequestStatus]`
+
+Status of the issue. Options: ('ONGOING', 'RESOLVED')
+
+- `ONGOING` - ONGOING
+- `RESOLVED` - RESOLVED
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.issues.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get a specific issue.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.issues.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing LinkToken
+client.ticketing.link_token.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a link token to be used when linking a new end user.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**end_user_email_address:** `str` β Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `str` β Your end user's organization.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `str` β This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
+
+
+
+
+
+-
+
+**categories:** `typing.Sequence[CategoriesEnum]` β The integration categories to show in Merge Link.
+
+
+
+
+
+-
+
+**integration:** `typing.Optional[str]` β The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
+
+
+
+
+
+-
+
+**link_expiry_mins:** `typing.Optional[int]` β An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
+
+
+
+
+
+-
+
+**should_create_magic_link_url:** `typing.Optional[bool]` β Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**hide_admin_magic_link:** `typing.Optional[bool]` β Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` β An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
+
+
+
+
+
+-
+
+**category_common_model_scopes:** `typing.Optional[
+ typing.Dict[
+ str,
+ typing.Optional[
+ typing.Sequence[IndividualCommonModelScopeDeserializerRequest]
+ ],
+ ]
+]` β When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
+
+
+
+
+
+-
+
+**language:** `typing.Optional[str]` β The language code for the language to localize Merge Link to.
+
+
+
+
+
+-
+
+**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` β A JSON object containing integration-specific configuration options.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing LinkedAccounts
+client.ticketing.linked_accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+List linked accounts for your organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.linked_accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]`
+
+Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+- `hris` - hris
+- `ats` - ats
+- `accounting` - accounting
+- `ticketing` - ticketing
+- `crm` - crm
+- `mktg` - mktg
+- `filestorage` - filestorage
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_user_email_address:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given email address.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given organization name.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given origin ID.
+
+
+
+
+
+-
+
+**end_user_origin_ids:** `typing.Optional[str]` β Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
+
+
+
+
+
+-
+
+**id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**ids:** `typing.Optional[str]` β Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
+
+
+
+
+
+-
+
+**include_duplicates:** `typing.Optional[bool]` β If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given integration name.
+
+
+
+
+
+-
+
+**is_test_account:** `typing.Optional[str]` β If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[str]` β Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Passthrough
+client.ticketing.passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ticketing import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Projects
+client.ticketing.projects.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Project` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.projects.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.projects.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Project` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.projects.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.projects.users_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `User` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.projects.users_list(
+ parent_id="parent_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**parent_id:** `str`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ProjectsUsersListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing RegenerateKey
+client.ticketing.regenerate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Exchange remote keys.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.regenerate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Roles
+client.ticketing.roles.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Role` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.roles.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.roles.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Role` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.roles.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing SyncStatus
+client.ticketing.sync_status.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.sync_status.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing ForceResync
+client.ticketing.force_resync.sync_status_resync_create()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.force_resync.sync_status_resync_create()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Tags
+client.ticketing.tags.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Tag` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tags.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.tags.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Tag` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tags.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Teams
+client.ticketing.teams.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Team` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.teams.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.teams.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Team` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.teams.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Tickets
+client.ticketing.tickets.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Ticket` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tickets.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_id:** `typing.Optional[str]` β If provided, will only return tickets for this account.
+
+
+
+
+
+-
+
+**assignee_ids:** `typing.Optional[str]` β If provided, will only return tickets assigned to the assignee_ids; multiple assignee_ids can be separated by commas.
+
+
+
+
+
+-
+
+**collection_ids:** `typing.Optional[str]` β If provided, will only return tickets assigned to the collection_ids; multiple collection_ids can be separated by commas.
+
+
+
+
+
+-
+
+**completed_after:** `typing.Optional[dt.datetime]` β If provided, will only return tickets completed after this datetime.
+
+
+
+
+
+-
+
+**completed_before:** `typing.Optional[dt.datetime]` β If provided, will only return tickets completed before this datetime.
+
+
+
+
+
+-
+
+**contact_id:** `typing.Optional[str]` β If provided, will only return tickets for this contact.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**due_after:** `typing.Optional[dt.datetime]` β If provided, will only return tickets due after this datetime.
+
+
+
+
+
+-
+
+**due_before:** `typing.Optional[dt.datetime]` β If provided, will only return tickets due before this datetime.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TicketsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**parent_ticket_id:** `typing.Optional[str]` β If provided, will only return sub tickets of the parent_ticket_id.
+
+
+
+
+
+-
+
+**priority:** `typing.Optional[TicketsListRequestPriority]`
+
+If provided, will only return tickets of this priority.
+
+- `URGENT` - URGENT
+- `HIGH` - HIGH
+- `NORMAL` - NORMAL
+- `LOW` - LOW
+
+
+
+
+
+-
+
+**remote_created_after:** `typing.Optional[dt.datetime]` β If provided, will only return tickets created in the third party platform after this datetime.
+
+
+
+
+
+-
+
+**remote_created_before:** `typing.Optional[dt.datetime]` β If provided, will only return tickets created in the third party platform before this datetime.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[TicketsListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**remote_updated_after:** `typing.Optional[dt.datetime]` β If provided, will only return tickets updated in the third party platform after this datetime.
+
+
+
+
+
+-
+
+**remote_updated_before:** `typing.Optional[dt.datetime]` β If provided, will only return tickets updated in the third party platform before this datetime.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[TicketsListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**status:** `typing.Optional[TicketsListRequestStatus]`
+
+If provided, will only return tickets of this status.
+
+- `OPEN` - OPEN
+- `CLOSED` - CLOSED
+- `IN_PROGRESS` - IN_PROGRESS
+- `ON_HOLD` - ON_HOLD
+
+
+
+
+
+-
+
+**tags:** `typing.Optional[str]` β If provided, will only return tickets matching the tags; multiple tags can be separated by commas.
+
+
+
+
+
+-
+
+**ticket_type:** `typing.Optional[str]` β If provided, will only return tickets of this type.
+
+
+
+
+
+-
+
+**ticket_url:** `typing.Optional[str]` β If provided, will only return tickets where the URL matches or contains the substring
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.tickets.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Ticket` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ticketing import TicketRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tickets.create(
+ model=TicketRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `TicketRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.tickets.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Ticket` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tickets.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TicketsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[TicketsRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[TicketsRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.tickets.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates a `Ticket` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.ticketing import PatchedTicketRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tickets.partial_update(
+ id="id",
+ model=PatchedTicketRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `PatchedTicketRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.tickets.collaborators_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `User` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tickets.collaborators_list(
+ parent_id="parent_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**parent_id:** `str`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TicketsCollaboratorsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.tickets.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Ticket` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tickets.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.tickets.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Ticket` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tickets.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.tickets.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.tickets.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing Users
+client.ticketing.users.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `User` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.users.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**email_address:** `typing.Optional[str]` β If provided, will only return users with emails equal to this value (case insensitive).
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[UsersListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Whether to include data that was marked as deleted by third party webhooks.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.users.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `User` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.users.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[UsersRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Ticketing WebhookReceivers
+client.ticketing.webhook_receivers.list()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `WebhookReceiver` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.webhook_receivers.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.ticketing.webhook_receivers.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `WebhookReceiver` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.webhook_receivers.create(
+ event="event",
+ is_active=True,
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**event:** `str`
+
+
+
+
+
+-
+
+**is_active:** `bool`
+
+
+
+
+
+-
+
+**key:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting AccountDetails
+client.accounting.account_details.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get details for a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.account_details.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting AccountToken
+client.accounting.account_token.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns the account token for the end user with the provided public token.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.account_token.retrieve(
+ public_token="public_token",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**public_token:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting AccountingPeriods
+client.accounting.accounting_periods.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `AccountingPeriod` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.accounting_periods.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.accounting_periods.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `AccountingPeriod` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.accounting_periods.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Accounts
+client.accounting.accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Account` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return accounts for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[AccountsListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[AccountsListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.accounts.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Account` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import AccountRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.accounts.create(
+ model=AccountRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `AccountRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.accounts.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Account` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.accounts.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[AccountsRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[AccountsRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.accounts.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Account` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.accounts.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Addresses
+client.accounting.addresses.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Address` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.addresses.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting AsyncPassthrough
+client.accounting.async_passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Asynchronously pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.async_passthrough.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Retrieves data from earlier async-passthrough POST request
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**async_passthrough_receipt_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Attachments
+client.accounting.attachments.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `AccountingAttachment` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.attachments.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return accounting attachments for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.attachments.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `AccountingAttachment` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import AccountingAttachmentRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.attachments.create(
+ model=AccountingAttachmentRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `AccountingAttachmentRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.attachments.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `AccountingAttachment` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.attachments.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.attachments.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `AccountingAttachment` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.attachments.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting AuditTrail
+client.accounting.audit_trail.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets a list of audit trail events.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.audit_trail.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred before this time
+
+
+
+
+
+-
+
+**event_type:** `typing.Optional[str]` β If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include audit trail events that occurred after this time
+
+
+
+
+
+-
+
+**user_email:** `typing.Optional[str]` β If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting AvailableActions
+client.accounting.available_actions.retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of models and actions available for an account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.available_actions.retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting BalanceSheets
+client.accounting.balance_sheets.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `BalanceSheet` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.balance_sheets.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return balance sheets for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.balance_sheets.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `BalanceSheet` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.balance_sheets.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting CashFlowStatements
+client.accounting.cash_flow_statements.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `CashFlowStatement` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.cash_flow_statements.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return cash flow statements for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.cash_flow_statements.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `CashFlowStatement` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.cash_flow_statements.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting CompanyInfo
+client.accounting.company_info.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `CompanyInfo` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.company_info.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CompanyInfoListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.company_info.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `CompanyInfo` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.company_info.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CompanyInfoRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Contacts
+client.accounting.contacts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Contact` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.contacts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return contacts for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ContactsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_customer:** `typing.Optional[str]` β If provided, will only return Contacts that are denoted as customers.
+
+
+
+
+
+-
+
+**is_supplier:** `typing.Optional[str]` β If provided, will only return Contacts that are denoted as suppliers.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.contacts.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Contact` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import ContactRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.contacts.create(
+ model=ContactRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `ContactRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.contacts.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Contact` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.contacts.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ContactsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.contacts.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Contact` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.contacts.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.contacts.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.contacts.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting CreditNotes
+client.accounting.credit_notes.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `CreditNote` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.credit_notes.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return credit notes for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CreditNotesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[CreditNotesListRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[CreditNotesListRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**transaction_date_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**transaction_date_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.credit_notes.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `CreditNote` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.credit_notes.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[CreditNotesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[CreditNotesRetrieveRequestRemoteFields]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[CreditNotesRetrieveRequestShowEnumOrigins]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Scopes
+client.accounting.scopes.default_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.scopes.default_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.scopes.linked_account_scopes_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.scopes.linked_account_scopes_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.scopes.linked_account_scopes_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import (
+ IndividualCommonModelScopeDeserializerRequest,
+ ModelPermissionDeserializerRequest,
+)
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` β The common models you want to update the scopes for
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting DeleteAccount
+client.accounting.delete_account.delete()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Delete a linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.delete_account.delete()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Expenses
+client.accounting.expenses.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Expense` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.expenses.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return expenses for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ExpensesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**transaction_date_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**transaction_date_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.expenses.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Expense` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import ExpenseRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.expenses.create(
+ model=ExpenseRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `ExpenseRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.expenses.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Expense` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.expenses.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ExpensesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.expenses.lines_remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.expenses.lines_remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.expenses.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Expense` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.expenses.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.expenses.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.expenses.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting FieldMapping
+client.accounting.field_mapping.field_mappings_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.field_mapping.field_mappings_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.field_mapping.field_mappings_create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**target_field_name:** `str` β The name of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**target_field_description:** `str` β The description of the target field you want this remote field to map to.
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `str` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `str` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**common_model_name:** `str` β The name of the Common Model that the remote field corresponds to in a given category.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.field_mapping.field_mappings_destroy(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.field_mapping.field_mappings_partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**field_mapping_id:** `str`
+
+
+
+
+
+-
+
+**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` β The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
+
+
+
+
+
+-
+
+**remote_method:** `typing.Optional[str]` β The method of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**remote_url_path:** `typing.Optional[str]` β The path of the remote endpoint where the remote field is coming from.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.field_mapping.remote_fields_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.field_mapping.remote_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**common_models:** `typing.Optional[str]` β A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
+
+
+
+
+
+-
+
+**include_example_values:** `typing.Optional[str]` β If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.field_mapping.target_fields_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.field_mapping.target_fields_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting GenerateKey
+client.accounting.generate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Create a remote key.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.generate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting IncomeStatements
+client.accounting.income_statements.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `IncomeStatement` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.income_statements.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return income statements for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.income_statements.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `IncomeStatement` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.income_statements.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Invoices
+client.accounting.invoices.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Invoice` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.invoices.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return invoices for this company.
+
+
+
+
+
+-
+
+**contact_id:** `typing.Optional[str]` β If provided, will only return invoices for this contact.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[InvoicesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**issue_date_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**issue_date_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**type:** `typing.Optional[InvoicesListRequestType]`
+
+If provided, will only return Invoices with this type
+
+- `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
+- `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.invoices.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates an `Invoice` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import InvoiceRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.invoices.create(
+ model=InvoiceRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `InvoiceRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.invoices.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Invoice` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.invoices.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[InvoicesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["type"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.invoices.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates an `Invoice` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import InvoiceRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.invoices.partial_update(
+ id="id",
+ model=InvoiceRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `InvoiceRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.invoices.line_items_remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.invoices.line_items_remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.invoices.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Invoice` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.invoices.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.invoices.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Invoice` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.invoices.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.invoices.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.invoices.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Issues
+client.accounting.issues.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Gets all issues for Organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.issues.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_token:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred before this time
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**first_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was after this datetime.
+
+
+
+
+
+-
+
+**first_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose first incident time was before this datetime.
+
+
+
+
+
+-
+
+**include_muted:** `typing.Optional[str]` β If true, will include muted issues
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**last_incident_time_after:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was after this datetime.
+
+
+
+
+
+-
+
+**last_incident_time_before:** `typing.Optional[dt.datetime]` β If provided, will only return issues whose last incident time was before this datetime.
+
+
+
+
+
+-
+
+**linked_account_id:** `typing.Optional[str]` β If provided, will only include issues pertaining to the linked account passed in.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**start_date:** `typing.Optional[str]` β If included, will only include issues whose most recent action occurred after this time
+
+
+
+
+
+-
+
+**status:** `typing.Optional[IssuesListRequestStatus]`
+
+Status of the issue. Options: ('ONGOING', 'RESOLVED')
+
+- `ONGOING` - ONGOING
+- `RESOLVED` - RESOLVED
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.issues.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get a specific issue.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.issues.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Items
+client.accounting.items.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Item` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.items.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return items for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ItemsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.items.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `Item` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.items.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[ItemsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting JournalEntries
+client.accounting.journal_entries.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `JournalEntry` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.journal_entries.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return journal entries for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[JournalEntriesListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**transaction_date_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**transaction_date_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.journal_entries.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `JournalEntry` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import JournalEntryRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.journal_entries.create(
+ model=JournalEntryRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `JournalEntryRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.journal_entries.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `JournalEntry` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.journal_entries.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[JournalEntriesRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.journal_entries.lines_remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.journal_entries.lines_remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.journal_entries.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `JournalEntry` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.journal_entries.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.journal_entries.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.journal_entries.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting LinkToken
+client.accounting.link_token.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a link token to be used when linking a new end user.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**end_user_email_address:** `str` β Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `str` β Your end user's organization.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `str` β This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
+
+
+
+
+
+-
+
+**categories:** `typing.Sequence[CategoriesEnum]` β The integration categories to show in Merge Link.
+
+
+
+
+
+-
+
+**integration:** `typing.Optional[str]` β The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
+
+
+
+
+
+-
+
+**link_expiry_mins:** `typing.Optional[int]` β An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
+
+
+
+
+
+-
+
+**should_create_magic_link_url:** `typing.Optional[bool]` β Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**hide_admin_magic_link:** `typing.Optional[bool]` β Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
+
+
+
+
+-
+
+**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` β An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
+
+
+
+
+
+-
+
+**category_common_model_scopes:** `typing.Optional[
+ typing.Dict[
+ str,
+ typing.Optional[
+ typing.Sequence[IndividualCommonModelScopeDeserializerRequest]
+ ],
+ ]
+]` β When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
+
+
+
+
+
+-
+
+**language:** `typing.Optional[LanguageEnum]`
+
+The following subset of IETF language tags can be used to configure localization.
+
+* `en` - en
+* `de` - de
+
+
+
+
+
+-
+
+**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` β A JSON object containing integration-specific configuration options.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting LinkedAccounts
+client.accounting.linked_accounts.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+List linked accounts for your organization.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.linked_accounts.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]`
+
+Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+- `hris` - hris
+- `ats` - ats
+- `accounting` - accounting
+- `ticketing` - ticketing
+- `crm` - crm
+- `mktg` - mktg
+- `filestorage` - filestorage
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**end_user_email_address:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given email address.
+
+
+
+
+
+-
+
+**end_user_organization_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given organization name.
+
+
+
+
+
+-
+
+**end_user_origin_id:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given origin ID.
+
+
+
+
+
+-
+
+**end_user_origin_ids:** `typing.Optional[str]` β Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
+
+
+
+
+
+-
+
+**id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**ids:** `typing.Optional[str]` β Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
+
+
+
+
+
+-
+
+**include_duplicates:** `typing.Optional[bool]` β If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
+
+
+
+
+
+-
+
+**integration_name:** `typing.Optional[str]` β If provided, will only return linked accounts associated with the given integration name.
+
+
+
+
+
+-
+
+**is_test_account:** `typing.Optional[str]` β If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**status:** `typing.Optional[str]` β Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Passthrough
+client.accounting.passthrough.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import DataPassthroughRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request:** `DataPassthroughRequest`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Payments
+client.accounting.payments.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Payment` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payments.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**account_id:** `typing.Optional[str]` β If provided, will only return payments for this account.
+
+
+
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return payments for this company.
+
+
+
+
+
+-
+
+**contact_id:** `typing.Optional[str]` β If provided, will only return payments for this contact.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[PaymentsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**transaction_date_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**transaction_date_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.payments.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `Payment` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import PaymentRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payments.create(
+ model=PaymentRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `PaymentRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.payments.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Payment` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payments.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[PaymentsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.payments.partial_update(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Updates a `Payment` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import PatchedPaymentRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payments.partial_update(
+ id="id",
+ model=PatchedPaymentRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**model:** `PatchedPaymentRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.payments.line_items_remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payments.line_items_remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.payments.meta_patch_retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Payment` PATCHs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payments.meta_patch_retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.payments.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `Payment` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payments.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.payments.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payments.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting PhoneNumbers
+client.accounting.phone_numbers.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns an `AccountingPhoneNumber` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.phone_numbers.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting PurchaseOrders
+client.accounting.purchase_orders.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `PurchaseOrder` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.purchase_orders.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return purchase orders for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[PurchaseOrdersListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**issue_date_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**issue_date_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.purchase_orders.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `PurchaseOrder` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+from merge.resources.accounting import PurchaseOrderRequest
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.purchase_orders.create(
+ model=PurchaseOrderRequest(),
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**model:** `PurchaseOrderRequest`
+
+
+
+
+
+-
+
+**is_debug_mode:** `typing.Optional[bool]` β Whether to include debug fields (such as log file links) in the response.
+
+
+
+
+
+-
+
+**run_async:** `typing.Optional[bool]` β Whether or not third-party updates should be run asynchronously.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.purchase_orders.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `PurchaseOrder` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.purchase_orders.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[PurchaseOrdersRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_remote_fields:** `typing.Optional[bool]` β Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.purchase_orders.line_items_remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.purchase_orders.line_items_remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.purchase_orders.meta_post_retrieve()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns metadata for `PurchaseOrder` POSTs.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.purchase_orders.meta_post_retrieve()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.purchase_orders.remote_field_classes_list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.purchase_orders.remote_field_classes_list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**is_common_model_field:** `typing.Optional[bool]` β If provided, will only return remote field classes with this is_common_model_field value
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting RegenerateKey
+client.accounting.regenerate_key.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Exchange remote keys.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.regenerate_key.create(
+ name="Remote Deployment Key 1",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**name:** `str` β The name of the remote key
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting SyncStatus
+client.accounting.sync_status.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.sync_status.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting ForceResync
+client.accounting.force_resync.sync_status_resync_create()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.force_resync.sync_status_resync_create()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting TaxRates
+client.accounting.tax_rates.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `TaxRate` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.tax_rates.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return tax rates for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.tax_rates.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `TaxRate` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.tax_rates.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting TrackingCategories
+client.accounting.tracking_categories.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `TrackingCategory` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.tracking_categories.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return tracking categories for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.tracking_categories.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `TrackingCategory` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.tracking_categories.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[typing.Literal["company"]]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**remote_fields:** `typing.Optional[typing.Literal["status"]]` β Deprecated. Use show_enum_origins.
+
+
+
+
+
+-
+
+**show_enum_origins:** `typing.Optional[typing.Literal["status"]]` β A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting Transactions
+client.accounting.transactions.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `Transaction` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.transactions.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return accounting transactions for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TransactionsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**transaction_date_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**transaction_date_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.transactions.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `Transaction` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.transactions.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[TransactionsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting VendorCredits
+client.accounting.vendor_credits.list(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `VendorCredit` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.vendor_credits.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]` β If provided, will only return vendor credits for this company.
+
+
+
+
+
+-
+
+**created_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**created_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` β The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[VendorCreditsListRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_deleted_data:** `typing.Optional[bool]` β Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**include_shell_data:** `typing.Optional[bool]` β Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+
+
+
+
+-
+
+**modified_after:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge after this date time will be returned.
+
+
+
+
+
+-
+
+**modified_before:** `typing.Optional[dt.datetime]` β If provided, only objects synced by Merge before this date time will be returned.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` β Number of results to return per page.
+
+
+
+
+
+-
+
+**remote_id:** `typing.Optional[str]` β The API provider's ID for the given object.
+
+
+
+
+
+-
+
+**transaction_date_after:** `typing.Optional[dt.datetime]` β If provided, will only return objects created after this datetime.
+
+
+
+
+
+-
+
+**transaction_date_before:** `typing.Optional[dt.datetime]` β If provided, will only return objects created before this datetime.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.vendor_credits.retrieve(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a `VendorCredit` object with the given `id`.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.vendor_credits.retrieve(
+ id="id",
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[VendorCreditsRetrieveRequestExpand]` β Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
+
+
+
+
+
+-
+
+**include_remote_data:** `typing.Optional[bool]` β Whether to include the original data Merge fetched from the third-party to produce these models.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting WebhookReceivers
+client.accounting.webhook_receivers.list()
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Returns a list of `WebhookReceiver` objects.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.webhook_receivers.list()
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.webhook_receivers.create(...)
+
+-
+
+#### π Description
+
+
+-
+
+
+-
+
+Creates a `WebhookReceiver` object with the given values.
+
+
+
+
+
+#### π Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.webhook_receivers.create(
+ event="event",
+ is_active=True,
+)
+
+```
+
+
+
+
+
+#### βοΈ Parameters
+
+
+-
+
+
+-
+
+**event:** `str`
+
+
+
+
+
+-
+
+**is_active:** `bool`
+
+
+
+
+
+-
+
+**key:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` β Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/merge/__init__.py b/src/merge/__init__.py
index 989d4b2a..56aa2f0a 100644
--- a/src/merge/__init__.py
+++ b/src/merge/__init__.py
@@ -1,7 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
from .resources import accounting, ats, crm, filestorage, hris, ticketing
+from .client import AsyncMerge, Merge
from .environment import MergeEnvironment
from .version import __version__
-__all__ = ["MergeEnvironment", "__version__", "accounting", "ats", "crm", "filestorage", "hris", "ticketing"]
+__all__ = [
+ "AsyncMerge",
+ "Merge",
+ "MergeEnvironment",
+ "__version__",
+ "accounting",
+ "ats",
+ "crm",
+ "filestorage",
+ "hris",
+ "ticketing",
+]
diff --git a/src/merge/client.py b/src/merge/client.py
index 82d29185..f9d48a55 100644
--- a/src/merge/client.py
+++ b/src/merge/client.py
@@ -1,17 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
-import httpx
-
-from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .environment import MergeEnvironment
-from .resources.accounting.client import AccountingClient, AsyncAccountingClient
-from .resources.ats.client import AsyncAtsClient, AtsClient
-from .resources.crm.client import AsyncCrmClient, CrmClient
-from .resources.filestorage.client import AsyncFilestorageClient, FilestorageClient
-from .resources.hris.client import AsyncHrisClient, HrisClient
-from .resources.ticketing.client import AsyncTicketingClient, TicketingClient
+import httpx
+from .core.client_wrapper import SyncClientWrapper
+from .resources.ats.client import AtsClient
+from .resources.filestorage.client import FilestorageClient
+from .resources.crm.client import CrmClient
+from .resources.hris.client import HrisClient
+from .resources.ticketing.client import TicketingClient
+from .resources.accounting.client import AccountingClient
+from .core.client_wrapper import AsyncClientWrapper
+from .resources.ats.client import AsyncAtsClient
+from .resources.filestorage.client import AsyncFilestorageClient
+from .resources.crm.client import AsyncCrmClient
+from .resources.hris.client import AsyncHrisClient
+from .resources.ticketing.client import AsyncTicketingClient
+from .resources.accounting.client import AsyncAccountingClient
class Merge:
@@ -45,7 +50,7 @@ class Merge:
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -62,7 +67,7 @@ def __init__(
api_key: typing.Union[str, typing.Callable[[], str]],
timeout: typing.Optional[float] = None,
follow_redirects: typing.Optional[bool] = True,
- httpx_client: typing.Optional[httpx.Client] = None
+ httpx_client: typing.Optional[httpx.Client] = None,
):
_defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None
self._client_wrapper = SyncClientWrapper(
@@ -77,8 +82,8 @@ def __init__(
timeout=_defaulted_timeout,
)
self.ats = AtsClient(client_wrapper=self._client_wrapper)
- self.crm = CrmClient(client_wrapper=self._client_wrapper)
self.filestorage = FilestorageClient(client_wrapper=self._client_wrapper)
+ self.crm = CrmClient(client_wrapper=self._client_wrapper)
self.hris = HrisClient(client_wrapper=self._client_wrapper)
self.ticketing = TicketingClient(client_wrapper=self._client_wrapper)
self.accounting = AccountingClient(client_wrapper=self._client_wrapper)
@@ -115,7 +120,7 @@ class AsyncMerge:
Examples
--------
- from merge.client import AsyncMerge
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -132,7 +137,7 @@ def __init__(
api_key: typing.Union[str, typing.Callable[[], str]],
timeout: typing.Optional[float] = None,
follow_redirects: typing.Optional[bool] = True,
- httpx_client: typing.Optional[httpx.AsyncClient] = None
+ httpx_client: typing.Optional[httpx.AsyncClient] = None,
):
_defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None
self._client_wrapper = AsyncClientWrapper(
@@ -147,8 +152,8 @@ def __init__(
timeout=_defaulted_timeout,
)
self.ats = AsyncAtsClient(client_wrapper=self._client_wrapper)
- self.crm = AsyncCrmClient(client_wrapper=self._client_wrapper)
self.filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper)
+ self.crm = AsyncCrmClient(client_wrapper=self._client_wrapper)
self.hris = AsyncHrisClient(client_wrapper=self._client_wrapper)
self.ticketing = AsyncTicketingClient(client_wrapper=self._client_wrapper)
self.accounting = AsyncAccountingClient(client_wrapper=self._client_wrapper)
diff --git a/src/merge/core/__init__.py b/src/merge/core/__init__.py
index 58ad52ad..f03aecbf 100644
--- a/src/merge/core/__init__.py
+++ b/src/merge/core/__init__.py
@@ -3,28 +3,45 @@
from .api_error import ApiError
from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper
from .datetime_utils import serialize_datetime
-from .file import File, convert_file_dict_to_httpx_tuples
+from .file import File, convert_file_dict_to_httpx_tuples, with_content_type
from .http_client import AsyncHttpClient, HttpClient
from .jsonable_encoder import jsonable_encoder
-from .pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from .pydantic_utilities import (
+ IS_PYDANTIC_V2,
+ UniversalBaseModel,
+ UniversalRootModel,
+ parse_obj_as,
+ universal_field_validator,
+ universal_root_validator,
+ update_forward_refs,
+)
from .query_encoder import encode_query
from .remove_none_from_dict import remove_none_from_dict
from .request_options import RequestOptions
+from .serialization import FieldMetadata, convert_and_respect_annotation_metadata
__all__ = [
"ApiError",
"AsyncClientWrapper",
"AsyncHttpClient",
"BaseClientWrapper",
+ "FieldMetadata",
"File",
"HttpClient",
+ "IS_PYDANTIC_V2",
"RequestOptions",
"SyncClientWrapper",
+ "UniversalBaseModel",
+ "UniversalRootModel",
+ "convert_and_respect_annotation_metadata",
"convert_file_dict_to_httpx_tuples",
- "deep_union_pydantic_dicts",
"encode_query",
"jsonable_encoder",
- "pydantic_v1",
+ "parse_obj_as",
"remove_none_from_dict",
"serialize_datetime",
+ "universal_field_validator",
+ "universal_root_validator",
+ "update_forward_refs",
+ "with_content_type",
]
diff --git a/src/merge/core/client_wrapper.py b/src/merge/core/client_wrapper.py
index 30848d13..13489117 100644
--- a/src/merge/core/client_wrapper.py
+++ b/src/merge/core/client_wrapper.py
@@ -1,10 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
import httpx
-
-from .http_client import AsyncHttpClient, HttpClient
+from .http_client import HttpClient
+from .http_client import AsyncHttpClient
class BaseClientWrapper:
@@ -25,7 +24,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "MergePythonClient",
- "X-Fern-SDK-Version": "1.0.13",
+ "X-Fern-SDK-Version": "1.1.0",
}
if self._account_token is not None:
headers["X-Account-Token"] = self._account_token
diff --git a/src/merge/core/file.py b/src/merge/core/file.py
index cb0d40bb..b4cbba30 100644
--- a/src/merge/core/file.py
+++ b/src/merge/core/file.py
@@ -1,25 +1,30 @@
# This file was auto-generated by Fern from our API Definition.
-import typing
+from typing import IO, Dict, List, Mapping, Optional, Tuple, Union, cast
# File typing inspired by the flexibility of types within the httpx library
# https://github.com/encode/httpx/blob/master/httpx/_types.py
-FileContent = typing.Union[typing.IO[bytes], bytes, str]
-File = typing.Union[
+FileContent = Union[IO[bytes], bytes, str]
+File = Union[
# file (or bytes)
FileContent,
# (filename, file (or bytes))
- typing.Tuple[typing.Optional[str], FileContent],
+ Tuple[Optional[str], FileContent],
# (filename, file (or bytes), content_type)
- typing.Tuple[typing.Optional[str], FileContent, typing.Optional[str]],
+ Tuple[Optional[str], FileContent, Optional[str]],
# (filename, file (or bytes), content_type, headers)
- typing.Tuple[typing.Optional[str], FileContent, typing.Optional[str], typing.Mapping[str, str]],
+ Tuple[
+ Optional[str],
+ FileContent,
+ Optional[str],
+ Mapping[str, str],
+ ],
]
def convert_file_dict_to_httpx_tuples(
- d: typing.Dict[str, typing.Union[File, typing.List[File]]]
-) -> typing.List[typing.Tuple[str, File]]:
+ d: Dict[str, Union[File, List[File]]],
+) -> List[Tuple[str, File]]:
"""
The format we use is a list of tuples, where the first element is the
name of the file and the second is the file object. Typically HTTPX wants
@@ -36,3 +41,22 @@ def convert_file_dict_to_httpx_tuples(
else:
httpx_tuples.append((key, file_like))
return httpx_tuples
+
+
+def with_content_type(*, file: File, content_type: str) -> File:
+ """ """
+ if isinstance(file, tuple):
+ if len(file) == 2:
+ filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore
+ return (filename, content, content_type)
+ elif len(file) == 3:
+ filename, content, _ = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore
+ return (filename, content, content_type)
+ elif len(file) == 4:
+ filename, content, _, headers = cast( # type: ignore
+ Tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], file
+ )
+ return (filename, content, content_type, headers)
+ else:
+ raise ValueError(f"Unexpected tuple length: {len(file)}")
+ return (None, file, content_type)
diff --git a/src/merge/core/http_client.py b/src/merge/core/http_client.py
index ed7cf5d3..da500733 100644
--- a/src/merge/core/http_client.py
+++ b/src/merge/core/http_client.py
@@ -2,6 +2,7 @@
import asyncio
import email.utils
+import json
import re
import time
import typing
@@ -89,7 +90,8 @@ def _should_retry(response: httpx.Response) -> bool:
def remove_omit_from_dict(
- original: typing.Dict[str, typing.Optional[typing.Any]], omit: typing.Optional[typing.Any]
+ original: typing.Dict[str, typing.Optional[typing.Any]],
+ omit: typing.Optional[typing.Any],
) -> typing.Dict[str, typing.Any]:
if omit is None:
return original
@@ -107,7 +109,7 @@ def maybe_filter_request_body(
) -> typing.Optional[typing.Any]:
if data is None:
return (
- jsonable_encoder(request_options.get("additional_body_parameters", {}))
+ jsonable_encoder(request_options.get("additional_body_parameters", {})) or {}
if request_options is not None
else None
)
@@ -117,7 +119,7 @@ def maybe_filter_request_body(
data_content = {
**(jsonable_encoder(remove_omit_from_dict(data, omit))), # type: ignore
**(
- jsonable_encoder(request_options.get("additional_body_parameters", {}))
+ jsonable_encoder(request_options.get("additional_body_parameters", {})) or {}
if request_options is not None
else {}
),
@@ -125,6 +127,26 @@ def maybe_filter_request_body(
return data_content
+# Abstracted out for testing purposes
+def get_request_body(
+ *,
+ json: typing.Optional[typing.Any],
+ data: typing.Optional[typing.Any],
+ request_options: typing.Optional[RequestOptions],
+ omit: typing.Optional[typing.Any],
+) -> typing.Tuple[typing.Optional[typing.Any], typing.Optional[typing.Any]]:
+ json_body = None
+ data_body = None
+ if data is not None:
+ data_body = maybe_filter_request_body(data, request_options, omit)
+ else:
+ # If both data and json are None, we send json data in the event extra properties are specified
+ json_body = maybe_filter_request_body(json, request_options, omit)
+
+ # If you have an empty JSON body, you should just send None
+ return (json_body if json_body != {} else None), data_body if data_body != {} else None
+
+
class HttpClient:
def __init__(
self,
@@ -168,6 +190,8 @@ def request(
else self.base_timeout
)
+ json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+
response = self.httpx_client.request(
method=method,
url=urllib.parse.urljoin(f"{base_url}/", path),
@@ -176,7 +200,7 @@ def request(
{
**self.base_headers,
**(headers if headers is not None else {}),
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
+ **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}),
}
)
),
@@ -187,7 +211,7 @@ def request(
{
**(params if params is not None else {}),
**(
- request_options.get("additional_query_parameters", {})
+ request_options.get("additional_query_parameters", {}) or {}
if request_options is not None
else {}
),
@@ -197,10 +221,12 @@ def request(
)
)
),
- json=maybe_filter_request_body(json, request_options, omit),
- data=maybe_filter_request_body(data, request_options, omit),
+ 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_none_from_dict(files))
+ if (files is not None and files is not omit)
+ else None,
timeout=timeout,
)
@@ -248,6 +274,8 @@ def stream(
else self.base_timeout
)
+ json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+
with self.httpx_client.stream(
method=method,
url=urllib.parse.urljoin(f"{base_url}/", path),
@@ -277,10 +305,12 @@ def stream(
)
)
),
- json=maybe_filter_request_body(json, request_options, omit),
- data=maybe_filter_request_body(data, request_options, omit),
+ 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_none_from_dict(files))
+ if (files is not None and files is not omit)
+ else None,
timeout=timeout,
) as stream:
yield stream
@@ -329,6 +359,8 @@ async def request(
else self.base_timeout
)
+ json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+
# Add the input to each of these and do None-safety checks
response = await self.httpx_client.request(
method=method,
@@ -338,7 +370,7 @@ async def request(
{
**self.base_headers,
**(headers if headers is not None else {}),
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
+ **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}),
}
)
),
@@ -349,7 +381,7 @@ async def request(
{
**(params if params is not None else {}),
**(
- request_options.get("additional_query_parameters", {})
+ request_options.get("additional_query_parameters", {}) or {}
if request_options is not None
else {}
),
@@ -359,8 +391,8 @@ async def request(
)
)
),
- json=maybe_filter_request_body(json, request_options, omit),
- data=maybe_filter_request_body(data, request_options, omit),
+ 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,
timeout=timeout,
@@ -409,6 +441,8 @@ async def stream(
else self.base_timeout
)
+ json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
+
async with self.httpx_client.stream(
method=method,
url=urllib.parse.urljoin(f"{base_url}/", path),
@@ -438,8 +472,8 @@ async def stream(
)
)
),
- json=maybe_filter_request_body(json, request_options, omit),
- data=maybe_filter_request_body(data, request_options, omit),
+ 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,
timeout=timeout,
diff --git a/src/merge/core/jsonable_encoder.py b/src/merge/core/jsonable_encoder.py
index 7f482732..1b631e90 100644
--- a/src/merge/core/jsonable_encoder.py
+++ b/src/merge/core/jsonable_encoder.py
@@ -8,33 +8,27 @@
https://github.com/tiangolo/fastapi/blob/master/fastapi/encoders.py
"""
+import base64
import dataclasses
import datetime as dt
-from collections import defaultdict
from enum import Enum
from pathlib import PurePath
from types import GeneratorType
-from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
+from typing import Any, Callable, Dict, List, Optional, Set, Union
+
+import pydantic
from .datetime_utils import serialize_datetime
-from .pydantic_utilities import pydantic_v1
+from .pydantic_utilities import (
+ IS_PYDANTIC_V2,
+ encode_by_type,
+ to_jsonable_with_fallback,
+)
SetIntStr = Set[Union[int, str]]
DictIntStrAny = Dict[Union[int, str], Any]
-def generate_encoders_by_class_tuples(
- type_encoder_map: Dict[Any, Callable[[Any], Any]]
-) -> Dict[Callable[[Any], Any], Tuple[Any, ...]]:
- encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(tuple)
- for type_, encoder in type_encoder_map.items():
- encoders_by_class_tuples[encoder] += (type_,)
- return encoders_by_class_tuples
-
-
-encoders_by_class_tuples = generate_encoders_by_class_tuples(pydantic_v1.json.ENCODERS_BY_TYPE)
-
-
def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any], Any]]] = None) -> Any:
custom_encoder = custom_encoder or {}
if custom_encoder:
@@ -44,17 +38,24 @@ def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any]
for encoder_type, encoder_instance in custom_encoder.items():
if isinstance(obj, encoder_type):
return encoder_instance(obj)
- if isinstance(obj, pydantic_v1.BaseModel):
- encoder = getattr(obj.__config__, "json_encoders", {})
+ if isinstance(obj, pydantic.BaseModel):
+ if IS_PYDANTIC_V2:
+ encoder = getattr(obj.model_config, "json_encoders", {}) # type: ignore # Pydantic v2
+ else:
+ encoder = getattr(obj.__config__, "json_encoders", {}) # type: ignore # Pydantic v1
if custom_encoder:
encoder.update(custom_encoder)
obj_dict = obj.dict(by_alias=True)
if "__root__" in obj_dict:
obj_dict = obj_dict["__root__"]
+ if "root" in obj_dict:
+ obj_dict = obj_dict["root"]
return jsonable_encoder(obj_dict, custom_encoder=encoder)
if dataclasses.is_dataclass(obj):
- obj_dict = dataclasses.asdict(obj)
+ obj_dict = dataclasses.asdict(obj) # type: ignore
return jsonable_encoder(obj_dict, custom_encoder=custom_encoder)
+ if isinstance(obj, bytes):
+ return base64.b64encode(obj).decode("utf-8")
if isinstance(obj, Enum):
return obj.value
if isinstance(obj, PurePath):
@@ -80,20 +81,21 @@ def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any]
encoded_list.append(jsonable_encoder(item, custom_encoder=custom_encoder))
return encoded_list
- if type(obj) in pydantic_v1.json.ENCODERS_BY_TYPE:
- return pydantic_v1.json.ENCODERS_BY_TYPE[type(obj)](obj)
- for encoder, classes_tuple in encoders_by_class_tuples.items():
- if isinstance(obj, classes_tuple):
- return encoder(obj)
+ def fallback_serializer(o: Any) -> Any:
+ attempt_encode = encode_by_type(o)
+ if attempt_encode is not None:
+ return attempt_encode
- try:
- data = dict(obj)
- except Exception as e:
- errors: List[Exception] = []
- errors.append(e)
try:
- data = vars(obj)
+ data = dict(o)
except Exception as e:
+ errors: List[Exception] = []
errors.append(e)
- raise ValueError(errors) from e
- return jsonable_encoder(data, custom_encoder=custom_encoder)
+ try:
+ data = vars(o)
+ except Exception as e:
+ errors.append(e)
+ raise ValueError(errors) from e
+ return jsonable_encoder(data, custom_encoder=custom_encoder)
+
+ return to_jsonable_with_fallback(obj, fallback_serializer)
diff --git a/src/merge/core/pydantic_utilities.py b/src/merge/core/pydantic_utilities.py
index a72c1a52..34b1136c 100644
--- a/src/merge/core/pydantic_utilities.py
+++ b/src/merge/core/pydantic_utilities.py
@@ -1,15 +1,149 @@
# This file was auto-generated by Fern from our API Definition.
+# nopycln: file
+import datetime as dt
import typing
+from collections import defaultdict
+
+import typing_extensions
import pydantic
+from .datetime_utils import serialize_datetime
+
IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
if IS_PYDANTIC_V2:
- import pydantic.v1 as pydantic_v1 # type: ignore # nopycln: import
+ # isort will try to reformat the comments on these imports, which breaks mypy
+ # isort: off
+ from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
+ parse_date as parse_date,
+ )
+ from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2
+ parse_datetime as parse_datetime,
+ )
+ from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
+ ENCODERS_BY_TYPE as encoders_by_type,
+ )
+ from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
+ get_args as get_args,
+ )
+ from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
+ get_origin as get_origin,
+ )
+ from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
+ is_literal_type as is_literal_type,
+ )
+ from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2
+ is_union as is_union,
+ )
+ from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2
else:
- import pydantic as pydantic_v1 # type: ignore # nopycln: import
+ from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1
+ from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1
+ from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1
+ from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1
+ from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1
+ from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1
+ from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1
+ from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1
+
+ # isort: on
+
+
+T = typing.TypeVar("T")
+Model = typing.TypeVar("Model", bound=pydantic.BaseModel)
+
+
+def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T:
+ if IS_PYDANTIC_V2:
+ adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2
+ return adapter.validate_python(object_)
+ else:
+ return pydantic.parse_obj_as(type_, object_)
+
+
+def to_jsonable_with_fallback(
+ obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any]
+) -> typing.Any:
+ if IS_PYDANTIC_V2:
+ from pydantic_core import to_jsonable_python
+
+ return to_jsonable_python(obj, fallback=fallback_serializer)
+ else:
+ return fallback_serializer(obj)
+
+
+class UniversalBaseModel(pydantic.BaseModel):
+ class Config:
+ populate_by_name = True
+ smart_union = True
+ allow_population_by_field_name = True
+ json_encoders = {dt.datetime: serialize_datetime}
+ # Allow fields begining with `model_` to be used in the model
+ protected_namespaces = ()
+
+ def json(self, **kwargs: typing.Any) -> str:
+ kwargs_with_defaults: typing.Any = {
+ "by_alias": True,
+ "exclude_unset": True,
+ **kwargs,
+ }
+ if IS_PYDANTIC_V2:
+ return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2
+ else:
+ return super().json(**kwargs_with_defaults)
+
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
+ """
+ Override the default dict method to `exclude_unset` by default. This function patches
+ `exclude_unset` to work include fields within non-None default values.
+ """
+ # Note: the logic here is multi-plexed given the levers exposed in Pydantic V1 vs V2
+ # Pydantic V1's .dict can be extremely slow, so we do not want to call it twice.
+ #
+ # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models
+ # that we have less control over, and this is less intrusive than custom serializers for now.
+ if IS_PYDANTIC_V2:
+ kwargs_with_defaults_exclude_unset: typing.Any = {
+ **kwargs,
+ "by_alias": True,
+ "exclude_unset": True,
+ "exclude_none": False,
+ }
+ kwargs_with_defaults_exclude_none: typing.Any = {
+ **kwargs,
+ "by_alias": True,
+ "exclude_none": True,
+ "exclude_unset": False,
+ }
+ return deep_union_pydantic_dicts(
+ super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2
+ super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2
+ )
+
+ else:
+ _fields_set = self.__fields_set__
+
+ fields = _get_model_fields(self.__class__)
+ for name, field in fields.items():
+ if name not in _fields_set:
+ default = _get_field_default(field)
+
+ # If the default values are non-null act like they've been set
+ # This effectively allows exclude_unset to work like exclude_none where
+ # the latter passes through intentionally set none values.
+ if default != None:
+ _fields_set.add(name)
+
+ kwargs_with_defaults_exclude_unset_include_fields: typing.Any = {
+ "by_alias": True,
+ "exclude_unset": True,
+ "include": _fields_set,
+ **kwargs,
+ }
+
+ return super().dict(**kwargs_with_defaults_exclude_unset_include_fields)
def deep_union_pydantic_dicts(
@@ -25,4 +159,84 @@ def deep_union_pydantic_dicts(
return destination
-__all__ = ["pydantic_v1"]
+if IS_PYDANTIC_V2:
+
+ class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2
+ pass
+
+ UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore
+else:
+ UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore
+
+
+def encode_by_type(o: typing.Any) -> typing.Any:
+ encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = (
+ defaultdict(tuple)
+ )
+ for type_, encoder in encoders_by_type.items():
+ encoders_by_class_tuples[encoder] += (type_,)
+
+ if type(o) in encoders_by_type:
+ return encoders_by_type[type(o)](o)
+ for encoder, classes_tuple in encoders_by_class_tuples.items():
+ if isinstance(o, classes_tuple):
+ return encoder(o)
+
+
+def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None:
+ if IS_PYDANTIC_V2:
+ model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2
+ else:
+ model.update_forward_refs(**localns)
+
+
+# Mirrors Pydantic's internal typing
+AnyCallable = typing.Callable[..., typing.Any]
+
+
+def universal_root_validator(
+ pre: bool = False,
+) -> typing.Callable[[AnyCallable], AnyCallable]:
+ def decorator(func: AnyCallable) -> AnyCallable:
+ if IS_PYDANTIC_V2:
+ return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
+ else:
+ return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1
+
+ return decorator
+
+
+def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]:
+ def decorator(func: AnyCallable) -> AnyCallable:
+ if IS_PYDANTIC_V2:
+ return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2
+ else:
+ return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1
+
+ return decorator
+
+
+PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo]
+
+
+def _get_model_fields(
+ model: typing.Type["Model"],
+) -> typing.Mapping[str, PydanticField]:
+ if IS_PYDANTIC_V2:
+ return model.model_fields # type: ignore # Pydantic v2
+ else:
+ return model.__fields__ # type: ignore # Pydantic v1
+
+
+def _get_field_default(field: PydanticField) -> typing.Any:
+ try:
+ value = field.get_default() # type: ignore # Pydantic < v1.10.15
+ except:
+ value = field.default
+ if IS_PYDANTIC_V2:
+ from pydantic_core import PydanticUndefined
+
+ if value == PydanticUndefined:
+ return None
+ return value
+ return value
diff --git a/src/merge/core/query_encoder.py b/src/merge/core/query_encoder.py
index 1f5f766b..3183001d 100644
--- a/src/merge/core/query_encoder.py
+++ b/src/merge/core/query_encoder.py
@@ -1,33 +1,58 @@
# This file was auto-generated by Fern from our API Definition.
-from collections import ChainMap
-from typing import Any, Dict, Optional
+from typing import Any, Dict, List, Optional, Tuple
-from .pydantic_utilities import pydantic_v1
+import pydantic
# Flattens dicts to be of the form {"key[subkey][subkey2]": value} where value is not a dict
-def traverse_query_dict(dict_flat: Dict[str, Any], key_prefix: Optional[str] = None) -> Dict[str, Any]:
- result = {}
+def traverse_query_dict(dict_flat: Dict[str, Any], key_prefix: Optional[str] = None) -> List[Tuple[str, Any]]:
+ result = []
for k, v in dict_flat.items():
key = f"{key_prefix}[{k}]" if key_prefix is not None else k
if isinstance(v, dict):
- result.update(traverse_query_dict(v, key))
+ result.extend(traverse_query_dict(v, key))
+ elif isinstance(v, list):
+ for arr_v in v:
+ if isinstance(arr_v, dict):
+ result.extend(traverse_query_dict(arr_v, key))
+ else:
+ result.append((key, arr_v))
else:
- result[key] = v
+ result.append((key, v))
return result
-def single_query_encoder(query_key: str, query_value: Any) -> Dict[str, Any]:
- if isinstance(query_value, pydantic_v1.BaseModel) or isinstance(query_value, dict):
- if isinstance(query_value, pydantic_v1.BaseModel):
+def single_query_encoder(query_key: str, query_value: Any) -> List[Tuple[str, Any]]:
+ if isinstance(query_value, pydantic.BaseModel) or isinstance(query_value, dict):
+ if isinstance(query_value, pydantic.BaseModel):
obj_dict = query_value.dict(by_alias=True)
else:
obj_dict = query_value
return traverse_query_dict(obj_dict, query_key)
+ elif isinstance(query_value, list):
+ encoded_values: List[Tuple[str, Any]] = []
+ for value in query_value:
+ if isinstance(value, pydantic.BaseModel) or isinstance(value, dict):
+ if isinstance(value, pydantic.BaseModel):
+ obj_dict = value.dict(by_alias=True)
+ elif isinstance(value, dict):
+ obj_dict = value
- return {query_key: query_value}
+ encoded_values.extend(single_query_encoder(query_key, obj_dict))
+ else:
+ encoded_values.append((query_key, value))
+ return encoded_values
-def encode_query(query: Optional[Dict[str, Any]]) -> Optional[Dict[str, Any]]:
- return dict(ChainMap(*[single_query_encoder(k, v) for k, v in query.items()])) if query is not None else None
+ return [(query_key, query_value)]
+
+
+def encode_query(query: Optional[Dict[str, Any]]) -> Optional[List[Tuple[str, Any]]]:
+ if query is None:
+ return None
+
+ encoded_query = []
+ for k, v in query.items():
+ encoded_query.extend(single_query_encoder(k, v))
+ return encoded_query
diff --git a/src/merge/core/request_options.py b/src/merge/core/request_options.py
index cd6f27a7..d0bf0dbc 100644
--- a/src/merge/core/request_options.py
+++ b/src/merge/core/request_options.py
@@ -5,10 +5,10 @@
try:
from typing import NotRequired # type: ignore
except ImportError:
- from typing_extensions import NotRequired # type: ignore
+ from typing_extensions import NotRequired
-class RequestOptions(typing.TypedDict):
+class RequestOptions(typing.TypedDict, total=False):
"""
Additional options for request-specific configuration when calling APIs via the SDK.
This is used primarily as an optional final parameter for service functions.
diff --git a/src/merge/core/serialization.py b/src/merge/core/serialization.py
new file mode 100644
index 00000000..cb5dcbf9
--- /dev/null
+++ b/src/merge/core/serialization.py
@@ -0,0 +1,272 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import collections
+import inspect
+import typing
+
+import typing_extensions
+
+import pydantic
+
+
+class FieldMetadata:
+ """
+ Metadata class used to annotate fields to provide additional information.
+
+ Example:
+ class MyDict(TypedDict):
+ field: typing.Annotated[str, FieldMetadata(alias="field_name")]
+
+ Will serialize: `{"field": "value"}`
+ To: `{"field_name": "value"}`
+ """
+
+ alias: str
+
+ def __init__(self, *, alias: str) -> None:
+ self.alias = alias
+
+
+def convert_and_respect_annotation_metadata(
+ *,
+ object_: typing.Any,
+ annotation: typing.Any,
+ inner_type: typing.Optional[typing.Any] = None,
+ direction: typing.Literal["read", "write"],
+) -> typing.Any:
+ """
+ Respect the metadata annotations on a field, such as aliasing. This function effectively
+ manipulates the dict-form of an object to respect the metadata annotations. This is primarily used for
+ TypedDicts, which cannot support aliasing out of the box, and can be extended for additional
+ utilities, such as defaults.
+
+ Parameters
+ ----------
+ object_ : typing.Any
+
+ annotation : type
+ The type we're looking to apply typing annotations from
+
+ inner_type : typing.Optional[type]
+
+ Returns
+ -------
+ typing.Any
+ """
+
+ if object_ is None:
+ return None
+ if inner_type is None:
+ inner_type = annotation
+
+ clean_type = _remove_annotations(inner_type)
+ # Pydantic models
+ if (
+ inspect.isclass(clean_type)
+ and issubclass(clean_type, pydantic.BaseModel)
+ and isinstance(object_, typing.Mapping)
+ ):
+ return _convert_mapping(object_, clean_type, direction)
+ # TypedDicts
+ if typing_extensions.is_typeddict(clean_type) and isinstance(object_, typing.Mapping):
+ return _convert_mapping(object_, clean_type, direction)
+
+ if (
+ typing_extensions.get_origin(clean_type) == typing.Dict
+ or typing_extensions.get_origin(clean_type) == dict
+ or clean_type == typing.Dict
+ ) and isinstance(object_, typing.Dict):
+ key_type = typing_extensions.get_args(clean_type)[0]
+ value_type = typing_extensions.get_args(clean_type)[1]
+
+ return {
+ key: convert_and_respect_annotation_metadata(
+ object_=value,
+ annotation=annotation,
+ inner_type=value_type,
+ direction=direction,
+ )
+ for key, value in object_.items()
+ }
+
+ # If you're iterating on a string, do not bother to coerce it to a sequence.
+ if not isinstance(object_, str):
+ if (
+ typing_extensions.get_origin(clean_type) == typing.Set
+ or typing_extensions.get_origin(clean_type) == set
+ or clean_type == typing.Set
+ ) and isinstance(object_, typing.Set):
+ inner_type = typing_extensions.get_args(clean_type)[0]
+ return {
+ convert_and_respect_annotation_metadata(
+ object_=item,
+ annotation=annotation,
+ inner_type=inner_type,
+ direction=direction,
+ )
+ for item in object_
+ }
+ elif (
+ (
+ typing_extensions.get_origin(clean_type) == typing.List
+ or typing_extensions.get_origin(clean_type) == list
+ or clean_type == typing.List
+ )
+ and isinstance(object_, typing.List)
+ ) or (
+ (
+ typing_extensions.get_origin(clean_type) == typing.Sequence
+ or typing_extensions.get_origin(clean_type) == collections.abc.Sequence
+ or clean_type == typing.Sequence
+ )
+ and isinstance(object_, typing.Sequence)
+ ):
+ inner_type = typing_extensions.get_args(clean_type)[0]
+ return [
+ convert_and_respect_annotation_metadata(
+ object_=item,
+ annotation=annotation,
+ inner_type=inner_type,
+ direction=direction,
+ )
+ for item in object_
+ ]
+
+ if typing_extensions.get_origin(clean_type) == typing.Union:
+ # We should be able to ~relatively~ safely try to convert keys against all
+ # member types in the union, the edge case here is if one member aliases a field
+ # of the same name to a different name from another member
+ # Or if another member aliases a field of the same name that another member does not.
+ for member in typing_extensions.get_args(clean_type):
+ object_ = convert_and_respect_annotation_metadata(
+ object_=object_,
+ annotation=annotation,
+ inner_type=member,
+ direction=direction,
+ )
+ return object_
+
+ annotated_type = _get_annotation(annotation)
+ if annotated_type is None:
+ return object_
+
+ # If the object is not a TypedDict, a Union, or other container (list, set, sequence, etc.)
+ # Then we can safely call it on the recursive conversion.
+ return object_
+
+
+def _convert_mapping(
+ object_: typing.Mapping[str, object],
+ expected_type: typing.Any,
+ direction: typing.Literal["read", "write"],
+) -> typing.Mapping[str, object]:
+ converted_object: typing.Dict[str, object] = {}
+ annotations = typing_extensions.get_type_hints(expected_type, include_extras=True)
+ aliases_to_field_names = _get_alias_to_field_name(annotations)
+ for key, value in object_.items():
+ if direction == "read" and key in aliases_to_field_names:
+ dealiased_key = aliases_to_field_names.get(key)
+ if dealiased_key is not None:
+ type_ = annotations.get(dealiased_key)
+ else:
+ type_ = annotations.get(key)
+ # Note you can't get the annotation by the field name if you're in read mode, so you must check the aliases map
+ #
+ # So this is effectively saying if we're in write mode, and we don't have a type, or if we're in read mode and we don't have an alias
+ # then we can just pass the value through as is
+ if type_ is None:
+ converted_object[key] = value
+ elif direction == "read" and key not in aliases_to_field_names:
+ converted_object[key] = convert_and_respect_annotation_metadata(
+ object_=value, annotation=type_, direction=direction
+ )
+ else:
+ converted_object[_alias_key(key, type_, direction, aliases_to_field_names)] = (
+ convert_and_respect_annotation_metadata(object_=value, annotation=type_, direction=direction)
+ )
+ return converted_object
+
+
+def _get_annotation(type_: typing.Any) -> typing.Optional[typing.Any]:
+ maybe_annotated_type = typing_extensions.get_origin(type_)
+ if maybe_annotated_type is None:
+ return None
+
+ if maybe_annotated_type == typing_extensions.NotRequired:
+ type_ = typing_extensions.get_args(type_)[0]
+ maybe_annotated_type = typing_extensions.get_origin(type_)
+
+ if maybe_annotated_type == typing_extensions.Annotated:
+ return type_
+
+ return None
+
+
+def _remove_annotations(type_: typing.Any) -> typing.Any:
+ maybe_annotated_type = typing_extensions.get_origin(type_)
+ if maybe_annotated_type is None:
+ return type_
+
+ if maybe_annotated_type == typing_extensions.NotRequired:
+ return _remove_annotations(typing_extensions.get_args(type_)[0])
+
+ if maybe_annotated_type == typing_extensions.Annotated:
+ return _remove_annotations(typing_extensions.get_args(type_)[0])
+
+ return type_
+
+
+def get_alias_to_field_mapping(type_: typing.Any) -> typing.Dict[str, str]:
+ annotations = typing_extensions.get_type_hints(type_, include_extras=True)
+ return _get_alias_to_field_name(annotations)
+
+
+def get_field_to_alias_mapping(type_: typing.Any) -> typing.Dict[str, str]:
+ annotations = typing_extensions.get_type_hints(type_, include_extras=True)
+ return _get_field_to_alias_name(annotations)
+
+
+def _get_alias_to_field_name(
+ field_to_hint: typing.Dict[str, typing.Any],
+) -> typing.Dict[str, str]:
+ aliases = {}
+ for field, hint in field_to_hint.items():
+ maybe_alias = _get_alias_from_type(hint)
+ if maybe_alias is not None:
+ aliases[maybe_alias] = field
+ return aliases
+
+
+def _get_field_to_alias_name(
+ field_to_hint: typing.Dict[str, typing.Any],
+) -> typing.Dict[str, str]:
+ aliases = {}
+ for field, hint in field_to_hint.items():
+ maybe_alias = _get_alias_from_type(hint)
+ if maybe_alias is not None:
+ aliases[field] = maybe_alias
+ return aliases
+
+
+def _get_alias_from_type(type_: typing.Any) -> typing.Optional[str]:
+ maybe_annotated_type = _get_annotation(type_)
+
+ if maybe_annotated_type is not None:
+ # The actual annotations are 1 onward, the first is the annotated type
+ annotations = typing_extensions.get_args(maybe_annotated_type)[1:]
+
+ for annotation in annotations:
+ if isinstance(annotation, FieldMetadata) and annotation.alias is not None:
+ return annotation.alias
+ return None
+
+
+def _alias_key(
+ key: str,
+ type_: typing.Any,
+ direction: typing.Literal["read", "write"],
+ aliases_to_field_names: typing.Dict[str, str],
+) -> str:
+ if direction == "read":
+ return aliases_to_field_names.get(key, key)
+ return _get_alias_from_type(type_=type_) or key
diff --git a/src/merge/resources/accounting/__init__.py b/src/merge/resources/accounting/__init__.py
index a5eaad7c..3ef90053 100644
--- a/src/merge/resources/accounting/__init__.py
+++ b/src/merge/resources/accounting/__init__.py
@@ -52,6 +52,7 @@
CommonModelScopesBodyRequest,
CompanyInfo,
CompanyInfoCurrency,
+ ComponentTypeEnum,
Contact,
ContactAddressesItem,
ContactRequest,
@@ -112,6 +113,7 @@
ExpenseTrackingCategoriesItem,
ExternalTargetFieldApi,
ExternalTargetFieldApiResponse,
+ FieldFormatEnum,
FieldMappingApiInstance,
FieldMappingApiInstanceRemoteField,
FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo,
@@ -120,6 +122,7 @@
FieldMappingInstanceResponse,
FieldPermissionDeserializer,
FieldPermissionDeserializerRequest,
+ FieldTypeEnum,
IncomeStatement,
IncomeStatementCompany,
IncomeStatementCurrency,
@@ -165,9 +168,14 @@
IssueStatusEnum,
Item,
ItemCompany,
+ ItemFormatEnum,
ItemPurchaseAccount,
+ ItemPurchaseTaxRate,
ItemSalesAccount,
+ ItemSalesTaxRate,
+ ItemSchema,
ItemStatus,
+ ItemTypeEnum,
JournalEntry,
JournalEntryAccountingPeriod,
JournalEntryAppliedPaymentsItem,
@@ -193,6 +201,7 @@
JournalLineRequestTrackingCategory,
JournalLineTrackingCategoriesItem,
JournalLineTrackingCategory,
+ LanguageEnum,
LinkToken,
LinkedAccountStatus,
MetaResponse,
@@ -220,6 +229,7 @@
PaginatedJournalEntryList,
PaginatedPaymentList,
PaginatedPurchaseOrderList,
+ PaginatedRemoteFieldClassList,
PaginatedSyncStatusList,
PaginatedTaxRateList,
PaginatedTrackingCategoryList,
@@ -282,9 +292,13 @@
PurchaseOrderVendor,
RemoteData,
RemoteEndpointInfo,
+ RemoteField,
RemoteFieldApi,
RemoteFieldApiCoverage,
RemoteFieldApiResponse,
+ RemoteFieldClass,
+ RemoteFieldRequest,
+ RemoteFieldRequestRemoteFieldClass,
RemoteKey,
RemoteResponse,
ReportItem,
@@ -295,8 +309,12 @@
Status7D1Enum,
SyncStatus,
SyncStatusStatusEnum,
+ TaxComponent,
+ TaxComponentComponentType,
TaxRate,
TaxRateCompany,
+ TaxRateStatus,
+ TaxRateTaxComponentsItem,
TrackingCategory,
TrackingCategoryCategoryType,
TrackingCategoryCompany,
@@ -454,6 +472,7 @@
"CompanyInfoCurrency",
"CompanyInfoListRequestExpand",
"CompanyInfoRetrieveRequestExpand",
+ "ComponentTypeEnum",
"Contact",
"ContactAddressesItem",
"ContactRequest",
@@ -524,6 +543,7 @@
"ExpensesRetrieveRequestExpand",
"ExternalTargetFieldApi",
"ExternalTargetFieldApiResponse",
+ "FieldFormatEnum",
"FieldMappingApiInstance",
"FieldMappingApiInstanceRemoteField",
"FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo",
@@ -532,6 +552,7 @@
"FieldMappingInstanceResponse",
"FieldPermissionDeserializer",
"FieldPermissionDeserializerRequest",
+ "FieldTypeEnum",
"IncomeStatement",
"IncomeStatementCompany",
"IncomeStatementCurrency",
@@ -581,9 +602,14 @@
"IssuesListRequestStatus",
"Item",
"ItemCompany",
+ "ItemFormatEnum",
"ItemPurchaseAccount",
+ "ItemPurchaseTaxRate",
"ItemSalesAccount",
+ "ItemSalesTaxRate",
+ "ItemSchema",
"ItemStatus",
+ "ItemTypeEnum",
"ItemsListRequestExpand",
"ItemsRetrieveRequestExpand",
"JournalEntriesListRequestExpand",
@@ -613,6 +639,7 @@
"JournalLineRequestTrackingCategory",
"JournalLineTrackingCategoriesItem",
"JournalLineTrackingCategory",
+ "LanguageEnum",
"LinkToken",
"LinkedAccountStatus",
"LinkedAccountsListRequestCategory",
@@ -641,6 +668,7 @@
"PaginatedJournalEntryList",
"PaginatedPaymentList",
"PaginatedPurchaseOrderList",
+ "PaginatedRemoteFieldClassList",
"PaginatedSyncStatusList",
"PaginatedTaxRateList",
"PaginatedTrackingCategoryList",
@@ -707,9 +735,13 @@
"PurchaseOrdersRetrieveRequestExpand",
"RemoteData",
"RemoteEndpointInfo",
+ "RemoteField",
"RemoteFieldApi",
"RemoteFieldApiCoverage",
"RemoteFieldApiResponse",
+ "RemoteFieldClass",
+ "RemoteFieldRequest",
+ "RemoteFieldRequestRemoteFieldClass",
"RemoteKey",
"RemoteResponse",
"ReportItem",
@@ -720,8 +752,12 @@
"Status7D1Enum",
"SyncStatus",
"SyncStatusStatusEnum",
+ "TaxComponent",
+ "TaxComponentComponentType",
"TaxRate",
"TaxRateCompany",
+ "TaxRateStatus",
+ "TaxRateTaxComponentsItem",
"TrackingCategory",
"TrackingCategoryCategoryType",
"TrackingCategoryCompany",
diff --git a/src/merge/resources/accounting/client.py b/src/merge/resources/accounting/client.py
index 8a08a68f..c673d91c 100644
--- a/src/merge/resources/accounting/client.py
+++ b/src/merge/resources/accounting/client.py
@@ -1,50 +1,87 @@
# This file was auto-generated by Fern from our API Definition.
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .resources.account_details.client import AccountDetailsClient, AsyncAccountDetailsClient
-from .resources.account_token.client import AccountTokenClient, AsyncAccountTokenClient
-from .resources.accounting_periods.client import AccountingPeriodsClient, AsyncAccountingPeriodsClient
-from .resources.accounts.client import AccountsClient, AsyncAccountsClient
-from .resources.addresses.client import AddressesClient, AsyncAddressesClient
-from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from ...core.client_wrapper import SyncClientWrapper
+from .resources.account_details.client import AccountDetailsClient
+from .resources.account_token.client import AccountTokenClient
+from .resources.accounting_periods.client import AccountingPeriodsClient
+from .resources.accounts.client import AccountsClient
+from .resources.addresses.client import AddressesClient
from .resources.async_passthrough.client import (
AsyncPassthroughClient as resources_accounting_resources_async_passthrough_client_AsyncPassthroughClient,
)
-from .resources.attachments.client import AsyncAttachmentsClient, AttachmentsClient
-from .resources.audit_trail.client import AsyncAuditTrailClient, AuditTrailClient
-from .resources.available_actions.client import AsyncAvailableActionsClient, AvailableActionsClient
-from .resources.balance_sheets.client import AsyncBalanceSheetsClient, BalanceSheetsClient
-from .resources.cash_flow_statements.client import AsyncCashFlowStatementsClient, CashFlowStatementsClient
-from .resources.company_info.client import AsyncCompanyInfoClient, CompanyInfoClient
-from .resources.contacts.client import AsyncContactsClient, ContactsClient
-from .resources.credit_notes.client import AsyncCreditNotesClient, CreditNotesClient
-from .resources.delete_account.client import AsyncDeleteAccountClient, DeleteAccountClient
-from .resources.expenses.client import AsyncExpensesClient, ExpensesClient
-from .resources.field_mapping.client import AsyncFieldMappingClient, FieldMappingClient
-from .resources.force_resync.client import AsyncForceResyncClient, ForceResyncClient
-from .resources.generate_key.client import AsyncGenerateKeyClient, GenerateKeyClient
-from .resources.income_statements.client import AsyncIncomeStatementsClient, IncomeStatementsClient
-from .resources.invoices.client import AsyncInvoicesClient, InvoicesClient
-from .resources.issues.client import AsyncIssuesClient, IssuesClient
-from .resources.items.client import AsyncItemsClient, ItemsClient
-from .resources.journal_entries.client import AsyncJournalEntriesClient, JournalEntriesClient
-from .resources.link_token.client import AsyncLinkTokenClient, LinkTokenClient
-from .resources.linked_accounts.client import AsyncLinkedAccountsClient, LinkedAccountsClient
+from .resources.attachments.client import AttachmentsClient
+from .resources.audit_trail.client import AuditTrailClient
+from .resources.available_actions.client import AvailableActionsClient
+from .resources.balance_sheets.client import BalanceSheetsClient
+from .resources.cash_flow_statements.client import CashFlowStatementsClient
+from .resources.company_info.client import CompanyInfoClient
+from .resources.contacts.client import ContactsClient
+from .resources.credit_notes.client import CreditNotesClient
+from .resources.scopes.client import ScopesClient
+from .resources.delete_account.client import DeleteAccountClient
+from .resources.expenses.client import ExpensesClient
+from .resources.field_mapping.client import FieldMappingClient
+from .resources.generate_key.client import GenerateKeyClient
+from .resources.income_statements.client import IncomeStatementsClient
+from .resources.invoices.client import InvoicesClient
+from .resources.issues.client import IssuesClient
+from .resources.items.client import ItemsClient
+from .resources.journal_entries.client import JournalEntriesClient
+from .resources.link_token.client import LinkTokenClient
+from .resources.linked_accounts.client import LinkedAccountsClient
+from .resources.passthrough.client import PassthroughClient
+from .resources.payments.client import PaymentsClient
+from .resources.phone_numbers.client import PhoneNumbersClient
+from .resources.purchase_orders.client import PurchaseOrdersClient
+from .resources.regenerate_key.client import RegenerateKeyClient
+from .resources.sync_status.client import SyncStatusClient
+from .resources.force_resync.client import ForceResyncClient
+from .resources.tax_rates.client import TaxRatesClient
+from .resources.tracking_categories.client import TrackingCategoriesClient
+from .resources.transactions.client import TransactionsClient
+from .resources.vendor_credits.client import VendorCreditsClient
+from .resources.webhook_receivers.client import WebhookReceiversClient
+from ...core.client_wrapper import AsyncClientWrapper
+from .resources.account_details.client import AsyncAccountDetailsClient
+from .resources.account_token.client import AsyncAccountTokenClient
+from .resources.accounting_periods.client import AsyncAccountingPeriodsClient
+from .resources.accounts.client import AsyncAccountsClient
+from .resources.addresses.client import AsyncAddressesClient
+from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from .resources.attachments.client import AsyncAttachmentsClient
+from .resources.audit_trail.client import AsyncAuditTrailClient
+from .resources.available_actions.client import AsyncAvailableActionsClient
+from .resources.balance_sheets.client import AsyncBalanceSheetsClient
+from .resources.cash_flow_statements.client import AsyncCashFlowStatementsClient
+from .resources.company_info.client import AsyncCompanyInfoClient
+from .resources.contacts.client import AsyncContactsClient
+from .resources.credit_notes.client import AsyncCreditNotesClient
+from .resources.scopes.client import AsyncScopesClient
+from .resources.delete_account.client import AsyncDeleteAccountClient
+from .resources.expenses.client import AsyncExpensesClient
+from .resources.field_mapping.client import AsyncFieldMappingClient
+from .resources.generate_key.client import AsyncGenerateKeyClient
+from .resources.income_statements.client import AsyncIncomeStatementsClient
+from .resources.invoices.client import AsyncInvoicesClient
+from .resources.issues.client import AsyncIssuesClient
+from .resources.items.client import AsyncItemsClient
+from .resources.journal_entries.client import AsyncJournalEntriesClient
+from .resources.link_token.client import AsyncLinkTokenClient
+from .resources.linked_accounts.client import AsyncLinkedAccountsClient
from .resources.passthrough.client import (
AsyncPassthroughClient as resources_accounting_resources_passthrough_client_AsyncPassthroughClient,
)
-from .resources.passthrough.client import PassthroughClient
-from .resources.payments.client import AsyncPaymentsClient, PaymentsClient
-from .resources.phone_numbers.client import AsyncPhoneNumbersClient, PhoneNumbersClient
-from .resources.purchase_orders.client import AsyncPurchaseOrdersClient, PurchaseOrdersClient
-from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient
-from .resources.scopes.client import AsyncScopesClient, ScopesClient
-from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient
-from .resources.tax_rates.client import AsyncTaxRatesClient, TaxRatesClient
-from .resources.tracking_categories.client import AsyncTrackingCategoriesClient, TrackingCategoriesClient
-from .resources.transactions.client import AsyncTransactionsClient, TransactionsClient
-from .resources.vendor_credits.client import AsyncVendorCreditsClient, VendorCreditsClient
-from .resources.webhook_receivers.client import AsyncWebhookReceiversClient, WebhookReceiversClient
+from .resources.payments.client import AsyncPaymentsClient
+from .resources.phone_numbers.client import AsyncPhoneNumbersClient
+from .resources.purchase_orders.client import AsyncPurchaseOrdersClient
+from .resources.regenerate_key.client import AsyncRegenerateKeyClient
+from .resources.sync_status.client import AsyncSyncStatusClient
+from .resources.force_resync.client import AsyncForceResyncClient
+from .resources.tax_rates.client import AsyncTaxRatesClient
+from .resources.tracking_categories.client import AsyncTrackingCategoriesClient
+from .resources.transactions.client import AsyncTransactionsClient
+from .resources.vendor_credits.client import AsyncVendorCreditsClient
+from .resources.webhook_receivers.client import AsyncWebhookReceiversClient
class AccountingClient:
diff --git a/src/merge/resources/accounting/resources/account_details/client.py b/src/merge/resources/accounting/resources/account_details/client.py
index cff69698..c3bf8250 100644
--- a/src/merge/resources/accounting/resources/account_details/client.py
+++ b/src/merge/resources/accounting/resources/account_details/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_details import AccountDetails
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountDetailsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.accounting.account_details.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/account-details", method="GET", request_options=request_options
+ "accounting/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.account_details.retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.account_details.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/account-details", method="GET", request_options=request_options
+ "accounting/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/account_token/client.py b/src/merge/resources/accounting/resources/account_token/client.py
index 637a18ab..6f92d221 100644
--- a/src/merge/resources/accounting/resources/account_token/client.py
+++ b/src/merge/resources/accounting/resources/account_token/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_token import AccountToken
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountTokenClient:
@@ -33,7 +33,7 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,9 +48,15 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,24 +87,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.account_token.retrieve(
- public_token="public_token",
- )
+
+
+ async def main() -> None:
+ await client.accounting.account_token.retrieve(
+ public_token="public_token",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/account-token/{jsonable_encoder(public_token)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/accounting_periods/client.py b/src/merge/resources/accounting/resources/accounting_periods/client.py
index b355029a..d29b4c6f 100644
--- a/src/merge/resources/accounting/resources/accounting_periods/client.py
+++ b/src/merge/resources/accounting/resources/accounting_periods/client.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
+from .....core.request_options import RequestOptions
+from ...types.paginated_accounting_period_list import PaginatedAccountingPeriodList
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.accounting_period import AccountingPeriod
-from ...types.paginated_accounting_period_list import PaginatedAccountingPeriodList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class AccountingPeriodsClient:
@@ -22,6 +22,7 @@ def list(
cursor: typing.Optional[str] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
page_size: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountingPeriodList:
@@ -34,11 +35,14 @@ def list(
The pagination cursor value.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
page_size : typing.Optional[int]
Number of results to return per page.
@@ -52,7 +56,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -67,13 +71,20 @@ def list(
"cursor": cursor,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"page_size": page_size,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountingPeriodList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountingPeriodList,
+ parse_obj_as(
+ type_=PaginatedAccountingPeriodList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -106,7 +117,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -119,12 +130,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/accounting-periods/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountingPeriod, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountingPeriod,
+ parse_obj_as(
+ type_=AccountingPeriod, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -141,6 +160,7 @@ async def list(
cursor: typing.Optional[str] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
page_size: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountingPeriodList:
@@ -153,11 +173,14 @@ async def list(
The pagination cursor value.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
page_size : typing.Optional[int]
Number of results to return per page.
@@ -171,13 +194,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.accounting_periods.list()
+
+
+ async def main() -> None:
+ await client.accounting.accounting_periods.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/accounting-periods",
@@ -186,13 +217,20 @@ async def list(
"cursor": cursor,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"page_size": page_size,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountingPeriodList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountingPeriodList,
+ parse_obj_as(
+ type_=PaginatedAccountingPeriodList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -225,25 +263,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.accounting_periods.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.accounting_periods.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/accounting-periods/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountingPeriod, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountingPeriod,
+ parse_obj_as(
+ type_=AccountingPeriod, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/accounts/client.py b/src/merge/resources/accounting/resources/accounts/client.py
index dac8ff4e..f8134768 100644
--- a/src/merge/resources/accounting/resources/accounts/client.py
+++ b/src/merge/resources/accounting/resources/accounts/client.py
@@ -1,24 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.accounts_list_request_remote_fields import AccountsListRequestRemoteFields
+from .types.accounts_list_request_show_enum_origins import AccountsListRequestShowEnumOrigins
+from .....core.request_options import RequestOptions
+from ...types.paginated_account_list import PaginatedAccountList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.account import Account
from ...types.account_request import AccountRequest
from ...types.account_response import AccountResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_account_list import PaginatedAccountList
-from .types.accounts_list_request_remote_fields import AccountsListRequestRemoteFields
-from .types.accounts_list_request_show_enum_origins import AccountsListRequestShowEnumOrigins
from .types.accounts_retrieve_request_remote_fields import AccountsRetrieveRequestRemoteFields
from .types.accounts_retrieve_request_show_enum_origins import AccountsRetrieveRequestShowEnumOrigins
+from ...types.account import Account
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -38,6 +38,7 @@ def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -67,11 +68,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -100,7 +104,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -119,6 +123,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -128,9 +133,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountList,
+ parse_obj_as(
+ type_=PaginatedAccountList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -167,7 +178,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import AccountRequest
client = Merge(
@@ -181,14 +192,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/accounts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountResponse,
+ parse_obj_as(
+ type_=AccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -233,7 +255,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -254,9 +276,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Account, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Account,
+ parse_obj_as(
+ type_=Account, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -278,7 +306,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -287,11 +315,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.accounting.accounts.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/accounts/meta/post", method="GET", request_options=request_options
+ "accounting/v1/accounts/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -312,6 +348,7 @@ async def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -341,11 +378,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -374,13 +414,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.accounts.list()
+
+
+ async def main() -> None:
+ await client.accounting.accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/accounts",
@@ -393,6 +441,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -402,9 +451,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountList,
+ parse_obj_as(
+ type_=PaginatedAccountList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -441,28 +496,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import AccountRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.accounts.create(
- model=AccountRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.accounts.create(
+ model=AccountRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/accounts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountResponse,
+ parse_obj_as(
+ type_=AccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -507,15 +581,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.accounts.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.accounts.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/accounts/{jsonable_encoder(id)}",
@@ -528,9 +610,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Account, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Account,
+ parse_obj_as(
+ type_=Account, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -552,20 +640,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.accounts.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.accounts.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/accounts/meta/post", method="GET", request_options=request_options
+ "accounting/v1/accounts/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_remote_fields.py b/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_remote_fields.py
index a7bcc53e..6ade52fe 100644
--- a/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_remote_fields.py
+++ b/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_remote_fields.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountsListRequestRemoteFields(str, enum.Enum):
- CLASSIFICATION = "classification"
- CLASSIFICATION_STATUS = "classification,status"
- STATUS = "status"
-
- def visit(
- self,
- classification: typing.Callable[[], T_Result],
- classification_status: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountsListRequestRemoteFields.CLASSIFICATION:
- return classification()
- if self is AccountsListRequestRemoteFields.CLASSIFICATION_STATUS:
- return classification_status()
- if self is AccountsListRequestRemoteFields.STATUS:
- return status()
+AccountsListRequestRemoteFields = typing.Union[
+ typing.Literal["classification", "classification,status", "status"], typing.Any
+]
diff --git a/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_show_enum_origins.py b/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_show_enum_origins.py
index 16e8bba6..9c36e73f 100644
--- a/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_show_enum_origins.py
+++ b/src/merge/resources/accounting/resources/accounts/types/accounts_list_request_show_enum_origins.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountsListRequestShowEnumOrigins(str, enum.Enum):
- CLASSIFICATION = "classification"
- CLASSIFICATION_STATUS = "classification,status"
- STATUS = "status"
-
- def visit(
- self,
- classification: typing.Callable[[], T_Result],
- classification_status: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountsListRequestShowEnumOrigins.CLASSIFICATION:
- return classification()
- if self is AccountsListRequestShowEnumOrigins.CLASSIFICATION_STATUS:
- return classification_status()
- if self is AccountsListRequestShowEnumOrigins.STATUS:
- return status()
+AccountsListRequestShowEnumOrigins = typing.Union[
+ typing.Literal["classification", "classification,status", "status"], typing.Any
+]
diff --git a/src/merge/resources/accounting/resources/accounts/types/accounts_retrieve_request_remote_fields.py b/src/merge/resources/accounting/resources/accounts/types/accounts_retrieve_request_remote_fields.py
index 9ed86394..0080179d 100644
--- a/src/merge/resources/accounting/resources/accounts/types/accounts_retrieve_request_remote_fields.py
+++ b/src/merge/resources/accounting/resources/accounts/types/accounts_retrieve_request_remote_fields.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountsRetrieveRequestRemoteFields(str, enum.Enum):
- CLASSIFICATION = "classification"
- CLASSIFICATION_STATUS = "classification,status"
- STATUS = "status"
-
- def visit(
- self,
- classification: typing.Callable[[], T_Result],
- classification_status: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountsRetrieveRequestRemoteFields.CLASSIFICATION:
- return classification()
- if self is AccountsRetrieveRequestRemoteFields.CLASSIFICATION_STATUS:
- return classification_status()
- if self is AccountsRetrieveRequestRemoteFields.STATUS:
- return status()
+AccountsRetrieveRequestRemoteFields = typing.Union[
+ typing.Literal["classification", "classification,status", "status"], typing.Any
+]
diff --git a/src/merge/resources/accounting/resources/accounts/types/accounts_retrieve_request_show_enum_origins.py b/src/merge/resources/accounting/resources/accounts/types/accounts_retrieve_request_show_enum_origins.py
index 7ebeb5b8..92039c03 100644
--- a/src/merge/resources/accounting/resources/accounts/types/accounts_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/accounting/resources/accounts/types/accounts_retrieve_request_show_enum_origins.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountsRetrieveRequestShowEnumOrigins(str, enum.Enum):
- CLASSIFICATION = "classification"
- CLASSIFICATION_STATUS = "classification,status"
- STATUS = "status"
-
- def visit(
- self,
- classification: typing.Callable[[], T_Result],
- classification_status: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION:
- return classification()
- if self is AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION_STATUS:
- return classification_status()
- if self is AccountsRetrieveRequestShowEnumOrigins.STATUS:
- return status()
+AccountsRetrieveRequestShowEnumOrigins = typing.Union[
+ typing.Literal["classification", "classification,status", "status"], typing.Any
+]
diff --git a/src/merge/resources/accounting/resources/addresses/client.py b/src/merge/resources/accounting/resources/addresses/client.py
index 51276ec4..d91271a0 100644
--- a/src/merge/resources/accounting/resources/addresses/client.py
+++ b/src/merge/resources/accounting/resources/addresses/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.address import Address
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AddressesClient:
@@ -50,7 +50,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -70,9 +70,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Address, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Address,
+ parse_obj_as(
+ type_=Address, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -118,15 +124,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.addresses.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.addresses.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/addresses/{jsonable_encoder(id)}",
@@ -138,9 +152,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Address, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Address,
+ parse_obj_as(
+ type_=Address, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/async_passthrough/client.py b/src/merge/resources/accounting/resources/async_passthrough/client.py
index 25181d37..ccb3658f 100644
--- a/src/merge/resources/accounting/resources/async_passthrough/client.py
+++ b/src/merge/resources/accounting/resources/async_passthrough/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+from ...types.data_passthrough_request import DataPassthroughRequest
from .....core.request_options import RequestOptions
from ...types.async_passthrough_reciept import AsyncPassthroughReciept
-from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.remote_response import RemoteResponse
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -40,8 +40,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.accounting import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.accounting import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,17 +49,27 @@ def create(
)
client.accounting.async_passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "accounting/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,7 +95,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -100,9 +110,15 @@ def retrieve(
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,26 +149,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.accounting import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.accounting import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.async_passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.accounting.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "accounting/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -178,24 +212,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.async_passthrough.retrieve(
- async_passthrough_receipt_id="async_passthrough_receipt_id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/async-passthrough/{jsonable_encoder(async_passthrough_receipt_id)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/attachments/client.py b/src/merge/resources/accounting/resources/attachments/client.py
index 2b0c395e..269cfaa1 100644
--- a/src/merge/resources/accounting/resources/attachments/client.py
+++ b/src/merge/resources/accounting/resources/attachments/client.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_accounting_attachment_list import PaginatedAccountingAttachmentList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.accounting_attachment import AccountingAttachment
from ...types.accounting_attachment_request import AccountingAttachmentRequest
from ...types.accounting_attachment_response import AccountingAttachmentResponse
+from ...types.accounting_attachment import AccountingAttachment
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.meta_response import MetaResponse
-from ...types.paginated_accounting_attachment_list import PaginatedAccountingAttachmentList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -33,6 +33,7 @@ def list(
cursor: typing.Optional[str] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -57,11 +58,14 @@ def list(
The pagination cursor value.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -84,7 +88,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -102,6 +106,7 @@ def list(
"cursor": cursor,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -109,9 +114,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountingAttachmentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountingAttachmentList,
+ parse_obj_as(
+ type_=PaginatedAccountingAttachmentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -148,7 +159,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import AccountingAttachmentRequest
client = Merge(
@@ -162,14 +173,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/attachments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountingAttachmentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountingAttachmentResponse,
+ parse_obj_as(
+ type_=AccountingAttachmentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -202,7 +224,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -215,12 +237,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/attachments/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountingAttachment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountingAttachment,
+ parse_obj_as(
+ type_=AccountingAttachment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -242,7 +272,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -251,11 +281,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.accounting.attachments.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/attachments/meta/post", method="GET", request_options=request_options
+ "accounting/v1/attachments/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -275,6 +313,7 @@ async def list(
cursor: typing.Optional[str] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -299,11 +338,14 @@ async def list(
The pagination cursor value.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -326,13 +368,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.attachments.list()
+
+
+ async def main() -> None:
+ await client.accounting.attachments.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/attachments",
@@ -344,6 +394,7 @@ async def list(
"cursor": cursor,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -351,9 +402,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountingAttachmentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountingAttachmentList,
+ parse_obj_as(
+ type_=PaginatedAccountingAttachmentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -390,28 +447,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import AccountingAttachmentRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.attachments.create(
- model=AccountingAttachmentRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.attachments.create(
+ model=AccountingAttachmentRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/attachments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountingAttachmentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountingAttachmentResponse,
+ parse_obj_as(
+ type_=AccountingAttachmentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -444,25 +520,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.attachments.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.attachments.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/attachments/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountingAttachment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountingAttachment,
+ parse_obj_as(
+ type_=AccountingAttachment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -484,20 +576,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.attachments.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.attachments.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/attachments/meta/post", method="GET", request_options=request_options
+ "accounting/v1/attachments/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/audit_trail/client.py b/src/merge/resources/accounting/resources/audit_trail/client.py
index 691f459d..671dc791 100644
--- a/src/merge/resources/accounting/resources/audit_trail/client.py
+++ b/src/merge/resources/accounting/resources/audit_trail/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AuditTrailClient:
@@ -23,7 +23,7 @@ def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -37,7 +37,7 @@ def list(
If included, will only include audit trail events that occurred before this time
event_type : typing.Optional[str]
- If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`
+ If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
page_size : typing.Optional[int]
Number of results to return per page.
@@ -58,7 +58,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -79,9 +79,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -101,7 +107,7 @@ async def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -115,7 +121,7 @@ async def list(
If included, will only include audit trail events that occurred before this time
event_type : typing.Optional[str]
- If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`
+ If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
page_size : typing.Optional[int]
Number of results to return per page.
@@ -136,13 +142,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.audit_trail.list()
+
+
+ async def main() -> None:
+ await client.accounting.audit_trail.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/audit-trail",
@@ -157,9 +171,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/available_actions/client.py b/src/merge/resources/accounting/resources/available_actions/client.py
index 7de301d2..bdb3619c 100644
--- a/src/merge/resources/accounting/resources/available_actions/client.py
+++ b/src/merge/resources/accounting/resources/available_actions/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.available_actions import AvailableActions
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AvailableActionsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.accounting.available_actions.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/available-actions", method="GET", request_options=request_options
+ "accounting/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.available_actions.retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.available_actions.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/available-actions", method="GET", request_options=request_options
+ "accounting/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/balance_sheets/client.py b/src/merge/resources/accounting/resources/balance_sheets/client.py
index c9d26d14..839e77de 100644
--- a/src/merge/resources/accounting/resources/balance_sheets/client.py
+++ b/src/merge/resources/accounting/resources/balance_sheets/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_balance_sheet_list import PaginatedBalanceSheetList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.balance_sheet import BalanceSheet
-from ...types.paginated_balance_sheet_list import PaginatedBalanceSheetList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class BalanceSheetsClient:
@@ -28,6 +28,7 @@ def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -55,11 +56,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -82,7 +86,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,6 +105,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -108,9 +113,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedBalanceSheetList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedBalanceSheetList,
+ parse_obj_as(
+ type_=PaginatedBalanceSheetList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -147,7 +158,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,12 +171,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/balance-sheets/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(BalanceSheet, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ BalanceSheet,
+ parse_obj_as(
+ type_=BalanceSheet, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,6 +206,7 @@ async def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -213,11 +234,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -240,13 +264,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.balance_sheets.list()
+
+
+ async def main() -> None:
+ await client.accounting.balance_sheets.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/balance-sheets",
@@ -259,6 +291,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -266,9 +299,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedBalanceSheetList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedBalanceSheetList,
+ parse_obj_as(
+ type_=PaginatedBalanceSheetList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,25 +344,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.balance_sheets.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.balance_sheets.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/balance-sheets/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(BalanceSheet, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ BalanceSheet,
+ parse_obj_as(
+ type_=BalanceSheet, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/cash_flow_statements/client.py b/src/merge/resources/accounting/resources/cash_flow_statements/client.py
index 71710bca..3eb6a330 100644
--- a/src/merge/resources/accounting/resources/cash_flow_statements/client.py
+++ b/src/merge/resources/accounting/resources/cash_flow_statements/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_cash_flow_statement_list import PaginatedCashFlowStatementList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.cash_flow_statement import CashFlowStatement
-from ...types.paginated_cash_flow_statement_list import PaginatedCashFlowStatementList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class CashFlowStatementsClient:
@@ -28,6 +28,7 @@ def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -55,11 +56,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -82,7 +86,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,6 +105,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -108,9 +113,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCashFlowStatementList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCashFlowStatementList,
+ parse_obj_as(
+ type_=PaginatedCashFlowStatementList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -147,7 +158,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,12 +171,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/cash-flow-statements/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CashFlowStatement, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CashFlowStatement,
+ parse_obj_as(
+ type_=CashFlowStatement, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,6 +206,7 @@ async def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -213,11 +234,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -240,13 +264,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.cash_flow_statements.list()
+
+
+ async def main() -> None:
+ await client.accounting.cash_flow_statements.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/cash-flow-statements",
@@ -259,6 +291,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -266,9 +299,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCashFlowStatementList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCashFlowStatementList,
+ parse_obj_as(
+ type_=PaginatedCashFlowStatementList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,25 +344,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.cash_flow_statements.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.cash_flow_statements.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/cash-flow-statements/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CashFlowStatement, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CashFlowStatement,
+ parse_obj_as(
+ type_=CashFlowStatement, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/company_info/client.py b/src/merge/resources/accounting/resources/company_info/client.py
index 10b1ac0a..8c89369c 100644
--- a/src/merge/resources/accounting/resources/company_info/client.py
+++ b/src/merge/resources/accounting/resources/company_info/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.company_info_list_request_expand import CompanyInfoListRequestExpand
from .....core.request_options import RequestOptions
-from ...types.company_info import CompanyInfo
from ...types.paginated_company_info_list import PaginatedCompanyInfoList
-from .types.company_info_list_request_expand import CompanyInfoListRequestExpand
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.company_info_retrieve_request_expand import CompanyInfoRetrieveRequestExpand
+from ...types.company_info import CompanyInfo
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class CompanyInfoClient:
@@ -29,6 +29,7 @@ def list(
expand: typing.Optional[CompanyInfoListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -53,11 +54,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -80,7 +84,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,6 +102,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -105,9 +110,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCompanyInfoList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCompanyInfoList,
+ parse_obj_as(
+ type_=PaginatedCompanyInfoList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -144,7 +155,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -157,12 +168,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/company-info/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CompanyInfo, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CompanyInfo,
+ parse_obj_as(
+ type_=CompanyInfo, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -182,6 +202,7 @@ async def list(
expand: typing.Optional[CompanyInfoListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -206,11 +227,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -233,13 +257,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.company_info.list()
+
+
+ async def main() -> None:
+ await client.accounting.company_info.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/company-info",
@@ -251,6 +283,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -258,9 +291,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCompanyInfoList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCompanyInfoList,
+ parse_obj_as(
+ type_=PaginatedCompanyInfoList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -297,25 +336,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.company_info.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.company_info.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/company-info/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CompanyInfo, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CompanyInfo,
+ parse_obj_as(
+ type_=CompanyInfo, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/company_info/types/company_info_list_request_expand.py b/src/merge/resources/accounting/resources/company_info/types/company_info_list_request_expand.py
index 302a55cf..af1973cd 100644
--- a/src/merge/resources/accounting/resources/company_info/types/company_info_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/company_info/types/company_info_list_request_expand.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CompanyInfoListRequestExpand(str, enum.Enum):
- ADDRESSES = "addresses"
- ADDRESSES_PHONE_NUMBERS = "addresses,phone_numbers"
- PHONE_NUMBERS = "phone_numbers"
-
- def visit(
- self,
- addresses: typing.Callable[[], T_Result],
- addresses_phone_numbers: typing.Callable[[], T_Result],
- phone_numbers: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CompanyInfoListRequestExpand.ADDRESSES:
- return addresses()
- if self is CompanyInfoListRequestExpand.ADDRESSES_PHONE_NUMBERS:
- return addresses_phone_numbers()
- if self is CompanyInfoListRequestExpand.PHONE_NUMBERS:
- return phone_numbers()
+CompanyInfoListRequestExpand = typing.Union[
+ typing.Literal["addresses", "addresses,phone_numbers", "phone_numbers"], typing.Any
+]
diff --git a/src/merge/resources/accounting/resources/company_info/types/company_info_retrieve_request_expand.py b/src/merge/resources/accounting/resources/company_info/types/company_info_retrieve_request_expand.py
index 07a88c17..19d530d8 100644
--- a/src/merge/resources/accounting/resources/company_info/types/company_info_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/company_info/types/company_info_retrieve_request_expand.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CompanyInfoRetrieveRequestExpand(str, enum.Enum):
- ADDRESSES = "addresses"
- ADDRESSES_PHONE_NUMBERS = "addresses,phone_numbers"
- PHONE_NUMBERS = "phone_numbers"
-
- def visit(
- self,
- addresses: typing.Callable[[], T_Result],
- addresses_phone_numbers: typing.Callable[[], T_Result],
- phone_numbers: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CompanyInfoRetrieveRequestExpand.ADDRESSES:
- return addresses()
- if self is CompanyInfoRetrieveRequestExpand.ADDRESSES_PHONE_NUMBERS:
- return addresses_phone_numbers()
- if self is CompanyInfoRetrieveRequestExpand.PHONE_NUMBERS:
- return phone_numbers()
+CompanyInfoRetrieveRequestExpand = typing.Union[
+ typing.Literal["addresses", "addresses,phone_numbers", "phone_numbers"], typing.Any
+]
diff --git a/src/merge/resources/accounting/resources/contacts/client.py b/src/merge/resources/accounting/resources/contacts/client.py
index 0453b111..7551b206 100644
--- a/src/merge/resources/accounting/resources/contacts/client.py
+++ b/src/merge/resources/accounting/resources/contacts/client.py
@@ -1,22 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.contacts_list_request_expand import ContactsListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_contact_list import PaginatedContactList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.contact import Contact
from ...types.contact_request import ContactRequest
from ...types.contact_response import ContactResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_contact_list import PaginatedContactList
-from .types.contacts_list_request_expand import ContactsListRequestExpand
from .types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand
+from ...types.contact import Contact
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,6 +37,8 @@ def list(
expand: typing.Optional[ContactsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
is_customer: typing.Optional[str] = None,
is_supplier: typing.Optional[str] = None,
modified_after: typing.Optional[dt.datetime] = None,
@@ -67,11 +70,17 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
is_customer : typing.Optional[str]
If provided, will only return Contacts that are denoted as customers.
@@ -106,7 +115,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -125,6 +134,8 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"is_customer": is_customer,
"is_supplier": is_supplier,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
@@ -136,9 +147,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedContactList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedContactList,
+ parse_obj_as(
+ type_=PaginatedContactList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -175,7 +192,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import ContactRequest
client = Merge(
@@ -189,14 +206,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/contacts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ContactResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ContactResponse,
+ parse_obj_as(
+ type_=ContactResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -208,6 +236,7 @@ def retrieve(
*,
expand: typing.Optional[ContactsRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
remote_fields: typing.Optional[typing.Literal["status"]] = None,
show_enum_origins: typing.Optional[typing.Literal["status"]] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -225,6 +254,9 @@ def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
remote_fields : typing.Optional[typing.Literal["status"]]
Deprecated. Use show_enum_origins.
@@ -241,7 +273,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -257,14 +289,21 @@ def retrieve(
params={
"expand": expand,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
"remote_fields": remote_fields,
"show_enum_origins": show_enum_origins,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Contact, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Contact,
+ parse_obj_as(
+ type_=Contact, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -286,7 +325,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -295,11 +334,98 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.accounting.contacts.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/contacts/meta/post", method="GET", request_options=request_options
+ "accounting/v1/contacts/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.contacts.remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/contacts/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -320,6 +446,8 @@ async def list(
expand: typing.Optional[ContactsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
is_customer: typing.Optional[str] = None,
is_supplier: typing.Optional[str] = None,
modified_after: typing.Optional[dt.datetime] = None,
@@ -351,11 +479,17 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
is_customer : typing.Optional[str]
If provided, will only return Contacts that are denoted as customers.
@@ -390,13 +524,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.contacts.list()
+
+
+ async def main() -> None:
+ await client.accounting.contacts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/contacts",
@@ -409,6 +551,8 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"is_customer": is_customer,
"is_supplier": is_supplier,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
@@ -420,9 +564,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedContactList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedContactList,
+ parse_obj_as(
+ type_=PaginatedContactList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -459,28 +609,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import ContactRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.contacts.create(
- model=ContactRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.contacts.create(
+ model=ContactRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/contacts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ContactResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ContactResponse,
+ parse_obj_as(
+ type_=ContactResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -492,6 +661,7 @@ async def retrieve(
*,
expand: typing.Optional[ContactsRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
remote_fields: typing.Optional[typing.Literal["status"]] = None,
show_enum_origins: typing.Optional[typing.Literal["status"]] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -509,6 +679,9 @@ async def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
remote_fields : typing.Optional[typing.Literal["status"]]
Deprecated. Use show_enum_origins.
@@ -525,15 +698,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.contacts.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.contacts.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/contacts/{jsonable_encoder(id)}",
@@ -541,14 +722,21 @@ async def retrieve(
params={
"expand": expand,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
"remote_fields": remote_fields,
"show_enum_origins": show_enum_origins,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Contact, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Contact,
+ parse_obj_as(
+ type_=Contact, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -570,20 +758,123 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.contacts.meta_post_retrieve()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/contacts/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.contacts.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.contacts.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/contacts/meta/post", method="GET", request_options=request_options
+ "accounting/v1/contacts/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/contacts/types/contacts_list_request_expand.py b/src/merge/resources/accounting/resources/contacts/types/contacts_list_request_expand.py
index 3d54ecdf..02e3d579 100644
--- a/src/merge/resources/accounting/resources/contacts/types/contacts_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/contacts/types/contacts_list_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ContactsListRequestExpand(str, enum.Enum):
- ADDRESSES = "addresses"
- ADDRESSES_COMPANY = "addresses,company"
- ADDRESSES_PHONE_NUMBERS = "addresses,phone_numbers"
- ADDRESSES_PHONE_NUMBERS_COMPANY = "addresses,phone_numbers,company"
- COMPANY = "company"
- PHONE_NUMBERS = "phone_numbers"
- PHONE_NUMBERS_COMPANY = "phone_numbers,company"
-
- def visit(
- self,
- addresses: typing.Callable[[], T_Result],
- addresses_company: typing.Callable[[], T_Result],
- addresses_phone_numbers: typing.Callable[[], T_Result],
- addresses_phone_numbers_company: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- phone_numbers: typing.Callable[[], T_Result],
- phone_numbers_company: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ContactsListRequestExpand.ADDRESSES:
- return addresses()
- if self is ContactsListRequestExpand.ADDRESSES_COMPANY:
- return addresses_company()
- if self is ContactsListRequestExpand.ADDRESSES_PHONE_NUMBERS:
- return addresses_phone_numbers()
- if self is ContactsListRequestExpand.ADDRESSES_PHONE_NUMBERS_COMPANY:
- return addresses_phone_numbers_company()
- if self is ContactsListRequestExpand.COMPANY:
- return company()
- if self is ContactsListRequestExpand.PHONE_NUMBERS:
- return phone_numbers()
- if self is ContactsListRequestExpand.PHONE_NUMBERS_COMPANY:
- return phone_numbers_company()
+ContactsListRequestExpand = typing.Union[
+ typing.Literal[
+ "addresses",
+ "addresses,company",
+ "addresses,phone_numbers",
+ "addresses,phone_numbers,company",
+ "company",
+ "phone_numbers",
+ "phone_numbers,company",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/contacts/types/contacts_retrieve_request_expand.py b/src/merge/resources/accounting/resources/contacts/types/contacts_retrieve_request_expand.py
index 5725a706..5b6fd22e 100644
--- a/src/merge/resources/accounting/resources/contacts/types/contacts_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/contacts/types/contacts_retrieve_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ContactsRetrieveRequestExpand(str, enum.Enum):
- ADDRESSES = "addresses"
- ADDRESSES_COMPANY = "addresses,company"
- ADDRESSES_PHONE_NUMBERS = "addresses,phone_numbers"
- ADDRESSES_PHONE_NUMBERS_COMPANY = "addresses,phone_numbers,company"
- COMPANY = "company"
- PHONE_NUMBERS = "phone_numbers"
- PHONE_NUMBERS_COMPANY = "phone_numbers,company"
-
- def visit(
- self,
- addresses: typing.Callable[[], T_Result],
- addresses_company: typing.Callable[[], T_Result],
- addresses_phone_numbers: typing.Callable[[], T_Result],
- addresses_phone_numbers_company: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- phone_numbers: typing.Callable[[], T_Result],
- phone_numbers_company: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ContactsRetrieveRequestExpand.ADDRESSES:
- return addresses()
- if self is ContactsRetrieveRequestExpand.ADDRESSES_COMPANY:
- return addresses_company()
- if self is ContactsRetrieveRequestExpand.ADDRESSES_PHONE_NUMBERS:
- return addresses_phone_numbers()
- if self is ContactsRetrieveRequestExpand.ADDRESSES_PHONE_NUMBERS_COMPANY:
- return addresses_phone_numbers_company()
- if self is ContactsRetrieveRequestExpand.COMPANY:
- return company()
- if self is ContactsRetrieveRequestExpand.PHONE_NUMBERS:
- return phone_numbers()
- if self is ContactsRetrieveRequestExpand.PHONE_NUMBERS_COMPANY:
- return phone_numbers_company()
+ContactsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "addresses",
+ "addresses,company",
+ "addresses,phone_numbers",
+ "addresses,phone_numbers,company",
+ "company",
+ "phone_numbers",
+ "phone_numbers,company",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/credit_notes/client.py b/src/merge/resources/accounting/resources/credit_notes/client.py
index 554844ba..c18bc01d 100644
--- a/src/merge/resources/accounting/resources/credit_notes/client.py
+++ b/src/merge/resources/accounting/resources/credit_notes/client.py
@@ -1,23 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.credit_note import CreditNote
-from ...types.paginated_credit_note_list import PaginatedCreditNoteList
+import datetime as dt
from .types.credit_notes_list_request_expand import CreditNotesListRequestExpand
from .types.credit_notes_list_request_remote_fields import CreditNotesListRequestRemoteFields
from .types.credit_notes_list_request_show_enum_origins import CreditNotesListRequestShowEnumOrigins
+from .....core.request_options import RequestOptions
+from ...types.paginated_credit_note_list import PaginatedCreditNoteList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.credit_notes_retrieve_request_expand import CreditNotesRetrieveRequestExpand
from .types.credit_notes_retrieve_request_remote_fields import CreditNotesRetrieveRequestRemoteFields
from .types.credit_notes_retrieve_request_show_enum_origins import CreditNotesRetrieveRequestShowEnumOrigins
+from ...types.credit_note import CreditNote
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class CreditNotesClient:
@@ -34,6 +34,7 @@ def list(
expand: typing.Optional[CreditNotesListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -65,11 +66,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -104,7 +108,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -123,6 +127,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -138,9 +143,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCreditNoteList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCreditNoteList,
+ parse_obj_as(
+ type_=PaginatedCreditNoteList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -185,7 +196,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -206,9 +217,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CreditNote, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CreditNote,
+ parse_obj_as(
+ type_=CreditNote, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -229,6 +246,7 @@ async def list(
expand: typing.Optional[CreditNotesListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -260,11 +278,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -299,13 +320,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.credit_notes.list()
+
+
+ async def main() -> None:
+ await client.accounting.credit_notes.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/credit-notes",
@@ -318,6 +347,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -333,9 +363,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCreditNoteList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCreditNoteList,
+ parse_obj_as(
+ type_=PaginatedCreditNoteList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -380,15 +416,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.credit_notes.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.credit_notes.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/credit-notes/{jsonable_encoder(id)}",
@@ -401,9 +445,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CreditNote, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CreditNote,
+ parse_obj_as(
+ type_=CreditNote, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_expand.py b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_expand.py
index 9f3c85db..7c09bfed 100644
--- a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_expand.py
@@ -1,627 +1,136 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CreditNotesListRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- APPLIED_PAYMENTS = "applied_payments"
- APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "applied_payments,accounting_period"
- APPLIED_PAYMENTS_COMPANY = "applied_payments,company"
- APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,company,accounting_period"
- APPLIED_PAYMENTS_CONTACT = "applied_payments,contact"
- APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "applied_payments,contact,accounting_period"
- APPLIED_PAYMENTS_CONTACT_COMPANY = "applied_payments,contact,company"
- APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "applied_payments,contact,company,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS = "applied_payments,line_items"
- APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "applied_payments,line_items,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_COMPANY = "applied_payments,line_items,company"
- APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,line_items,company,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT = "applied_payments,line_items,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "applied_payments,line_items,contact,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "applied_payments,line_items,contact,company"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = "applied_payments,line_items,tracking_categories"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "applied_payments,line_items,tracking_categories,company"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "applied_payments,line_items,tracking_categories,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,contact,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "applied_payments,line_items,tracking_categories,contact,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES = "applied_payments,tracking_categories"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "applied_payments,tracking_categories,accounting_period"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "applied_payments,tracking_categories,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT = "applied_payments,tracking_categories,contact"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,contact,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = "applied_payments,tracking_categories,contact,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,contact,company,accounting_period"
- )
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- CONTACT_COMPANY = "contact,company"
- CONTACT_COMPANY_ACCOUNTING_PERIOD = "contact,company,accounting_period"
- LINE_ITEMS = "line_items"
- LINE_ITEMS_ACCOUNTING_PERIOD = "line_items,accounting_period"
- LINE_ITEMS_COMPANY = "line_items,company"
- LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "line_items,company,accounting_period"
- LINE_ITEMS_CONTACT = "line_items,contact"
- LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "line_items,contact,accounting_period"
- LINE_ITEMS_CONTACT_COMPANY = "line_items,contact,company"
- LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "line_items,contact,company,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES = "line_items,tracking_categories"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "line_items,tracking_categories,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "line_items,tracking_categories,company"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "line_items,tracking_categories,contact"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = "line_items,tracking_categories,contact,company"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS = "payments"
- PAYMENTS_ACCOUNTING_PERIOD = "payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS = "payments,applied_payments"
- PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "payments,applied_payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY = "payments,applied_payments,company"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,applied_payments,company,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT = "payments,applied_payments,contact"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "payments,applied_payments,contact,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY = "payments,applied_payments,contact,company"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS = "payments,applied_payments,line_items"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "payments,applied_payments,line_items,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY = "payments,applied_payments,line_items,company"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT = "payments,applied_payments,line_items,contact"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "payments,applied_payments,line_items,contact,company"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = (
- "payments,applied_payments,line_items,tracking_categories"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = (
- "payments,applied_payments,line_items,tracking_categories,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "payments,applied_payments,tracking_categories"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,applied_payments,tracking_categories,company"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT = "payments,applied_payments,tracking_categories,contact"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "payments,applied_payments,tracking_categories,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_COMPANY = "payments,company"
- PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,company,accounting_period"
- PAYMENTS_CONTACT = "payments,contact"
- PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "payments,contact,accounting_period"
- PAYMENTS_CONTACT_COMPANY = "payments,contact,company"
- PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "payments,contact,company,accounting_period"
- PAYMENTS_LINE_ITEMS = "payments,line_items"
- PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "payments,line_items,accounting_period"
- PAYMENTS_LINE_ITEMS_COMPANY = "payments,line_items,company"
- PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "payments,line_items,company,accounting_period"
- PAYMENTS_LINE_ITEMS_CONTACT = "payments,line_items,contact"
- PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "payments,line_items,contact,accounting_period"
- PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "payments,line_items,contact,company"
- PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "payments,line_items,contact,company,accounting_period"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = "payments,line_items,tracking_categories"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "payments,line_items,tracking_categories,company"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "payments,line_items,tracking_categories,contact"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = "payments,line_items,tracking_categories,contact,company"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES = "payments,tracking_categories"
- PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "payments,tracking_categories,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,tracking_categories,company"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "payments,tracking_categories,company,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT = "payments,tracking_categories,contact"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "payments,tracking_categories,contact,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = "payments,tracking_categories,contact,company"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,contact,company,accounting_period"
- )
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
- TRACKING_CATEGORIES_CONTACT_COMPANY = "tracking_categories,contact,company"
- TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,contact,company,accounting_period"
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- applied_payments: typing.Callable[[], T_Result],
- applied_payments_accounting_period: typing.Callable[[], T_Result],
- applied_payments_company: typing.Callable[[], T_Result],
- applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_contact: typing.Callable[[], T_Result],
- applied_payments_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_contact_company: typing.Callable[[], T_Result],
- applied_payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items: typing.Callable[[], T_Result],
- applied_payments_line_items_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_company: typing.Callable[[], T_Result],
- applied_payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- contact_company: typing.Callable[[], T_Result],
- contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items: typing.Callable[[], T_Result],
- line_items_accounting_period: typing.Callable[[], T_Result],
- line_items_company: typing.Callable[[], T_Result],
- line_items_company_accounting_period: typing.Callable[[], T_Result],
- line_items_contact: typing.Callable[[], T_Result],
- line_items_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_contact_company: typing.Callable[[], T_Result],
- line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories: typing.Callable[[], T_Result],
- line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments: typing.Callable[[], T_Result],
- payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments: typing.Callable[[], T_Result],
- payments_applied_payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_company: typing.Callable[[], T_Result],
- payments_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_contact: typing.Callable[[], T_Result],
- payments_applied_payments_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_company: typing.Callable[[], T_Result],
- payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_contact: typing.Callable[[], T_Result],
- payments_contact_accounting_period: typing.Callable[[], T_Result],
- payments_contact_company: typing.Callable[[], T_Result],
- payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items: typing.Callable[[], T_Result],
- payments_line_items_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_company: typing.Callable[[], T_Result],
- payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_contact: typing.Callable[[], T_Result],
- payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_contact_company: typing.Callable[[], T_Result],
- payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories: typing.Callable[[], T_Result],
- payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_company: typing.Callable[[], T_Result],
- tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CreditNotesListRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS:
- return applied_payments()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return applied_payments_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_COMPANY:
- return applied_payments_company()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_company_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_CONTACT:
- return applied_payments_contact()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_contact_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_CONTACT_COMPANY:
- return applied_payments_contact_company()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS:
- return applied_payments_line_items()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return applied_payments_line_items_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_COMPANY:
- return applied_payments_line_items_company()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_company_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT:
- return applied_payments_line_items_contact()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_line_items_contact_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return applied_payments_line_items_contact_company()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return applied_payments_line_items_tracking_categories()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_line_items_tracking_categories_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_line_items_tracking_categories_company()
- if (
- self
- is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_company_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return applied_payments_line_items_tracking_categories_contact()
- if (
- self
- is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_contact_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return applied_payments_line_items_tracking_categories_contact_company()
- if (
- self
- is CreditNotesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return applied_payments_tracking_categories()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_tracking_categories_company()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_company_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return applied_payments_tracking_categories_contact()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_contact_accounting_period()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return applied_payments_tracking_categories_contact_company()
- if self is CreditNotesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.COMPANY:
- return company()
- if self is CreditNotesListRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is CreditNotesListRequestExpand.CONTACT:
- return contact()
- if self is CreditNotesListRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is CreditNotesListRequestExpand.CONTACT_COMPANY:
- return contact_company()
- if self is CreditNotesListRequestExpand.CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.LINE_ITEMS:
- return line_items()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_ACCOUNTING_PERIOD:
- return line_items_accounting_period()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_COMPANY:
- return line_items_company()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_company_accounting_period()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_CONTACT:
- return line_items_contact()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_contact_accounting_period()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_CONTACT_COMPANY:
- return line_items_contact_company()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES:
- return line_items_tracking_categories()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_accounting_period()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return line_items_tracking_categories_company()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_company_accounting_period()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return line_items_tracking_categories_contact()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_accounting_period()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return line_items_tracking_categories_contact_company()
- if self is CreditNotesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS:
- return payments()
- if self is CreditNotesListRequestExpand.PAYMENTS_ACCOUNTING_PERIOD:
- return payments_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS:
- return payments_applied_payments()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return payments_applied_payments_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY:
- return payments_applied_payments_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT:
- return payments_applied_payments_contact()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_contact_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY:
- return payments_applied_payments_contact_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS:
- return payments_applied_payments_line_items()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY:
- return payments_applied_payments_line_items_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT:
- return payments_applied_payments_line_items_contact()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_contact_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return payments_applied_payments_line_items_contact_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return payments_applied_payments_line_items_tracking_categories()
- if (
- self
- is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_line_items_tracking_categories_company()
- if (
- self
- is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return payments_applied_payments_line_items_tracking_categories_contact()
- if (
- self
- is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_accounting_period()
- if (
- self
- is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_company()
- if (
- self
- is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return payments_applied_payments_tracking_categories()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_tracking_categories_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return payments_applied_payments_tracking_categories_contact()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_contact_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_applied_payments_tracking_categories_contact_company()
- if (
- self
- is CreditNotesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_COMPANY:
- return payments_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_CONTACT:
- return payments_contact()
- if self is CreditNotesListRequestExpand.PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return payments_contact_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_CONTACT_COMPANY:
- return payments_contact_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS:
- return payments_line_items()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return payments_line_items_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_COMPANY:
- return payments_line_items_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT:
- return payments_line_items_contact()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_contact_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return payments_line_items_contact_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return payments_line_items_tracking_categories()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return payments_line_items_tracking_categories_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return payments_line_items_tracking_categories_contact()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_contact_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_line_items_tracking_categories_contact_company()
- if (
- self
- is CreditNotesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES:
- return payments_tracking_categories()
- if self is CreditNotesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_tracking_categories_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_tracking_categories_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_company_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return payments_tracking_categories_contact()
- if self is CreditNotesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_tracking_categories_contact_accounting_period()
- if self is CreditNotesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_tracking_categories_contact_company()
- if self is CreditNotesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesListRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is CreditNotesListRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is CreditNotesListRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is CreditNotesListRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is CreditNotesListRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is CreditNotesListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
- if self is CreditNotesListRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY:
- return tracking_categories_contact_company()
- if self is CreditNotesListRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_company_accounting_period()
+CreditNotesListRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "applied_payments",
+ "applied_payments,accounting_period",
+ "applied_payments,company",
+ "applied_payments,company,accounting_period",
+ "applied_payments,contact",
+ "applied_payments,contact,accounting_period",
+ "applied_payments,contact,company",
+ "applied_payments,contact,company,accounting_period",
+ "applied_payments,line_items",
+ "applied_payments,line_items,accounting_period",
+ "applied_payments,line_items,company",
+ "applied_payments,line_items,company,accounting_period",
+ "applied_payments,line_items,contact",
+ "applied_payments,line_items,contact,accounting_period",
+ "applied_payments,line_items,contact,company",
+ "applied_payments,line_items,contact,company,accounting_period",
+ "applied_payments,line_items,tracking_categories",
+ "applied_payments,line_items,tracking_categories,accounting_period",
+ "applied_payments,line_items,tracking_categories,company",
+ "applied_payments,line_items,tracking_categories,company,accounting_period",
+ "applied_payments,line_items,tracking_categories,contact",
+ "applied_payments,line_items,tracking_categories,contact,accounting_period",
+ "applied_payments,line_items,tracking_categories,contact,company",
+ "applied_payments,line_items,tracking_categories,contact,company,accounting_period",
+ "applied_payments,tracking_categories",
+ "applied_payments,tracking_categories,accounting_period",
+ "applied_payments,tracking_categories,company",
+ "applied_payments,tracking_categories,company,accounting_period",
+ "applied_payments,tracking_categories,contact",
+ "applied_payments,tracking_categories,contact,accounting_period",
+ "applied_payments,tracking_categories,contact,company",
+ "applied_payments,tracking_categories,contact,company,accounting_period",
+ "company",
+ "company,accounting_period",
+ "contact",
+ "contact,accounting_period",
+ "contact,company",
+ "contact,company,accounting_period",
+ "line_items",
+ "line_items,accounting_period",
+ "line_items,company",
+ "line_items,company,accounting_period",
+ "line_items,contact",
+ "line_items,contact,accounting_period",
+ "line_items,contact,company",
+ "line_items,contact,company,accounting_period",
+ "line_items,tracking_categories",
+ "line_items,tracking_categories,accounting_period",
+ "line_items,tracking_categories,company",
+ "line_items,tracking_categories,company,accounting_period",
+ "line_items,tracking_categories,contact",
+ "line_items,tracking_categories,contact,accounting_period",
+ "line_items,tracking_categories,contact,company",
+ "line_items,tracking_categories,contact,company,accounting_period",
+ "payments",
+ "payments,accounting_period",
+ "payments,applied_payments",
+ "payments,applied_payments,accounting_period",
+ "payments,applied_payments,company",
+ "payments,applied_payments,company,accounting_period",
+ "payments,applied_payments,contact",
+ "payments,applied_payments,contact,accounting_period",
+ "payments,applied_payments,contact,company",
+ "payments,applied_payments,contact,company,accounting_period",
+ "payments,applied_payments,line_items",
+ "payments,applied_payments,line_items,accounting_period",
+ "payments,applied_payments,line_items,company",
+ "payments,applied_payments,line_items,company,accounting_period",
+ "payments,applied_payments,line_items,contact",
+ "payments,applied_payments,line_items,contact,accounting_period",
+ "payments,applied_payments,line_items,contact,company",
+ "payments,applied_payments,line_items,contact,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories",
+ "payments,applied_payments,line_items,tracking_categories,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,company",
+ "payments,applied_payments,line_items,tracking_categories,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,contact",
+ "payments,applied_payments,line_items,tracking_categories,contact,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,contact,company",
+ "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period",
+ "payments,applied_payments,tracking_categories",
+ "payments,applied_payments,tracking_categories,accounting_period",
+ "payments,applied_payments,tracking_categories,company",
+ "payments,applied_payments,tracking_categories,company,accounting_period",
+ "payments,applied_payments,tracking_categories,contact",
+ "payments,applied_payments,tracking_categories,contact,accounting_period",
+ "payments,applied_payments,tracking_categories,contact,company",
+ "payments,applied_payments,tracking_categories,contact,company,accounting_period",
+ "payments,company",
+ "payments,company,accounting_period",
+ "payments,contact",
+ "payments,contact,accounting_period",
+ "payments,contact,company",
+ "payments,contact,company,accounting_period",
+ "payments,line_items",
+ "payments,line_items,accounting_period",
+ "payments,line_items,company",
+ "payments,line_items,company,accounting_period",
+ "payments,line_items,contact",
+ "payments,line_items,contact,accounting_period",
+ "payments,line_items,contact,company",
+ "payments,line_items,contact,company,accounting_period",
+ "payments,line_items,tracking_categories",
+ "payments,line_items,tracking_categories,accounting_period",
+ "payments,line_items,tracking_categories,company",
+ "payments,line_items,tracking_categories,company,accounting_period",
+ "payments,line_items,tracking_categories,contact",
+ "payments,line_items,tracking_categories,contact,accounting_period",
+ "payments,line_items,tracking_categories,contact,company",
+ "payments,line_items,tracking_categories,contact,company,accounting_period",
+ "payments,tracking_categories",
+ "payments,tracking_categories,accounting_period",
+ "payments,tracking_categories,company",
+ "payments,tracking_categories,company,accounting_period",
+ "payments,tracking_categories,contact",
+ "payments,tracking_categories,contact,accounting_period",
+ "payments,tracking_categories,contact,company",
+ "payments,tracking_categories,contact,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,accounting_period",
+ "tracking_categories,contact,company",
+ "tracking_categories,contact,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_remote_fields.py b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_remote_fields.py
index e881f032..0d0cce65 100644
--- a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_remote_fields.py
+++ b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_remote_fields.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CreditNotesListRequestRemoteFields(str, enum.Enum):
- STATUS = "status"
- STATUS_TYPE = "status,type"
- TYPE = "type"
-
- def visit(
- self,
- status: typing.Callable[[], T_Result],
- status_type: typing.Callable[[], T_Result],
- type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CreditNotesListRequestRemoteFields.STATUS:
- return status()
- if self is CreditNotesListRequestRemoteFields.STATUS_TYPE:
- return status_type()
- if self is CreditNotesListRequestRemoteFields.TYPE:
- return type()
+CreditNotesListRequestRemoteFields = typing.Union[typing.Literal["status", "status,type", "type"], typing.Any]
diff --git a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_show_enum_origins.py b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_show_enum_origins.py
index e2d8982c..3e8e91fb 100644
--- a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_show_enum_origins.py
+++ b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_list_request_show_enum_origins.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CreditNotesListRequestShowEnumOrigins(str, enum.Enum):
- STATUS = "status"
- STATUS_TYPE = "status,type"
- TYPE = "type"
-
- def visit(
- self,
- status: typing.Callable[[], T_Result],
- status_type: typing.Callable[[], T_Result],
- type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CreditNotesListRequestShowEnumOrigins.STATUS:
- return status()
- if self is CreditNotesListRequestShowEnumOrigins.STATUS_TYPE:
- return status_type()
- if self is CreditNotesListRequestShowEnumOrigins.TYPE:
- return type()
+CreditNotesListRequestShowEnumOrigins = typing.Union[typing.Literal["status", "status,type", "type"], typing.Any]
diff --git a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_expand.py b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_expand.py
index 60a5d54c..574219b8 100644
--- a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_expand.py
@@ -1,639 +1,136 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CreditNotesRetrieveRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- APPLIED_PAYMENTS = "applied_payments"
- APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "applied_payments,accounting_period"
- APPLIED_PAYMENTS_COMPANY = "applied_payments,company"
- APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,company,accounting_period"
- APPLIED_PAYMENTS_CONTACT = "applied_payments,contact"
- APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "applied_payments,contact,accounting_period"
- APPLIED_PAYMENTS_CONTACT_COMPANY = "applied_payments,contact,company"
- APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "applied_payments,contact,company,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS = "applied_payments,line_items"
- APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "applied_payments,line_items,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_COMPANY = "applied_payments,line_items,company"
- APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,line_items,company,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT = "applied_payments,line_items,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "applied_payments,line_items,contact,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "applied_payments,line_items,contact,company"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = "applied_payments,line_items,tracking_categories"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "applied_payments,line_items,tracking_categories,company"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "applied_payments,line_items,tracking_categories,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,contact,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "applied_payments,line_items,tracking_categories,contact,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES = "applied_payments,tracking_categories"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "applied_payments,tracking_categories,accounting_period"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "applied_payments,tracking_categories,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT = "applied_payments,tracking_categories,contact"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,contact,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = "applied_payments,tracking_categories,contact,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,contact,company,accounting_period"
- )
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- CONTACT_COMPANY = "contact,company"
- CONTACT_COMPANY_ACCOUNTING_PERIOD = "contact,company,accounting_period"
- LINE_ITEMS = "line_items"
- LINE_ITEMS_ACCOUNTING_PERIOD = "line_items,accounting_period"
- LINE_ITEMS_COMPANY = "line_items,company"
- LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "line_items,company,accounting_period"
- LINE_ITEMS_CONTACT = "line_items,contact"
- LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "line_items,contact,accounting_period"
- LINE_ITEMS_CONTACT_COMPANY = "line_items,contact,company"
- LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "line_items,contact,company,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES = "line_items,tracking_categories"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "line_items,tracking_categories,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "line_items,tracking_categories,company"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "line_items,tracking_categories,contact"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = "line_items,tracking_categories,contact,company"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS = "payments"
- PAYMENTS_ACCOUNTING_PERIOD = "payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS = "payments,applied_payments"
- PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "payments,applied_payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY = "payments,applied_payments,company"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,applied_payments,company,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT = "payments,applied_payments,contact"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "payments,applied_payments,contact,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY = "payments,applied_payments,contact,company"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS = "payments,applied_payments,line_items"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "payments,applied_payments,line_items,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY = "payments,applied_payments,line_items,company"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT = "payments,applied_payments,line_items,contact"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "payments,applied_payments,line_items,contact,company"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = (
- "payments,applied_payments,line_items,tracking_categories"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = (
- "payments,applied_payments,line_items,tracking_categories,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "payments,applied_payments,tracking_categories"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,applied_payments,tracking_categories,company"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT = "payments,applied_payments,tracking_categories,contact"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "payments,applied_payments,tracking_categories,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_COMPANY = "payments,company"
- PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,company,accounting_period"
- PAYMENTS_CONTACT = "payments,contact"
- PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "payments,contact,accounting_period"
- PAYMENTS_CONTACT_COMPANY = "payments,contact,company"
- PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "payments,contact,company,accounting_period"
- PAYMENTS_LINE_ITEMS = "payments,line_items"
- PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "payments,line_items,accounting_period"
- PAYMENTS_LINE_ITEMS_COMPANY = "payments,line_items,company"
- PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "payments,line_items,company,accounting_period"
- PAYMENTS_LINE_ITEMS_CONTACT = "payments,line_items,contact"
- PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "payments,line_items,contact,accounting_period"
- PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "payments,line_items,contact,company"
- PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "payments,line_items,contact,company,accounting_period"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = "payments,line_items,tracking_categories"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "payments,line_items,tracking_categories,company"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "payments,line_items,tracking_categories,contact"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = "payments,line_items,tracking_categories,contact,company"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES = "payments,tracking_categories"
- PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "payments,tracking_categories,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,tracking_categories,company"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "payments,tracking_categories,company,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT = "payments,tracking_categories,contact"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "payments,tracking_categories,contact,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = "payments,tracking_categories,contact,company"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,contact,company,accounting_period"
- )
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
- TRACKING_CATEGORIES_CONTACT_COMPANY = "tracking_categories,contact,company"
- TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,contact,company,accounting_period"
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- applied_payments: typing.Callable[[], T_Result],
- applied_payments_accounting_period: typing.Callable[[], T_Result],
- applied_payments_company: typing.Callable[[], T_Result],
- applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_contact: typing.Callable[[], T_Result],
- applied_payments_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_contact_company: typing.Callable[[], T_Result],
- applied_payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items: typing.Callable[[], T_Result],
- applied_payments_line_items_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_company: typing.Callable[[], T_Result],
- applied_payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- contact_company: typing.Callable[[], T_Result],
- contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items: typing.Callable[[], T_Result],
- line_items_accounting_period: typing.Callable[[], T_Result],
- line_items_company: typing.Callable[[], T_Result],
- line_items_company_accounting_period: typing.Callable[[], T_Result],
- line_items_contact: typing.Callable[[], T_Result],
- line_items_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_contact_company: typing.Callable[[], T_Result],
- line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories: typing.Callable[[], T_Result],
- line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments: typing.Callable[[], T_Result],
- payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments: typing.Callable[[], T_Result],
- payments_applied_payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_company: typing.Callable[[], T_Result],
- payments_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_contact: typing.Callable[[], T_Result],
- payments_applied_payments_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_company: typing.Callable[[], T_Result],
- payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_contact: typing.Callable[[], T_Result],
- payments_contact_accounting_period: typing.Callable[[], T_Result],
- payments_contact_company: typing.Callable[[], T_Result],
- payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items: typing.Callable[[], T_Result],
- payments_line_items_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_company: typing.Callable[[], T_Result],
- payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_contact: typing.Callable[[], T_Result],
- payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_contact_company: typing.Callable[[], T_Result],
- payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories: typing.Callable[[], T_Result],
- payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_company: typing.Callable[[], T_Result],
- tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CreditNotesRetrieveRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS:
- return applied_payments()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return applied_payments_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_COMPANY:
- return applied_payments_company()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_CONTACT:
- return applied_payments_contact()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_CONTACT_COMPANY:
- return applied_payments_contact_company()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS:
- return applied_payments_line_items()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return applied_payments_line_items_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_COMPANY:
- return applied_payments_line_items_company()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT:
- return applied_payments_line_items_contact()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_line_items_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return applied_payments_line_items_contact_company()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return applied_payments_line_items_tracking_categories()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_line_items_tracking_categories_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_line_items_tracking_categories_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return applied_payments_line_items_tracking_categories_contact()
- if (
- self
- is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return applied_payments_line_items_tracking_categories_contact_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return applied_payments_tracking_categories()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_tracking_categories_company()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return applied_payments_tracking_categories_contact()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return applied_payments_tracking_categories_contact_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.COMPANY:
- return company()
- if self is CreditNotesRetrieveRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.CONTACT:
- return contact()
- if self is CreditNotesRetrieveRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.CONTACT_COMPANY:
- return contact_company()
- if self is CreditNotesRetrieveRequestExpand.CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS:
- return line_items()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_ACCOUNTING_PERIOD:
- return line_items_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_COMPANY:
- return line_items_company()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_CONTACT:
- return line_items_contact()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_CONTACT_COMPANY:
- return line_items_contact_company()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES:
- return line_items_tracking_categories()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return line_items_tracking_categories_company()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return line_items_tracking_categories_contact()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return line_items_tracking_categories_contact_company()
- if self is CreditNotesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS:
- return payments()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_ACCOUNTING_PERIOD:
- return payments_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS:
- return payments_applied_payments()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return payments_applied_payments_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY:
- return payments_applied_payments_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT:
- return payments_applied_payments_contact()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY:
- return payments_applied_payments_contact_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS:
- return payments_applied_payments_line_items()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY:
- return payments_applied_payments_line_items_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT:
- return payments_applied_payments_line_items_contact()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return payments_applied_payments_line_items_contact_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return payments_applied_payments_line_items_tracking_categories()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_line_items_tracking_categories_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return payments_applied_payments_line_items_tracking_categories_contact()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_accounting_period()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return payments_applied_payments_tracking_categories()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_tracking_categories_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return payments_applied_payments_tracking_categories_contact()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_applied_payments_tracking_categories_contact_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_COMPANY:
- return payments_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_CONTACT:
- return payments_contact()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return payments_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_CONTACT_COMPANY:
- return payments_contact_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS:
- return payments_line_items()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return payments_line_items_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_COMPANY:
- return payments_line_items_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT:
- return payments_line_items_contact()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return payments_line_items_contact_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return payments_line_items_tracking_categories()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return payments_line_items_tracking_categories_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return payments_line_items_tracking_categories_contact()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_line_items_tracking_categories_contact_company()
- if (
- self
- is CreditNotesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES:
- return payments_tracking_categories()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_tracking_categories_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_tracking_categories_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return payments_tracking_categories_contact()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_tracking_categories_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_tracking_categories_contact_company()
- if self is CreditNotesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_contact_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is CreditNotesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is CreditNotesRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is CreditNotesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
- if self is CreditNotesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY:
- return tracking_categories_contact_company()
- if self is CreditNotesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_company_accounting_period()
+CreditNotesRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "applied_payments",
+ "applied_payments,accounting_period",
+ "applied_payments,company",
+ "applied_payments,company,accounting_period",
+ "applied_payments,contact",
+ "applied_payments,contact,accounting_period",
+ "applied_payments,contact,company",
+ "applied_payments,contact,company,accounting_period",
+ "applied_payments,line_items",
+ "applied_payments,line_items,accounting_period",
+ "applied_payments,line_items,company",
+ "applied_payments,line_items,company,accounting_period",
+ "applied_payments,line_items,contact",
+ "applied_payments,line_items,contact,accounting_period",
+ "applied_payments,line_items,contact,company",
+ "applied_payments,line_items,contact,company,accounting_period",
+ "applied_payments,line_items,tracking_categories",
+ "applied_payments,line_items,tracking_categories,accounting_period",
+ "applied_payments,line_items,tracking_categories,company",
+ "applied_payments,line_items,tracking_categories,company,accounting_period",
+ "applied_payments,line_items,tracking_categories,contact",
+ "applied_payments,line_items,tracking_categories,contact,accounting_period",
+ "applied_payments,line_items,tracking_categories,contact,company",
+ "applied_payments,line_items,tracking_categories,contact,company,accounting_period",
+ "applied_payments,tracking_categories",
+ "applied_payments,tracking_categories,accounting_period",
+ "applied_payments,tracking_categories,company",
+ "applied_payments,tracking_categories,company,accounting_period",
+ "applied_payments,tracking_categories,contact",
+ "applied_payments,tracking_categories,contact,accounting_period",
+ "applied_payments,tracking_categories,contact,company",
+ "applied_payments,tracking_categories,contact,company,accounting_period",
+ "company",
+ "company,accounting_period",
+ "contact",
+ "contact,accounting_period",
+ "contact,company",
+ "contact,company,accounting_period",
+ "line_items",
+ "line_items,accounting_period",
+ "line_items,company",
+ "line_items,company,accounting_period",
+ "line_items,contact",
+ "line_items,contact,accounting_period",
+ "line_items,contact,company",
+ "line_items,contact,company,accounting_period",
+ "line_items,tracking_categories",
+ "line_items,tracking_categories,accounting_period",
+ "line_items,tracking_categories,company",
+ "line_items,tracking_categories,company,accounting_period",
+ "line_items,tracking_categories,contact",
+ "line_items,tracking_categories,contact,accounting_period",
+ "line_items,tracking_categories,contact,company",
+ "line_items,tracking_categories,contact,company,accounting_period",
+ "payments",
+ "payments,accounting_period",
+ "payments,applied_payments",
+ "payments,applied_payments,accounting_period",
+ "payments,applied_payments,company",
+ "payments,applied_payments,company,accounting_period",
+ "payments,applied_payments,contact",
+ "payments,applied_payments,contact,accounting_period",
+ "payments,applied_payments,contact,company",
+ "payments,applied_payments,contact,company,accounting_period",
+ "payments,applied_payments,line_items",
+ "payments,applied_payments,line_items,accounting_period",
+ "payments,applied_payments,line_items,company",
+ "payments,applied_payments,line_items,company,accounting_period",
+ "payments,applied_payments,line_items,contact",
+ "payments,applied_payments,line_items,contact,accounting_period",
+ "payments,applied_payments,line_items,contact,company",
+ "payments,applied_payments,line_items,contact,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories",
+ "payments,applied_payments,line_items,tracking_categories,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,company",
+ "payments,applied_payments,line_items,tracking_categories,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,contact",
+ "payments,applied_payments,line_items,tracking_categories,contact,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,contact,company",
+ "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period",
+ "payments,applied_payments,tracking_categories",
+ "payments,applied_payments,tracking_categories,accounting_period",
+ "payments,applied_payments,tracking_categories,company",
+ "payments,applied_payments,tracking_categories,company,accounting_period",
+ "payments,applied_payments,tracking_categories,contact",
+ "payments,applied_payments,tracking_categories,contact,accounting_period",
+ "payments,applied_payments,tracking_categories,contact,company",
+ "payments,applied_payments,tracking_categories,contact,company,accounting_period",
+ "payments,company",
+ "payments,company,accounting_period",
+ "payments,contact",
+ "payments,contact,accounting_period",
+ "payments,contact,company",
+ "payments,contact,company,accounting_period",
+ "payments,line_items",
+ "payments,line_items,accounting_period",
+ "payments,line_items,company",
+ "payments,line_items,company,accounting_period",
+ "payments,line_items,contact",
+ "payments,line_items,contact,accounting_period",
+ "payments,line_items,contact,company",
+ "payments,line_items,contact,company,accounting_period",
+ "payments,line_items,tracking_categories",
+ "payments,line_items,tracking_categories,accounting_period",
+ "payments,line_items,tracking_categories,company",
+ "payments,line_items,tracking_categories,company,accounting_period",
+ "payments,line_items,tracking_categories,contact",
+ "payments,line_items,tracking_categories,contact,accounting_period",
+ "payments,line_items,tracking_categories,contact,company",
+ "payments,line_items,tracking_categories,contact,company,accounting_period",
+ "payments,tracking_categories",
+ "payments,tracking_categories,accounting_period",
+ "payments,tracking_categories,company",
+ "payments,tracking_categories,company,accounting_period",
+ "payments,tracking_categories,contact",
+ "payments,tracking_categories,contact,accounting_period",
+ "payments,tracking_categories,contact,company",
+ "payments,tracking_categories,contact,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,accounting_period",
+ "tracking_categories,contact,company",
+ "tracking_categories,contact,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_remote_fields.py b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_remote_fields.py
index 4c6fda3c..dea8b41e 100644
--- a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_remote_fields.py
+++ b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_remote_fields.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CreditNotesRetrieveRequestRemoteFields(str, enum.Enum):
- STATUS = "status"
- STATUS_TYPE = "status,type"
- TYPE = "type"
-
- def visit(
- self,
- status: typing.Callable[[], T_Result],
- status_type: typing.Callable[[], T_Result],
- type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CreditNotesRetrieveRequestRemoteFields.STATUS:
- return status()
- if self is CreditNotesRetrieveRequestRemoteFields.STATUS_TYPE:
- return status_type()
- if self is CreditNotesRetrieveRequestRemoteFields.TYPE:
- return type()
+CreditNotesRetrieveRequestRemoteFields = typing.Union[typing.Literal["status", "status,type", "type"], typing.Any]
diff --git a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_show_enum_origins.py b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_show_enum_origins.py
index 108451a1..eaa0a6c6 100644
--- a/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/accounting/resources/credit_notes/types/credit_notes_retrieve_request_show_enum_origins.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CreditNotesRetrieveRequestShowEnumOrigins(str, enum.Enum):
- STATUS = "status"
- STATUS_TYPE = "status,type"
- TYPE = "type"
-
- def visit(
- self,
- status: typing.Callable[[], T_Result],
- status_type: typing.Callable[[], T_Result],
- type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CreditNotesRetrieveRequestShowEnumOrigins.STATUS:
- return status()
- if self is CreditNotesRetrieveRequestShowEnumOrigins.STATUS_TYPE:
- return status_type()
- if self is CreditNotesRetrieveRequestShowEnumOrigins.TYPE:
- return type()
+CreditNotesRetrieveRequestShowEnumOrigins = typing.Union[typing.Literal["status", "status,type", "type"], typing.Any]
diff --git a/src/merge/resources/accounting/resources/delete_account/client.py b/src/merge/resources/accounting/resources/delete_account/client.py
index 389b267a..3f72128b 100644
--- a/src/merge/resources/accounting/resources/delete_account/client.py
+++ b/src/merge/resources/accounting/resources/delete_account/client.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
+from .....core.request_options import RequestOptions
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import AsyncClientWrapper
class DeleteAccountClient:
@@ -27,7 +27,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -36,11 +36,13 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
client.accounting.delete_account.delete()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/delete-account", method="POST", request_options=request_options
+ "accounting/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -66,20 +68,30 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.delete_account.delete()
+
+
+ async def main() -> None:
+ await client.accounting.delete_account.delete()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/delete-account", method="POST", request_options=request_options
+ "accounting/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/expenses/client.py b/src/merge/resources/accounting/resources/expenses/client.py
index 22c0e0b2..43198999 100644
--- a/src/merge/resources/accounting/resources/expenses/client.py
+++ b/src/merge/resources/accounting/resources/expenses/client.py
@@ -1,22 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.expenses_list_request_expand import ExpensesListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_expense_list import PaginatedExpenseList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.expense import Expense
from ...types.expense_request import ExpenseRequest
from ...types.expense_response import ExpenseResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_expense_list import PaginatedExpenseList
-from .types.expenses_list_request_expand import ExpensesListRequestExpand
from .types.expenses_retrieve_request_expand import ExpensesRetrieveRequestExpand
+from ...types.expense import Expense
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,6 +37,8 @@ def list(
expand: typing.Optional[ExpensesListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -65,11 +68,17 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -98,7 +107,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -117,6 +126,8 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -130,9 +141,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedExpenseList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedExpenseList,
+ parse_obj_as(
+ type_=PaginatedExpenseList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -169,7 +186,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import ExpenseRequest
client = Merge(
@@ -183,14 +200,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/expenses",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExpenseResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExpenseResponse,
+ parse_obj_as(
+ type_=ExpenseResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -202,6 +230,7 @@ def retrieve(
*,
expand: typing.Optional[ExpensesRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> Expense:
"""
@@ -217,6 +246,9 @@ def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -227,7 +259,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -240,12 +272,101 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/expenses/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Expense,
+ parse_obj_as(
+ type_=Expense, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def lines_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.expenses.lines_remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/expenses/lines/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Expense, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -267,7 +388,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -276,11 +397,98 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.accounting.expenses.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/expenses/meta/post", method="GET", request_options=request_options
+ "accounting/v1/expenses/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.expenses.remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/expenses/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -301,6 +509,8 @@ async def list(
expand: typing.Optional[ExpensesListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -330,11 +540,17 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -363,13 +579,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.expenses.list()
+
+
+ async def main() -> None:
+ await client.accounting.expenses.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/expenses",
@@ -382,6 +606,8 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -395,9 +621,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedExpenseList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedExpenseList,
+ parse_obj_as(
+ type_=PaginatedExpenseList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -434,28 +666,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import ExpenseRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.expenses.create(
- model=ExpenseRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.expenses.create(
+ model=ExpenseRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/expenses",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExpenseResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExpenseResponse,
+ parse_obj_as(
+ type_=ExpenseResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -467,6 +718,7 @@ async def retrieve(
*,
expand: typing.Optional[ExpensesRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> Expense:
"""
@@ -482,6 +734,9 @@ async def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -492,25 +747,130 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.expenses.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.expenses.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/expenses/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Expense, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Expense,
+ parse_obj_as(
+ type_=Expense, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def lines_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.expenses.lines_remote_field_classes_list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/expenses/lines/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -532,20 +892,123 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.expenses.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.expenses.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/expenses/meta/post", method="GET", request_options=request_options
+ "accounting/v1/expenses/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.expenses.remote_field_classes_list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/expenses/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/expenses/types/expenses_list_request_expand.py b/src/merge/resources/accounting/resources/expenses/types/expenses_list_request_expand.py
index 461fb8c3..58534ba4 100644
--- a/src/merge/resources/accounting/resources/expenses/types/expenses_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/expenses/types/expenses_list_request_expand.py
@@ -1,139 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ExpensesListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_ACCOUNTING_PERIOD = "account,accounting_period"
- ACCOUNT_COMPANY = "account,company"
- ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "account,company,accounting_period"
- ACCOUNT_CONTACT = "account,contact"
- ACCOUNT_CONTACT_ACCOUNTING_PERIOD = "account,contact,accounting_period"
- ACCOUNT_CONTACT_COMPANY = "account,contact,company"
- ACCOUNT_CONTACT_COMPANY_ACCOUNTING_PERIOD = "account,contact,company,accounting_period"
- ACCOUNTING_PERIOD = "accounting_period"
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- CONTACT_COMPANY = "contact,company"
- CONTACT_COMPANY_ACCOUNTING_PERIOD = "contact,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNT = "tracking_categories,account"
- TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,account,accounting_period"
- TRACKING_CATEGORIES_ACCOUNT_COMPANY = "tracking_categories,account,company"
- TRACKING_CATEGORIES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,account,company,accounting_period"
- TRACKING_CATEGORIES_ACCOUNT_CONTACT = "tracking_categories,account,contact"
- TRACKING_CATEGORIES_ACCOUNT_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,account,contact,accounting_period"
- TRACKING_CATEGORIES_ACCOUNT_CONTACT_COMPANY = "tracking_categories,account,contact,company"
- TRACKING_CATEGORIES_ACCOUNT_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,account,contact,company,accounting_period"
- )
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
- TRACKING_CATEGORIES_CONTACT_COMPANY = "tracking_categories,contact,company"
- TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,contact,company,accounting_period"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_accounting_period: typing.Callable[[], T_Result],
- account_company: typing.Callable[[], T_Result],
- account_company_accounting_period: typing.Callable[[], T_Result],
- account_contact: typing.Callable[[], T_Result],
- account_contact_accounting_period: typing.Callable[[], T_Result],
- account_contact_company: typing.Callable[[], T_Result],
- account_contact_company_accounting_period: typing.Callable[[], T_Result],
- accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- contact_company: typing.Callable[[], T_Result],
- contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_account: typing.Callable[[], T_Result],
- tracking_categories_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_account_company: typing.Callable[[], T_Result],
- tracking_categories_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_account_contact: typing.Callable[[], T_Result],
- tracking_categories_account_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_account_contact_company: typing.Callable[[], T_Result],
- tracking_categories_account_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_company: typing.Callable[[], T_Result],
- tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ExpensesListRequestExpand.ACCOUNT:
- return account()
- if self is ExpensesListRequestExpand.ACCOUNT_ACCOUNTING_PERIOD:
- return account_accounting_period()
- if self is ExpensesListRequestExpand.ACCOUNT_COMPANY:
- return account_company()
- if self is ExpensesListRequestExpand.ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return account_company_accounting_period()
- if self is ExpensesListRequestExpand.ACCOUNT_CONTACT:
- return account_contact()
- if self is ExpensesListRequestExpand.ACCOUNT_CONTACT_ACCOUNTING_PERIOD:
- return account_contact_accounting_period()
- if self is ExpensesListRequestExpand.ACCOUNT_CONTACT_COMPANY:
- return account_contact_company()
- if self is ExpensesListRequestExpand.ACCOUNT_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return account_contact_company_accounting_period()
- if self is ExpensesListRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is ExpensesListRequestExpand.COMPANY:
- return company()
- if self is ExpensesListRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is ExpensesListRequestExpand.CONTACT:
- return contact()
- if self is ExpensesListRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is ExpensesListRequestExpand.CONTACT_COMPANY:
- return contact_company()
- if self is ExpensesListRequestExpand.CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return contact_company_accounting_period()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNT:
- return tracking_categories_account()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_account_accounting_period()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_COMPANY:
- return tracking_categories_account_company()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_account_company_accounting_period()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_CONTACT:
- return tracking_categories_account_contact()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_account_contact_accounting_period()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_CONTACT_COMPANY:
- return tracking_categories_account_contact_company()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_account_contact_company_accounting_period()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY:
- return tracking_categories_contact_company()
- if self is ExpensesListRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_company_accounting_period()
+ExpensesListRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,accounting_period",
+ "account,company",
+ "account,company,accounting_period",
+ "account,contact",
+ "account,contact,accounting_period",
+ "account,contact,company",
+ "account,contact,company,accounting_period",
+ "accounting_period",
+ "company",
+ "company,accounting_period",
+ "contact",
+ "contact,accounting_period",
+ "contact,company",
+ "contact,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,account",
+ "tracking_categories,account,accounting_period",
+ "tracking_categories,account,company",
+ "tracking_categories,account,company,accounting_period",
+ "tracking_categories,account,contact",
+ "tracking_categories,account,contact,accounting_period",
+ "tracking_categories,account,contact,company",
+ "tracking_categories,account,contact,company,accounting_period",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,accounting_period",
+ "tracking_categories,contact,company",
+ "tracking_categories,contact,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/expenses/types/expenses_retrieve_request_expand.py b/src/merge/resources/accounting/resources/expenses/types/expenses_retrieve_request_expand.py
index 77895804..2a29c47d 100644
--- a/src/merge/resources/accounting/resources/expenses/types/expenses_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/expenses/types/expenses_retrieve_request_expand.py
@@ -1,139 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ExpensesRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_ACCOUNTING_PERIOD = "account,accounting_period"
- ACCOUNT_COMPANY = "account,company"
- ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "account,company,accounting_period"
- ACCOUNT_CONTACT = "account,contact"
- ACCOUNT_CONTACT_ACCOUNTING_PERIOD = "account,contact,accounting_period"
- ACCOUNT_CONTACT_COMPANY = "account,contact,company"
- ACCOUNT_CONTACT_COMPANY_ACCOUNTING_PERIOD = "account,contact,company,accounting_period"
- ACCOUNTING_PERIOD = "accounting_period"
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- CONTACT_COMPANY = "contact,company"
- CONTACT_COMPANY_ACCOUNTING_PERIOD = "contact,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNT = "tracking_categories,account"
- TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,account,accounting_period"
- TRACKING_CATEGORIES_ACCOUNT_COMPANY = "tracking_categories,account,company"
- TRACKING_CATEGORIES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,account,company,accounting_period"
- TRACKING_CATEGORIES_ACCOUNT_CONTACT = "tracking_categories,account,contact"
- TRACKING_CATEGORIES_ACCOUNT_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,account,contact,accounting_period"
- TRACKING_CATEGORIES_ACCOUNT_CONTACT_COMPANY = "tracking_categories,account,contact,company"
- TRACKING_CATEGORIES_ACCOUNT_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,account,contact,company,accounting_period"
- )
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
- TRACKING_CATEGORIES_CONTACT_COMPANY = "tracking_categories,contact,company"
- TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,contact,company,accounting_period"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_accounting_period: typing.Callable[[], T_Result],
- account_company: typing.Callable[[], T_Result],
- account_company_accounting_period: typing.Callable[[], T_Result],
- account_contact: typing.Callable[[], T_Result],
- account_contact_accounting_period: typing.Callable[[], T_Result],
- account_contact_company: typing.Callable[[], T_Result],
- account_contact_company_accounting_period: typing.Callable[[], T_Result],
- accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- contact_company: typing.Callable[[], T_Result],
- contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_account: typing.Callable[[], T_Result],
- tracking_categories_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_account_company: typing.Callable[[], T_Result],
- tracking_categories_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_account_contact: typing.Callable[[], T_Result],
- tracking_categories_account_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_account_contact_company: typing.Callable[[], T_Result],
- tracking_categories_account_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_company: typing.Callable[[], T_Result],
- tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ExpensesRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is ExpensesRetrieveRequestExpand.ACCOUNT_ACCOUNTING_PERIOD:
- return account_accounting_period()
- if self is ExpensesRetrieveRequestExpand.ACCOUNT_COMPANY:
- return account_company()
- if self is ExpensesRetrieveRequestExpand.ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return account_company_accounting_period()
- if self is ExpensesRetrieveRequestExpand.ACCOUNT_CONTACT:
- return account_contact()
- if self is ExpensesRetrieveRequestExpand.ACCOUNT_CONTACT_ACCOUNTING_PERIOD:
- return account_contact_accounting_period()
- if self is ExpensesRetrieveRequestExpand.ACCOUNT_CONTACT_COMPANY:
- return account_contact_company()
- if self is ExpensesRetrieveRequestExpand.ACCOUNT_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return account_contact_company_accounting_period()
- if self is ExpensesRetrieveRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is ExpensesRetrieveRequestExpand.COMPANY:
- return company()
- if self is ExpensesRetrieveRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is ExpensesRetrieveRequestExpand.CONTACT:
- return contact()
- if self is ExpensesRetrieveRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is ExpensesRetrieveRequestExpand.CONTACT_COMPANY:
- return contact_company()
- if self is ExpensesRetrieveRequestExpand.CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return contact_company_accounting_period()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT:
- return tracking_categories_account()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_account_accounting_period()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_COMPANY:
- return tracking_categories_account_company()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_account_company_accounting_period()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_CONTACT:
- return tracking_categories_account_contact()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_account_contact_accounting_period()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_CONTACT_COMPANY:
- return tracking_categories_account_contact_company()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_account_contact_company_accounting_period()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY:
- return tracking_categories_contact_company()
- if self is ExpensesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_company_accounting_period()
+ExpensesRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,accounting_period",
+ "account,company",
+ "account,company,accounting_period",
+ "account,contact",
+ "account,contact,accounting_period",
+ "account,contact,company",
+ "account,contact,company,accounting_period",
+ "accounting_period",
+ "company",
+ "company,accounting_period",
+ "contact",
+ "contact,accounting_period",
+ "contact,company",
+ "contact,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,account",
+ "tracking_categories,account,accounting_period",
+ "tracking_categories,account,company",
+ "tracking_categories,account,company,accounting_period",
+ "tracking_categories,account,contact",
+ "tracking_categories,account,contact,accounting_period",
+ "tracking_categories,account,contact,company",
+ "tracking_categories,account,contact,company,accounting_period",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,accounting_period",
+ "tracking_categories,contact,company",
+ "tracking_categories,contact,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/field_mapping/client.py b/src/merge/resources/accounting/resources/field_mapping/client.py
index 26cbe708..9e5eef25 100644
--- a/src/merge/resources/accounting/resources/field_mapping/client.py
+++ b/src/merge/resources/accounting/resources/field_mapping/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
-from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
from ...types.field_mapping_api_instance_response import FieldMappingApiInstanceResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.field_mapping_instance_response import FieldMappingInstanceResponse
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.remote_field_api_response import RemoteFieldApiResponse
+from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -39,7 +39,7 @@ def field_mappings_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,11 +48,19 @@ def field_mappings_retrieve(
client.accounting.field_mapping.field_mappings_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/field-mappings", method="GET", request_options=request_options
+ "accounting/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -63,7 +71,7 @@ def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -80,7 +88,7 @@ def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -102,7 +110,7 @@ def field_mappings_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -131,9 +139,15 @@ def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -159,7 +173,7 @@ def field_mappings_destroy(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -174,9 +188,15 @@ def field_mappings_destroy(
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,7 +206,7 @@ def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -198,7 +218,7 @@ def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -217,7 +237,7 @@ def field_mappings_partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -238,9 +258,15 @@ def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -274,7 +300,7 @@ def remote_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -285,12 +311,21 @@ def remote_fields_retrieve(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -314,7 +349,7 @@ def target_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -323,11 +358,19 @@ def target_fields_retrieve(
client.accounting.field_mapping.target_fields_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/target-fields", method="GET", request_options=request_options
+ "accounting/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -356,20 +399,36 @@ async def field_mappings_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.field_mapping.field_mappings_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.field_mapping.field_mappings_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/field-mappings", method="GET", request_options=request_options
+ "accounting/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -380,7 +439,7 @@ async def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -397,7 +456,7 @@ async def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -419,20 +478,28 @@ async def field_mappings_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.field_mapping.field_mappings_create(
- target_field_name="example_target_field_name",
- target_field_description="this is a example description of the target field",
- remote_field_traversal_path=["example_remote_field"],
- remote_method="GET",
- remote_url_path="/example-url-path",
- common_model_name="ExampleCommonModel",
- )
+
+
+ async def main() -> None:
+ await client.accounting.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/field-mappings",
@@ -448,9 +515,15 @@ async def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -476,24 +549,38 @@ async def field_mappings_destroy(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.field_mapping.field_mappings_destroy(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -503,7 +590,7 @@ async def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -515,7 +602,7 @@ async def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -534,15 +621,23 @@ async def field_mappings_partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.field_mapping.field_mappings_partial_update(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
@@ -555,9 +650,15 @@ async def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -591,23 +692,40 @@ async def remote_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.field_mapping.remote_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.field_mapping.remote_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -631,20 +749,36 @@ async def target_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.field_mapping.target_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.field_mapping.target_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/target-fields", method="GET", request_options=request_options
+ "accounting/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/force_resync/client.py b/src/merge/resources/accounting/resources/force_resync/client.py
index c2e6aba6..459d2504 100644
--- a/src/merge/resources/accounting/resources/force_resync/client.py
+++ b/src/merge/resources/accounting/resources/force_resync/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.sync_status import SyncStatus
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class ForceResyncClient:
@@ -18,7 +18,7 @@ def sync_status_resync_create(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> typing.List[SyncStatus]:
"""
- Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+ Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
Parameters
----------
@@ -32,7 +32,7 @@ def sync_status_resync_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -41,11 +41,19 @@ def sync_status_resync_create(
client.accounting.force_resync.sync_status_resync_create()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/sync-status/resync", method="POST", request_options=request_options
+ "accounting/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -60,7 +68,7 @@ async def sync_status_resync_create(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> typing.List[SyncStatus]:
"""
- Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+ Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
Parameters
----------
@@ -74,20 +82,36 @@ async def sync_status_resync_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.force_resync.sync_status_resync_create()
+
+
+ async def main() -> None:
+ await client.accounting.force_resync.sync_status_resync_create()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/sync-status/resync", method="POST", request_options=request_options
+ "accounting/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/generate_key/client.py b/src/merge/resources/accounting/resources/generate_key/client.py
index 2b75f549..e0ee3e7a 100644
--- a/src/merge/resources/accounting/resources/generate_key/client.py
+++ b/src/merge/resources/accounting/resources/generate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,11 +47,23 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "accounting/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,22 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.generate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.accounting.generate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "accounting/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/income_statements/client.py b/src/merge/resources/accounting/resources/income_statements/client.py
index da97a2e1..f960555a 100644
--- a/src/merge/resources/accounting/resources/income_statements/client.py
+++ b/src/merge/resources/accounting/resources/income_statements/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_income_statement_list import PaginatedIncomeStatementList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.income_statement import IncomeStatement
-from ...types.paginated_income_statement_list import PaginatedIncomeStatementList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class IncomeStatementsClient:
@@ -28,6 +28,7 @@ def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -55,11 +56,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -82,7 +86,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,6 +105,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -108,9 +113,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIncomeStatementList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIncomeStatementList,
+ parse_obj_as(
+ type_=PaginatedIncomeStatementList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -147,7 +158,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,12 +171,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/income-statements/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(IncomeStatement, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ IncomeStatement,
+ parse_obj_as(
+ type_=IncomeStatement, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,6 +206,7 @@ async def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -213,11 +234,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -240,13 +264,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.income_statements.list()
+
+
+ async def main() -> None:
+ await client.accounting.income_statements.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/income-statements",
@@ -259,6 +291,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -266,9 +299,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIncomeStatementList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIncomeStatementList,
+ parse_obj_as(
+ type_=PaginatedIncomeStatementList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,25 +344,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.income_statements.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.income_statements.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/income-statements/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(IncomeStatement, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ IncomeStatement,
+ parse_obj_as(
+ type_=IncomeStatement, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/invoices/client.py b/src/merge/resources/accounting/resources/invoices/client.py
index d4e99d9c..5acddccc 100644
--- a/src/merge/resources/accounting/resources/invoices/client.py
+++ b/src/merge/resources/accounting/resources/invoices/client.py
@@ -1,23 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.invoices_list_request_expand import InvoicesListRequestExpand
+from .types.invoices_list_request_type import InvoicesListRequestType
+from .....core.request_options import RequestOptions
+from ...types.paginated_invoice_list import PaginatedInvoiceList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.invoice import Invoice
from ...types.invoice_request import InvoiceRequest
from ...types.invoice_response import InvoiceResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_invoice_list import PaginatedInvoiceList
-from .types.invoices_list_request_expand import InvoicesListRequestExpand
-from .types.invoices_list_request_type import InvoicesListRequestType
from .types.invoices_retrieve_request_expand import InvoicesRetrieveRequestExpand
+from ...types.invoice import Invoice
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -38,6 +39,8 @@ def list(
expand: typing.Optional[InvoicesListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
issue_date_after: typing.Optional[dt.datetime] = None,
issue_date_before: typing.Optional[dt.datetime] = None,
modified_after: typing.Optional[dt.datetime] = None,
@@ -73,11 +76,17 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
issue_date_after : typing.Optional[dt.datetime]
If provided, will only return objects created after this datetime.
@@ -118,7 +127,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -138,6 +147,8 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"issue_date_after": serialize_datetime(issue_date_after) if issue_date_after is not None else None,
"issue_date_before": serialize_datetime(issue_date_before) if issue_date_before is not None else None,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
@@ -150,9 +161,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedInvoiceList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedInvoiceList,
+ parse_obj_as(
+ type_=PaginatedInvoiceList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -189,7 +206,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import InvoiceRequest
client = Merge(
@@ -203,14 +220,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/invoices",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(InvoiceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ InvoiceResponse,
+ parse_obj_as(
+ type_=InvoiceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -222,6 +250,7 @@ def retrieve(
*,
expand: typing.Optional[InvoicesRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
remote_fields: typing.Optional[typing.Literal["type"]] = None,
show_enum_origins: typing.Optional[typing.Literal["type"]] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -239,6 +268,9 @@ def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
remote_fields : typing.Optional[typing.Literal["type"]]
Deprecated. Use show_enum_origins.
@@ -255,7 +287,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -271,14 +303,21 @@ def retrieve(
params={
"expand": expand,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
"remote_fields": remote_fields,
"show_enum_origins": show_enum_origins,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Invoice, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Invoice,
+ parse_obj_as(
+ type_=Invoice, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -318,7 +357,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import InvoiceRequest
client = Merge(
@@ -333,14 +372,104 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/invoices/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(InvoiceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ InvoiceResponse,
+ parse_obj_as(
+ type_=InvoiceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def line_items_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.invoices.line_items_remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/invoices/line-items/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -364,7 +493,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -375,11 +504,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"accounting/v1/invoices/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"accounting/v1/invoices/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -401,7 +538,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -410,11 +547,98 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.accounting.invoices.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/invoices/meta/post", method="GET", request_options=request_options
+ "accounting/v1/invoices/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.invoices.remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/invoices/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -436,6 +660,8 @@ async def list(
expand: typing.Optional[InvoicesListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
issue_date_after: typing.Optional[dt.datetime] = None,
issue_date_before: typing.Optional[dt.datetime] = None,
modified_after: typing.Optional[dt.datetime] = None,
@@ -471,11 +697,17 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
issue_date_after : typing.Optional[dt.datetime]
If provided, will only return objects created after this datetime.
@@ -516,13 +748,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.invoices.list()
+
+
+ async def main() -> None:
+ await client.accounting.invoices.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/invoices",
@@ -536,6 +776,8 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"issue_date_after": serialize_datetime(issue_date_after) if issue_date_after is not None else None,
"issue_date_before": serialize_datetime(issue_date_before) if issue_date_before is not None else None,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
@@ -548,9 +790,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedInvoiceList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedInvoiceList,
+ parse_obj_as(
+ type_=PaginatedInvoiceList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -587,28 +835,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import InvoiceRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.invoices.create(
- model=InvoiceRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.invoices.create(
+ model=InvoiceRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/invoices",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(InvoiceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ InvoiceResponse,
+ parse_obj_as(
+ type_=InvoiceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -620,6 +887,7 @@ async def retrieve(
*,
expand: typing.Optional[InvoicesRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
remote_fields: typing.Optional[typing.Literal["type"]] = None,
show_enum_origins: typing.Optional[typing.Literal["type"]] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -637,6 +905,9 @@ async def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
remote_fields : typing.Optional[typing.Literal["type"]]
Deprecated. Use show_enum_origins.
@@ -653,15 +924,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.invoices.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.invoices.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/invoices/{jsonable_encoder(id)}",
@@ -669,14 +948,21 @@ async def retrieve(
params={
"expand": expand,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
"remote_fields": remote_fields,
"show_enum_origins": show_enum_origins,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Invoice, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Invoice,
+ parse_obj_as(
+ type_=Invoice, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -716,29 +1002,135 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import InvoiceRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.invoices.partial_update(
- id="id",
- model=InvoiceRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.invoices.partial_update(
+ id="id",
+ model=InvoiceRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/invoices/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(InvoiceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ InvoiceResponse,
+ parse_obj_as(
+ type_=InvoiceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def line_items_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.invoices.line_items_remote_field_classes_list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/invoices/line-items/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -764,22 +1156,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.invoices.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.invoices.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"accounting/v1/invoices/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"accounting/v1/invoices/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -801,20 +1209,123 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.invoices.meta_post_retrieve()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/invoices/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.invoices.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.invoices.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/invoices/meta/post", method="GET", request_options=request_options
+ "accounting/v1/invoices/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/invoices/types/invoices_list_request_expand.py b/src/merge/resources/accounting/resources/invoices/types/invoices_list_request_expand.py
index 60daa7f7..68f386f0 100644
--- a/src/merge/resources/accounting/resources/invoices/types/invoices_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/invoices/types/invoices_list_request_expand.py
@@ -1,1402 +1,264 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class InvoicesListRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- APPLIED_PAYMENTS = "applied_payments"
- APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "applied_payments,accounting_period"
- APPLIED_PAYMENTS_COMPANY = "applied_payments,company"
- APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,company,accounting_period"
- APPLIED_PAYMENTS_CONTACT = "applied_payments,contact"
- APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "applied_payments,contact,accounting_period"
- APPLIED_PAYMENTS_CONTACT_COMPANY = "applied_payments,contact,company"
- APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "applied_payments,contact,company,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS = "applied_payments,line_items"
- APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "applied_payments,line_items,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_COMPANY = "applied_payments,line_items,company"
- APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,line_items,company,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT = "applied_payments,line_items,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "applied_payments,line_items,contact,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "applied_payments,line_items,contact,company"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS = "applied_payments,line_items,purchase_orders"
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,purchase_orders,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY = "applied_payments,line_items,purchase_orders,company"
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,purchase_orders,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT = "applied_payments,line_items,purchase_orders,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,purchase_orders,contact,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "applied_payments,line_items,purchase_orders,contact,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,purchase_orders,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = "applied_payments,line_items,tracking_categories"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "applied_payments,line_items,tracking_categories,company"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "applied_payments,line_items,tracking_categories,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,contact,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "applied_payments,line_items,tracking_categories,contact,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS = (
- "applied_payments,line_items,tracking_categories,purchase_orders"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,purchase_orders,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "applied_payments,line_items,tracking_categories,purchase_orders,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "applied_payments,line_items,tracking_categories,purchase_orders,contact"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "applied_payments,line_items,tracking_categories,purchase_orders,contact,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_PURCHASE_ORDERS = "applied_payments,purchase_orders"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "applied_payments,purchase_orders,accounting_period"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY = "applied_payments,purchase_orders,company"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,purchase_orders,company,accounting_period"
- )
- APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT = "applied_payments,purchase_orders,contact"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,purchase_orders,contact,accounting_period"
- )
- APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY = "applied_payments,purchase_orders,contact,company"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,purchase_orders,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES = "applied_payments,tracking_categories"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "applied_payments,tracking_categories,accounting_period"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "applied_payments,tracking_categories,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT = "applied_payments,tracking_categories,contact"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,contact,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = "applied_payments,tracking_categories,contact,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS = "applied_payments,tracking_categories,purchase_orders"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,purchase_orders,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "applied_payments,tracking_categories,purchase_orders,company"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,purchase_orders,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "applied_payments,tracking_categories,purchase_orders,contact"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,purchase_orders,contact,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "applied_payments,tracking_categories,purchase_orders,contact,company"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- CONTACT_COMPANY = "contact,company"
- CONTACT_COMPANY_ACCOUNTING_PERIOD = "contact,company,accounting_period"
- LINE_ITEMS = "line_items"
- LINE_ITEMS_ACCOUNTING_PERIOD = "line_items,accounting_period"
- LINE_ITEMS_COMPANY = "line_items,company"
- LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "line_items,company,accounting_period"
- LINE_ITEMS_CONTACT = "line_items,contact"
- LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "line_items,contact,accounting_period"
- LINE_ITEMS_CONTACT_COMPANY = "line_items,contact,company"
- LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "line_items,contact,company,accounting_period"
- LINE_ITEMS_PURCHASE_ORDERS = "line_items,purchase_orders"
- LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "line_items,purchase_orders,accounting_period"
- LINE_ITEMS_PURCHASE_ORDERS_COMPANY = "line_items,purchase_orders,company"
- LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = "line_items,purchase_orders,company,accounting_period"
- LINE_ITEMS_PURCHASE_ORDERS_CONTACT = "line_items,purchase_orders,contact"
- LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = "line_items,purchase_orders,contact,accounting_period"
- LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY = "line_items,purchase_orders,contact,company"
- LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,purchase_orders,contact,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES = "line_items,tracking_categories"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "line_items,tracking_categories,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "line_items,tracking_categories,company"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "line_items,tracking_categories,contact"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = "line_items,tracking_categories,contact,company"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS = "line_items,tracking_categories,purchase_orders"
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,purchase_orders,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = "line_items,tracking_categories,purchase_orders,company"
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,purchase_orders,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = "line_items,tracking_categories,purchase_orders,contact"
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,purchase_orders,contact,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "line_items,tracking_categories,purchase_orders,contact,company"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS = "payments"
- PAYMENTS_ACCOUNTING_PERIOD = "payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS = "payments,applied_payments"
- PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "payments,applied_payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY = "payments,applied_payments,company"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,applied_payments,company,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT = "payments,applied_payments,contact"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "payments,applied_payments,contact,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY = "payments,applied_payments,contact,company"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS = "payments,applied_payments,line_items"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "payments,applied_payments,line_items,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY = "payments,applied_payments,line_items,company"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT = "payments,applied_payments,line_items,contact"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "payments,applied_payments,line_items,contact,company"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS = "payments,applied_payments,line_items,purchase_orders"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,purchase_orders,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY = (
- "payments,applied_payments,line_items,purchase_orders,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,purchase_orders,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT = (
- "payments,applied_payments,line_items,purchase_orders,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,applied_payments,line_items,purchase_orders,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = (
- "payments,applied_payments,line_items,tracking_categories"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = (
- "payments,applied_payments,line_items,tracking_categories,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS = "payments,applied_payments,purchase_orders"
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,applied_payments,purchase_orders,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY = "payments,applied_payments,purchase_orders,company"
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,purchase_orders,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT = "payments,applied_payments,purchase_orders,contact"
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,applied_payments,purchase_orders,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "payments,applied_payments,tracking_categories"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,applied_payments,tracking_categories,company"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT = "payments,applied_payments,tracking_categories,contact"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "payments,applied_payments,tracking_categories,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS = (
- "payments,applied_payments,tracking_categories,purchase_orders"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,purchase_orders,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "payments,applied_payments,tracking_categories,purchase_orders,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "payments,applied_payments,tracking_categories,purchase_orders,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,applied_payments,tracking_categories,purchase_orders,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_COMPANY = "payments,company"
- PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,company,accounting_period"
- PAYMENTS_CONTACT = "payments,contact"
- PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "payments,contact,accounting_period"
- PAYMENTS_CONTACT_COMPANY = "payments,contact,company"
- PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "payments,contact,company,accounting_period"
- PAYMENTS_LINE_ITEMS = "payments,line_items"
- PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "payments,line_items,accounting_period"
- PAYMENTS_LINE_ITEMS_COMPANY = "payments,line_items,company"
- PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "payments,line_items,company,accounting_period"
- PAYMENTS_LINE_ITEMS_CONTACT = "payments,line_items,contact"
- PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "payments,line_items,contact,accounting_period"
- PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "payments,line_items,contact,company"
- PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "payments,line_items,contact,company,accounting_period"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS = "payments,line_items,purchase_orders"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "payments,line_items,purchase_orders,accounting_period"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY = "payments,line_items,purchase_orders,company"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,purchase_orders,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT = "payments,line_items,purchase_orders,contact"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,line_items,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY = "payments,line_items,purchase_orders,contact,company"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = "payments,line_items,tracking_categories"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "payments,line_items,tracking_categories,company"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "payments,line_items,tracking_categories,contact"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = "payments,line_items,tracking_categories,contact,company"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS = "payments,line_items,tracking_categories,purchase_orders"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,purchase_orders,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "payments,line_items,tracking_categories,purchase_orders,company"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,purchase_orders,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "payments,line_items,tracking_categories,purchase_orders,contact"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,line_items,tracking_categories,purchase_orders,contact,company"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_PURCHASE_ORDERS = "payments,purchase_orders"
- PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "payments,purchase_orders,accounting_period"
- PAYMENTS_PURCHASE_ORDERS_COMPANY = "payments,purchase_orders,company"
- PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = "payments,purchase_orders,company,accounting_period"
- PAYMENTS_PURCHASE_ORDERS_CONTACT = "payments,purchase_orders,contact"
- PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = "payments,purchase_orders,contact,accounting_period"
- PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY = "payments,purchase_orders,contact,company"
- PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES = "payments,tracking_categories"
- PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "payments,tracking_categories,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,tracking_categories,company"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "payments,tracking_categories,company,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT = "payments,tracking_categories,contact"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "payments,tracking_categories,contact,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = "payments,tracking_categories,contact,company"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS = "payments,tracking_categories,purchase_orders"
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,purchase_orders,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = "payments,tracking_categories,purchase_orders,company"
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,purchase_orders,company,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = "payments,tracking_categories,purchase_orders,contact"
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,tracking_categories,purchase_orders,contact,company"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PURCHASE_ORDERS = "purchase_orders"
- PURCHASE_ORDERS_ACCOUNTING_PERIOD = "purchase_orders,accounting_period"
- PURCHASE_ORDERS_COMPANY = "purchase_orders,company"
- PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = "purchase_orders,company,accounting_period"
- PURCHASE_ORDERS_CONTACT = "purchase_orders,contact"
- PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = "purchase_orders,contact,accounting_period"
- PURCHASE_ORDERS_CONTACT_COMPANY = "purchase_orders,contact,company"
- PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "purchase_orders,contact,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
- TRACKING_CATEGORIES_CONTACT_COMPANY = "tracking_categories,contact,company"
- TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,contact,company,accounting_period"
- TRACKING_CATEGORIES_PURCHASE_ORDERS = "tracking_categories,purchase_orders"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "tracking_categories,purchase_orders,accounting_period"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = "tracking_categories,purchase_orders,company"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,purchase_orders,company,accounting_period"
- )
- TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = "tracking_categories,purchase_orders,contact"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "tracking_categories,purchase_orders,contact,accounting_period"
- )
- TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = "tracking_categories,purchase_orders,contact,company"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,purchase_orders,contact,company,accounting_period"
- )
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- applied_payments: typing.Callable[[], T_Result],
- applied_payments_accounting_period: typing.Callable[[], T_Result],
- applied_payments_company: typing.Callable[[], T_Result],
- applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_contact: typing.Callable[[], T_Result],
- applied_payments_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_contact_company: typing.Callable[[], T_Result],
- applied_payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items: typing.Callable[[], T_Result],
- applied_payments_line_items_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_company: typing.Callable[[], T_Result],
- applied_payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_company: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_line_items_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_purchase_orders_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_line_items_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_line_items_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_line_items_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_purchase_orders: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_company: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_contact: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_contact_company: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- contact_company: typing.Callable[[], T_Result],
- contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items: typing.Callable[[], T_Result],
- line_items_accounting_period: typing.Callable[[], T_Result],
- line_items_company: typing.Callable[[], T_Result],
- line_items_company_accounting_period: typing.Callable[[], T_Result],
- line_items_contact: typing.Callable[[], T_Result],
- line_items_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_contact_company: typing.Callable[[], T_Result],
- line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items_purchase_orders: typing.Callable[[], T_Result],
- line_items_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- line_items_purchase_orders_company: typing.Callable[[], T_Result],
- line_items_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- line_items_purchase_orders_contact: typing.Callable[[], T_Result],
- line_items_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_purchase_orders_contact_company: typing.Callable[[], T_Result],
- line_items_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories: typing.Callable[[], T_Result],
- line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments: typing.Callable[[], T_Result],
- payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments: typing.Callable[[], T_Result],
- payments_applied_payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_company: typing.Callable[[], T_Result],
- payments_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_contact: typing.Callable[[], T_Result],
- payments_applied_payments_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_company: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_purchase_orders: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_company: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_company: typing.Callable[[], T_Result],
- payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_contact: typing.Callable[[], T_Result],
- payments_contact_accounting_period: typing.Callable[[], T_Result],
- payments_contact_company: typing.Callable[[], T_Result],
- payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items: typing.Callable[[], T_Result],
- payments_line_items_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_company: typing.Callable[[], T_Result],
- payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_contact: typing.Callable[[], T_Result],
- payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_contact_company: typing.Callable[[], T_Result],
- payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_company: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_line_items_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_line_items_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_purchase_orders: typing.Callable[[], T_Result],
- payments_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_purchase_orders_company: typing.Callable[[], T_Result],
- payments_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories: typing.Callable[[], T_Result],
- payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- purchase_orders: typing.Callable[[], T_Result],
- purchase_orders_accounting_period: typing.Callable[[], T_Result],
- purchase_orders_company: typing.Callable[[], T_Result],
- purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- purchase_orders_contact: typing.Callable[[], T_Result],
- purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- purchase_orders_contact_company: typing.Callable[[], T_Result],
- purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_company: typing.Callable[[], T_Result],
- tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is InvoicesListRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS:
- return applied_payments()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return applied_payments_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_COMPANY:
- return applied_payments_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_CONTACT:
- return applied_payments_contact()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_contact_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_CONTACT_COMPANY:
- return applied_payments_contact_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS:
- return applied_payments_line_items()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return applied_payments_line_items_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_COMPANY:
- return applied_payments_line_items_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT:
- return applied_payments_line_items_contact()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_line_items_contact_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return applied_payments_line_items_contact_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS:
- return applied_payments_line_items_purchase_orders()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return applied_payments_line_items_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY:
- return applied_payments_line_items_purchase_orders_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT:
- return applied_payments_line_items_purchase_orders_contact()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_line_items_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return applied_payments_line_items_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return applied_payments_line_items_tracking_categories()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_line_items_tracking_categories_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_line_items_tracking_categories_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_tracking_categories_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return applied_payments_line_items_tracking_categories_contact()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_line_items_tracking_categories_contact_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return applied_payments_line_items_tracking_categories_contact_company()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return applied_payments_line_items_tracking_categories_purchase_orders()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return applied_payments_line_items_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return applied_payments_line_items_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_contact_accounting_period()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS:
- return applied_payments_purchase_orders()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return applied_payments_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY:
- return applied_payments_purchase_orders_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT:
- return applied_payments_purchase_orders_contact()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return applied_payments_purchase_orders_contact_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return applied_payments_tracking_categories()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_tracking_categories_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return applied_payments_tracking_categories_contact()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_contact_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return applied_payments_tracking_categories_contact_company()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return applied_payments_tracking_categories_purchase_orders()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return applied_payments_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return applied_payments_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return applied_payments_tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return applied_payments_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.COMPANY:
- return company()
- if self is InvoicesListRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is InvoicesListRequestExpand.CONTACT:
- return contact()
- if self is InvoicesListRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is InvoicesListRequestExpand.CONTACT_COMPANY:
- return contact_company()
- if self is InvoicesListRequestExpand.CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return contact_company_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS:
- return line_items()
- if self is InvoicesListRequestExpand.LINE_ITEMS_ACCOUNTING_PERIOD:
- return line_items_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_COMPANY:
- return line_items_company()
- if self is InvoicesListRequestExpand.LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_company_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_CONTACT:
- return line_items_contact()
- if self is InvoicesListRequestExpand.LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_contact_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_CONTACT_COMPANY:
- return line_items_contact_company()
- if self is InvoicesListRequestExpand.LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_PURCHASE_ORDERS:
- return line_items_purchase_orders()
- if self is InvoicesListRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return line_items_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_COMPANY:
- return line_items_purchase_orders_company()
- if self is InvoicesListRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_CONTACT:
- return line_items_purchase_orders_contact()
- if self is InvoicesListRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return line_items_purchase_orders_contact_company()
- if self is InvoicesListRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES:
- return line_items_tracking_categories()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return line_items_tracking_categories_company()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_company_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return line_items_tracking_categories_contact()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return line_items_tracking_categories_contact_company()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return line_items_tracking_categories_purchase_orders()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return line_items_tracking_categories_purchase_orders_company()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return line_items_tracking_categories_purchase_orders_contact()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return line_items_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS:
- return payments()
- if self is InvoicesListRequestExpand.PAYMENTS_ACCOUNTING_PERIOD:
- return payments_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS:
- return payments_applied_payments()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return payments_applied_payments_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY:
- return payments_applied_payments_company()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT:
- return payments_applied_payments_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY:
- return payments_applied_payments_contact_company()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS:
- return payments_applied_payments_line_items()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY:
- return payments_applied_payments_line_items_company()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT:
- return payments_applied_payments_line_items_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return payments_applied_payments_line_items_contact_company()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS:
- return payments_applied_payments_line_items_purchase_orders()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY:
- return payments_applied_payments_line_items_purchase_orders_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT:
- return payments_applied_payments_line_items_purchase_orders_contact()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_applied_payments_line_items_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return payments_applied_payments_line_items_tracking_categories()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_tracking_categories_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_line_items_tracking_categories_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return payments_applied_payments_line_items_tracking_categories_contact()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_applied_payments_line_items_tracking_categories_contact_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return payments_applied_payments_line_items_tracking_categories_purchase_orders()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_accounting_period()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_company_accounting_period()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_accounting_period()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return (
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period()
- )
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS:
- return payments_applied_payments_purchase_orders()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_applied_payments_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY:
- return payments_applied_payments_purchase_orders_company()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT:
- return payments_applied_payments_purchase_orders_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_applied_payments_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return payments_applied_payments_tracking_categories()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_tracking_categories_company()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return payments_applied_payments_tracking_categories_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_applied_payments_tracking_categories_contact_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return payments_applied_payments_tracking_categories_purchase_orders()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return payments_applied_payments_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return payments_applied_payments_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_contact_accounting_period()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_COMPANY:
- return payments_company()
- if self is InvoicesListRequestExpand.PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_CONTACT:
- return payments_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return payments_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_CONTACT_COMPANY:
- return payments_contact_company()
- if self is InvoicesListRequestExpand.PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS:
- return payments_line_items()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return payments_line_items_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_COMPANY:
- return payments_line_items_company()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT:
- return payments_line_items_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return payments_line_items_contact_company()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS:
- return payments_line_items_purchase_orders()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_line_items_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY:
- return payments_line_items_purchase_orders_company()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT:
- return payments_line_items_purchase_orders_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_line_items_purchase_orders_contact_company()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return payments_line_items_tracking_categories()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return payments_line_items_tracking_categories_company()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return payments_line_items_tracking_categories_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_line_items_tracking_categories_contact_company()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return payments_line_items_tracking_categories_purchase_orders()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return payments_line_items_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return payments_line_items_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_line_items_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_PURCHASE_ORDERS:
- return payments_purchase_orders()
- if self is InvoicesListRequestExpand.PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_PURCHASE_ORDERS_COMPANY:
- return payments_purchase_orders_company()
- if self is InvoicesListRequestExpand.PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return payments_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_PURCHASE_ORDERS_CONTACT:
- return payments_purchase_orders_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return payments_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_purchase_orders_contact_company()
- if self is InvoicesListRequestExpand.PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES:
- return payments_tracking_categories()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_tracking_categories_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_tracking_categories_company()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return payments_tracking_categories_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_tracking_categories_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_tracking_categories_contact_company()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return payments_tracking_categories_purchase_orders()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return payments_tracking_categories_purchase_orders_company()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return payments_tracking_categories_purchase_orders_contact()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return payments_tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.PURCHASE_ORDERS:
- return purchase_orders()
- if self is InvoicesListRequestExpand.PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.PURCHASE_ORDERS_COMPANY:
- return purchase_orders_company()
- if self is InvoicesListRequestExpand.PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.PURCHASE_ORDERS_CONTACT:
- return purchase_orders_contact()
- if self is InvoicesListRequestExpand.PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.PURCHASE_ORDERS_CONTACT_COMPANY:
- return purchase_orders_contact_company()
- if self is InvoicesListRequestExpand.PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return purchase_orders_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY:
- return tracking_categories_contact_company()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_company_accounting_period()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return tracking_categories_purchase_orders()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return tracking_categories_purchase_orders_company()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return tracking_categories_purchase_orders_contact()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return tracking_categories_purchase_orders_contact_company()
- if self is InvoicesListRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_purchase_orders_contact_company_accounting_period()
+InvoicesListRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "applied_payments",
+ "applied_payments,accounting_period",
+ "applied_payments,company",
+ "applied_payments,company,accounting_period",
+ "applied_payments,contact",
+ "applied_payments,contact,accounting_period",
+ "applied_payments,contact,company",
+ "applied_payments,contact,company,accounting_period",
+ "applied_payments,line_items",
+ "applied_payments,line_items,accounting_period",
+ "applied_payments,line_items,company",
+ "applied_payments,line_items,company,accounting_period",
+ "applied_payments,line_items,contact",
+ "applied_payments,line_items,contact,accounting_period",
+ "applied_payments,line_items,contact,company",
+ "applied_payments,line_items,contact,company,accounting_period",
+ "applied_payments,line_items,purchase_orders",
+ "applied_payments,line_items,purchase_orders,accounting_period",
+ "applied_payments,line_items,purchase_orders,company",
+ "applied_payments,line_items,purchase_orders,company,accounting_period",
+ "applied_payments,line_items,purchase_orders,contact",
+ "applied_payments,line_items,purchase_orders,contact,accounting_period",
+ "applied_payments,line_items,purchase_orders,contact,company",
+ "applied_payments,line_items,purchase_orders,contact,company,accounting_period",
+ "applied_payments,line_items,tracking_categories",
+ "applied_payments,line_items,tracking_categories,accounting_period",
+ "applied_payments,line_items,tracking_categories,company",
+ "applied_payments,line_items,tracking_categories,company,accounting_period",
+ "applied_payments,line_items,tracking_categories,contact",
+ "applied_payments,line_items,tracking_categories,contact,accounting_period",
+ "applied_payments,line_items,tracking_categories,contact,company",
+ "applied_payments,line_items,tracking_categories,contact,company,accounting_period",
+ "applied_payments,line_items,tracking_categories,purchase_orders",
+ "applied_payments,line_items,tracking_categories,purchase_orders,accounting_period",
+ "applied_payments,line_items,tracking_categories,purchase_orders,company",
+ "applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period",
+ "applied_payments,line_items,tracking_categories,purchase_orders,contact",
+ "applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period",
+ "applied_payments,line_items,tracking_categories,purchase_orders,contact,company",
+ "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "applied_payments,purchase_orders",
+ "applied_payments,purchase_orders,accounting_period",
+ "applied_payments,purchase_orders,company",
+ "applied_payments,purchase_orders,company,accounting_period",
+ "applied_payments,purchase_orders,contact",
+ "applied_payments,purchase_orders,contact,accounting_period",
+ "applied_payments,purchase_orders,contact,company",
+ "applied_payments,purchase_orders,contact,company,accounting_period",
+ "applied_payments,tracking_categories",
+ "applied_payments,tracking_categories,accounting_period",
+ "applied_payments,tracking_categories,company",
+ "applied_payments,tracking_categories,company,accounting_period",
+ "applied_payments,tracking_categories,contact",
+ "applied_payments,tracking_categories,contact,accounting_period",
+ "applied_payments,tracking_categories,contact,company",
+ "applied_payments,tracking_categories,contact,company,accounting_period",
+ "applied_payments,tracking_categories,purchase_orders",
+ "applied_payments,tracking_categories,purchase_orders,accounting_period",
+ "applied_payments,tracking_categories,purchase_orders,company",
+ "applied_payments,tracking_categories,purchase_orders,company,accounting_period",
+ "applied_payments,tracking_categories,purchase_orders,contact",
+ "applied_payments,tracking_categories,purchase_orders,contact,accounting_period",
+ "applied_payments,tracking_categories,purchase_orders,contact,company",
+ "applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "company",
+ "company,accounting_period",
+ "contact",
+ "contact,accounting_period",
+ "contact,company",
+ "contact,company,accounting_period",
+ "line_items",
+ "line_items,accounting_period",
+ "line_items,company",
+ "line_items,company,accounting_period",
+ "line_items,contact",
+ "line_items,contact,accounting_period",
+ "line_items,contact,company",
+ "line_items,contact,company,accounting_period",
+ "line_items,purchase_orders",
+ "line_items,purchase_orders,accounting_period",
+ "line_items,purchase_orders,company",
+ "line_items,purchase_orders,company,accounting_period",
+ "line_items,purchase_orders,contact",
+ "line_items,purchase_orders,contact,accounting_period",
+ "line_items,purchase_orders,contact,company",
+ "line_items,purchase_orders,contact,company,accounting_period",
+ "line_items,tracking_categories",
+ "line_items,tracking_categories,accounting_period",
+ "line_items,tracking_categories,company",
+ "line_items,tracking_categories,company,accounting_period",
+ "line_items,tracking_categories,contact",
+ "line_items,tracking_categories,contact,accounting_period",
+ "line_items,tracking_categories,contact,company",
+ "line_items,tracking_categories,contact,company,accounting_period",
+ "line_items,tracking_categories,purchase_orders",
+ "line_items,tracking_categories,purchase_orders,accounting_period",
+ "line_items,tracking_categories,purchase_orders,company",
+ "line_items,tracking_categories,purchase_orders,company,accounting_period",
+ "line_items,tracking_categories,purchase_orders,contact",
+ "line_items,tracking_categories,purchase_orders,contact,accounting_period",
+ "line_items,tracking_categories,purchase_orders,contact,company",
+ "line_items,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "payments",
+ "payments,accounting_period",
+ "payments,applied_payments",
+ "payments,applied_payments,accounting_period",
+ "payments,applied_payments,company",
+ "payments,applied_payments,company,accounting_period",
+ "payments,applied_payments,contact",
+ "payments,applied_payments,contact,accounting_period",
+ "payments,applied_payments,contact,company",
+ "payments,applied_payments,contact,company,accounting_period",
+ "payments,applied_payments,line_items",
+ "payments,applied_payments,line_items,accounting_period",
+ "payments,applied_payments,line_items,company",
+ "payments,applied_payments,line_items,company,accounting_period",
+ "payments,applied_payments,line_items,contact",
+ "payments,applied_payments,line_items,contact,accounting_period",
+ "payments,applied_payments,line_items,contact,company",
+ "payments,applied_payments,line_items,contact,company,accounting_period",
+ "payments,applied_payments,line_items,purchase_orders",
+ "payments,applied_payments,line_items,purchase_orders,accounting_period",
+ "payments,applied_payments,line_items,purchase_orders,company",
+ "payments,applied_payments,line_items,purchase_orders,company,accounting_period",
+ "payments,applied_payments,line_items,purchase_orders,contact",
+ "payments,applied_payments,line_items,purchase_orders,contact,accounting_period",
+ "payments,applied_payments,line_items,purchase_orders,contact,company",
+ "payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories",
+ "payments,applied_payments,line_items,tracking_categories,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,company",
+ "payments,applied_payments,line_items,tracking_categories,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,contact",
+ "payments,applied_payments,line_items,tracking_categories,contact,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,contact,company",
+ "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,company",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "payments,applied_payments,purchase_orders",
+ "payments,applied_payments,purchase_orders,accounting_period",
+ "payments,applied_payments,purchase_orders,company",
+ "payments,applied_payments,purchase_orders,company,accounting_period",
+ "payments,applied_payments,purchase_orders,contact",
+ "payments,applied_payments,purchase_orders,contact,accounting_period",
+ "payments,applied_payments,purchase_orders,contact,company",
+ "payments,applied_payments,purchase_orders,contact,company,accounting_period",
+ "payments,applied_payments,tracking_categories",
+ "payments,applied_payments,tracking_categories,accounting_period",
+ "payments,applied_payments,tracking_categories,company",
+ "payments,applied_payments,tracking_categories,company,accounting_period",
+ "payments,applied_payments,tracking_categories,contact",
+ "payments,applied_payments,tracking_categories,contact,accounting_period",
+ "payments,applied_payments,tracking_categories,contact,company",
+ "payments,applied_payments,tracking_categories,contact,company,accounting_period",
+ "payments,applied_payments,tracking_categories,purchase_orders",
+ "payments,applied_payments,tracking_categories,purchase_orders,accounting_period",
+ "payments,applied_payments,tracking_categories,purchase_orders,company",
+ "payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period",
+ "payments,applied_payments,tracking_categories,purchase_orders,contact",
+ "payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period",
+ "payments,applied_payments,tracking_categories,purchase_orders,contact,company",
+ "payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "payments,company",
+ "payments,company,accounting_period",
+ "payments,contact",
+ "payments,contact,accounting_period",
+ "payments,contact,company",
+ "payments,contact,company,accounting_period",
+ "payments,line_items",
+ "payments,line_items,accounting_period",
+ "payments,line_items,company",
+ "payments,line_items,company,accounting_period",
+ "payments,line_items,contact",
+ "payments,line_items,contact,accounting_period",
+ "payments,line_items,contact,company",
+ "payments,line_items,contact,company,accounting_period",
+ "payments,line_items,purchase_orders",
+ "payments,line_items,purchase_orders,accounting_period",
+ "payments,line_items,purchase_orders,company",
+ "payments,line_items,purchase_orders,company,accounting_period",
+ "payments,line_items,purchase_orders,contact",
+ "payments,line_items,purchase_orders,contact,accounting_period",
+ "payments,line_items,purchase_orders,contact,company",
+ "payments,line_items,purchase_orders,contact,company,accounting_period",
+ "payments,line_items,tracking_categories",
+ "payments,line_items,tracking_categories,accounting_period",
+ "payments,line_items,tracking_categories,company",
+ "payments,line_items,tracking_categories,company,accounting_period",
+ "payments,line_items,tracking_categories,contact",
+ "payments,line_items,tracking_categories,contact,accounting_period",
+ "payments,line_items,tracking_categories,contact,company",
+ "payments,line_items,tracking_categories,contact,company,accounting_period",
+ "payments,line_items,tracking_categories,purchase_orders",
+ "payments,line_items,tracking_categories,purchase_orders,accounting_period",
+ "payments,line_items,tracking_categories,purchase_orders,company",
+ "payments,line_items,tracking_categories,purchase_orders,company,accounting_period",
+ "payments,line_items,tracking_categories,purchase_orders,contact",
+ "payments,line_items,tracking_categories,purchase_orders,contact,accounting_period",
+ "payments,line_items,tracking_categories,purchase_orders,contact,company",
+ "payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "payments,purchase_orders",
+ "payments,purchase_orders,accounting_period",
+ "payments,purchase_orders,company",
+ "payments,purchase_orders,company,accounting_period",
+ "payments,purchase_orders,contact",
+ "payments,purchase_orders,contact,accounting_period",
+ "payments,purchase_orders,contact,company",
+ "payments,purchase_orders,contact,company,accounting_period",
+ "payments,tracking_categories",
+ "payments,tracking_categories,accounting_period",
+ "payments,tracking_categories,company",
+ "payments,tracking_categories,company,accounting_period",
+ "payments,tracking_categories,contact",
+ "payments,tracking_categories,contact,accounting_period",
+ "payments,tracking_categories,contact,company",
+ "payments,tracking_categories,contact,company,accounting_period",
+ "payments,tracking_categories,purchase_orders",
+ "payments,tracking_categories,purchase_orders,accounting_period",
+ "payments,tracking_categories,purchase_orders,company",
+ "payments,tracking_categories,purchase_orders,company,accounting_period",
+ "payments,tracking_categories,purchase_orders,contact",
+ "payments,tracking_categories,purchase_orders,contact,accounting_period",
+ "payments,tracking_categories,purchase_orders,contact,company",
+ "payments,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "purchase_orders",
+ "purchase_orders,accounting_period",
+ "purchase_orders,company",
+ "purchase_orders,company,accounting_period",
+ "purchase_orders,contact",
+ "purchase_orders,contact,accounting_period",
+ "purchase_orders,contact,company",
+ "purchase_orders,contact,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,accounting_period",
+ "tracking_categories,contact,company",
+ "tracking_categories,contact,company,accounting_period",
+ "tracking_categories,purchase_orders",
+ "tracking_categories,purchase_orders,accounting_period",
+ "tracking_categories,purchase_orders,company",
+ "tracking_categories,purchase_orders,company,accounting_period",
+ "tracking_categories,purchase_orders,contact",
+ "tracking_categories,purchase_orders,contact,accounting_period",
+ "tracking_categories,purchase_orders,contact,company",
+ "tracking_categories,purchase_orders,contact,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/invoices/types/invoices_list_request_type.py b/src/merge/resources/accounting/resources/invoices/types/invoices_list_request_type.py
index 549c7844..5312e413 100644
--- a/src/merge/resources/accounting/resources/invoices/types/invoices_list_request_type.py
+++ b/src/merge/resources/accounting/resources/invoices/types/invoices_list_request_type.py
@@ -1,19 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class InvoicesListRequestType(str, enum.Enum):
- ACCOUNTS_PAYABLE = "ACCOUNTS_PAYABLE"
- ACCOUNTS_RECEIVABLE = "ACCOUNTS_RECEIVABLE"
-
- def visit(
- self, accounts_payable: typing.Callable[[], T_Result], accounts_receivable: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is InvoicesListRequestType.ACCOUNTS_PAYABLE:
- return accounts_payable()
- if self is InvoicesListRequestType.ACCOUNTS_RECEIVABLE:
- return accounts_receivable()
+InvoicesListRequestType = typing.Union[typing.Literal["ACCOUNTS_PAYABLE", "ACCOUNTS_RECEIVABLE"], typing.Any]
diff --git a/src/merge/resources/accounting/resources/invoices/types/invoices_retrieve_request_expand.py b/src/merge/resources/accounting/resources/invoices/types/invoices_retrieve_request_expand.py
index 483c2e2f..211cd76c 100644
--- a/src/merge/resources/accounting/resources/invoices/types/invoices_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/invoices/types/invoices_retrieve_request_expand.py
@@ -1,1444 +1,264 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class InvoicesRetrieveRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- APPLIED_PAYMENTS = "applied_payments"
- APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "applied_payments,accounting_period"
- APPLIED_PAYMENTS_COMPANY = "applied_payments,company"
- APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,company,accounting_period"
- APPLIED_PAYMENTS_CONTACT = "applied_payments,contact"
- APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "applied_payments,contact,accounting_period"
- APPLIED_PAYMENTS_CONTACT_COMPANY = "applied_payments,contact,company"
- APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "applied_payments,contact,company,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS = "applied_payments,line_items"
- APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "applied_payments,line_items,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_COMPANY = "applied_payments,line_items,company"
- APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,line_items,company,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT = "applied_payments,line_items,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "applied_payments,line_items,contact,accounting_period"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "applied_payments,line_items,contact,company"
- APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS = "applied_payments,line_items,purchase_orders"
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,purchase_orders,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY = "applied_payments,line_items,purchase_orders,company"
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,purchase_orders,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT = "applied_payments,line_items,purchase_orders,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,purchase_orders,contact,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "applied_payments,line_items,purchase_orders,contact,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,purchase_orders,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = "applied_payments,line_items,tracking_categories"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "applied_payments,line_items,tracking_categories,company"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "applied_payments,line_items,tracking_categories,contact"
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,contact,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "applied_payments,line_items,tracking_categories,contact,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS = (
- "applied_payments,line_items,tracking_categories,purchase_orders"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,purchase_orders,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "applied_payments,line_items,tracking_categories,purchase_orders,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "applied_payments,line_items,tracking_categories,purchase_orders,contact"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "applied_payments,line_items,tracking_categories,purchase_orders,contact,company"
- )
- APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_PURCHASE_ORDERS = "applied_payments,purchase_orders"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "applied_payments,purchase_orders,accounting_period"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY = "applied_payments,purchase_orders,company"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,purchase_orders,company,accounting_period"
- )
- APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT = "applied_payments,purchase_orders,contact"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,purchase_orders,contact,accounting_period"
- )
- APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY = "applied_payments,purchase_orders,contact,company"
- APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,purchase_orders,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES = "applied_payments,tracking_categories"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "applied_payments,tracking_categories,accounting_period"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "applied_payments,tracking_categories,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT = "applied_payments,tracking_categories,contact"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,contact,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = "applied_payments,tracking_categories,contact,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,contact,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS = "applied_payments,tracking_categories,purchase_orders"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,purchase_orders,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "applied_payments,tracking_categories,purchase_orders,company"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,purchase_orders,company,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "applied_payments,tracking_categories,purchase_orders,contact"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,purchase_orders,contact,accounting_period"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "applied_payments,tracking_categories,purchase_orders,contact,company"
- )
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- CONTACT_COMPANY = "contact,company"
- CONTACT_COMPANY_ACCOUNTING_PERIOD = "contact,company,accounting_period"
- LINE_ITEMS = "line_items"
- LINE_ITEMS_ACCOUNTING_PERIOD = "line_items,accounting_period"
- LINE_ITEMS_COMPANY = "line_items,company"
- LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "line_items,company,accounting_period"
- LINE_ITEMS_CONTACT = "line_items,contact"
- LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "line_items,contact,accounting_period"
- LINE_ITEMS_CONTACT_COMPANY = "line_items,contact,company"
- LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "line_items,contact,company,accounting_period"
- LINE_ITEMS_PURCHASE_ORDERS = "line_items,purchase_orders"
- LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "line_items,purchase_orders,accounting_period"
- LINE_ITEMS_PURCHASE_ORDERS_COMPANY = "line_items,purchase_orders,company"
- LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = "line_items,purchase_orders,company,accounting_period"
- LINE_ITEMS_PURCHASE_ORDERS_CONTACT = "line_items,purchase_orders,contact"
- LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = "line_items,purchase_orders,contact,accounting_period"
- LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY = "line_items,purchase_orders,contact,company"
- LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,purchase_orders,contact,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES = "line_items,tracking_categories"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "line_items,tracking_categories,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "line_items,tracking_categories,company"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "line_items,tracking_categories,contact"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = "line_items,tracking_categories,contact,company"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS = "line_items,tracking_categories,purchase_orders"
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,purchase_orders,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = "line_items,tracking_categories,purchase_orders,company"
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,purchase_orders,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = "line_items,tracking_categories,purchase_orders,contact"
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,purchase_orders,contact,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "line_items,tracking_categories,purchase_orders,contact,company"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS = "payments"
- PAYMENTS_ACCOUNTING_PERIOD = "payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS = "payments,applied_payments"
- PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "payments,applied_payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY = "payments,applied_payments,company"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,applied_payments,company,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT = "payments,applied_payments,contact"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "payments,applied_payments,contact,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY = "payments,applied_payments,contact,company"
- PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS = "payments,applied_payments,line_items"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "payments,applied_payments,line_items,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY = "payments,applied_payments,line_items,company"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT = "payments,applied_payments,line_items,contact"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "payments,applied_payments,line_items,contact,company"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS = "payments,applied_payments,line_items,purchase_orders"
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,purchase_orders,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY = (
- "payments,applied_payments,line_items,purchase_orders,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,purchase_orders,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT = (
- "payments,applied_payments,line_items,purchase_orders,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,applied_payments,line_items,purchase_orders,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = (
- "payments,applied_payments,line_items,tracking_categories"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = (
- "payments,applied_payments,line_items,tracking_categories,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS = "payments,applied_payments,purchase_orders"
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,applied_payments,purchase_orders,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY = "payments,applied_payments,purchase_orders,company"
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,purchase_orders,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT = "payments,applied_payments,purchase_orders,contact"
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,applied_payments,purchase_orders,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "payments,applied_payments,tracking_categories"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,applied_payments,tracking_categories,company"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT = "payments,applied_payments,tracking_categories,contact"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = (
- "payments,applied_payments,tracking_categories,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS = (
- "payments,applied_payments,tracking_categories,purchase_orders"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,purchase_orders,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "payments,applied_payments,tracking_categories,purchase_orders,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "payments,applied_payments,tracking_categories,purchase_orders,contact"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,applied_payments,tracking_categories,purchase_orders,contact,company"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_COMPANY = "payments,company"
- PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,company,accounting_period"
- PAYMENTS_CONTACT = "payments,contact"
- PAYMENTS_CONTACT_ACCOUNTING_PERIOD = "payments,contact,accounting_period"
- PAYMENTS_CONTACT_COMPANY = "payments,contact,company"
- PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "payments,contact,company,accounting_period"
- PAYMENTS_LINE_ITEMS = "payments,line_items"
- PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD = "payments,line_items,accounting_period"
- PAYMENTS_LINE_ITEMS_COMPANY = "payments,line_items,company"
- PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "payments,line_items,company,accounting_period"
- PAYMENTS_LINE_ITEMS_CONTACT = "payments,line_items,contact"
- PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "payments,line_items,contact,accounting_period"
- PAYMENTS_LINE_ITEMS_CONTACT_COMPANY = "payments,line_items,contact,company"
- PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "payments,line_items,contact,company,accounting_period"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS = "payments,line_items,purchase_orders"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "payments,line_items,purchase_orders,accounting_period"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY = "payments,line_items,purchase_orders,company"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,purchase_orders,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT = "payments,line_items,purchase_orders,contact"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,line_items,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY = "payments,line_items,purchase_orders,contact,company"
- PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES = "payments,line_items,tracking_categories"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "payments,line_items,tracking_categories,company"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "payments,line_items,tracking_categories,contact"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,contact,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY = "payments,line_items,tracking_categories,contact,company"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS = "payments,line_items,tracking_categories,purchase_orders"
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,purchase_orders,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = (
- "payments,line_items,tracking_categories,purchase_orders,company"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,purchase_orders,company,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = (
- "payments,line_items,tracking_categories,purchase_orders,contact"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,line_items,tracking_categories,purchase_orders,contact,company"
- )
- PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_PURCHASE_ORDERS = "payments,purchase_orders"
- PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "payments,purchase_orders,accounting_period"
- PAYMENTS_PURCHASE_ORDERS_COMPANY = "payments,purchase_orders,company"
- PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = "payments,purchase_orders,company,accounting_period"
- PAYMENTS_PURCHASE_ORDERS_CONTACT = "payments,purchase_orders,contact"
- PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = "payments,purchase_orders,contact,accounting_period"
- PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY = "payments,purchase_orders,contact,company"
- PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,purchase_orders,contact,company,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES = "payments,tracking_categories"
- PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "payments,tracking_categories,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,tracking_categories,company"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "payments,tracking_categories,company,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT = "payments,tracking_categories,contact"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "payments,tracking_categories,contact,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY = "payments,tracking_categories,contact,company"
- PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,contact,company,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS = "payments,tracking_categories,purchase_orders"
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,purchase_orders,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = "payments,tracking_categories,purchase_orders,company"
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,purchase_orders,company,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = "payments,tracking_categories,purchase_orders,contact"
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,purchase_orders,contact,accounting_period"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = (
- "payments,tracking_categories,purchase_orders,contact,company"
- )
- PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "payments,tracking_categories,purchase_orders,contact,company,accounting_period"
- )
- PURCHASE_ORDERS = "purchase_orders"
- PURCHASE_ORDERS_ACCOUNTING_PERIOD = "purchase_orders,accounting_period"
- PURCHASE_ORDERS_COMPANY = "purchase_orders,company"
- PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = "purchase_orders,company,accounting_period"
- PURCHASE_ORDERS_CONTACT = "purchase_orders,contact"
- PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = "purchase_orders,contact,accounting_period"
- PURCHASE_ORDERS_CONTACT_COMPANY = "purchase_orders,contact,company"
- PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = "purchase_orders,contact,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
- TRACKING_CATEGORIES_CONTACT_COMPANY = "tracking_categories,contact,company"
- TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,contact,company,accounting_period"
- TRACKING_CATEGORIES_PURCHASE_ORDERS = "tracking_categories,purchase_orders"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD = "tracking_categories,purchase_orders,accounting_period"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY = "tracking_categories,purchase_orders,company"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,purchase_orders,company,accounting_period"
- )
- TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT = "tracking_categories,purchase_orders,contact"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD = (
- "tracking_categories,purchase_orders,contact,accounting_period"
- )
- TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY = "tracking_categories,purchase_orders,contact,company"
- TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,purchase_orders,contact,company,accounting_period"
- )
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- applied_payments: typing.Callable[[], T_Result],
- applied_payments_accounting_period: typing.Callable[[], T_Result],
- applied_payments_company: typing.Callable[[], T_Result],
- applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_contact: typing.Callable[[], T_Result],
- applied_payments_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_contact_company: typing.Callable[[], T_Result],
- applied_payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items: typing.Callable[[], T_Result],
- applied_payments_line_items_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_company: typing.Callable[[], T_Result],
- applied_payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_company: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_line_items_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_purchase_orders_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_line_items_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_line_items_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_line_items_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- applied_payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- applied_payments_purchase_orders: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_company: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_contact: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_contact_company: typing.Callable[[], T_Result],
- applied_payments_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- contact_company: typing.Callable[[], T_Result],
- contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items: typing.Callable[[], T_Result],
- line_items_accounting_period: typing.Callable[[], T_Result],
- line_items_company: typing.Callable[[], T_Result],
- line_items_company_accounting_period: typing.Callable[[], T_Result],
- line_items_contact: typing.Callable[[], T_Result],
- line_items_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_contact_company: typing.Callable[[], T_Result],
- line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items_purchase_orders: typing.Callable[[], T_Result],
- line_items_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- line_items_purchase_orders_company: typing.Callable[[], T_Result],
- line_items_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- line_items_purchase_orders_contact: typing.Callable[[], T_Result],
- line_items_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_purchase_orders_contact_company: typing.Callable[[], T_Result],
- line_items_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories: typing.Callable[[], T_Result],
- line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments: typing.Callable[[], T_Result],
- payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments: typing.Callable[[], T_Result],
- payments_applied_payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_company: typing.Callable[[], T_Result],
- payments_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_contact: typing.Callable[[], T_Result],
- payments_applied_payments_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_company: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_purchase_orders: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_company: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_applied_payments_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_company: typing.Callable[[], T_Result],
- payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_contact: typing.Callable[[], T_Result],
- payments_contact_accounting_period: typing.Callable[[], T_Result],
- payments_contact_company: typing.Callable[[], T_Result],
- payments_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items: typing.Callable[[], T_Result],
- payments_line_items_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_company: typing.Callable[[], T_Result],
- payments_line_items_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_contact: typing.Callable[[], T_Result],
- payments_line_items_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_contact_company: typing.Callable[[], T_Result],
- payments_line_items_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_company: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_line_items_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_line_items_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_line_items_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[
- [], T_Result
- ],
- payments_purchase_orders: typing.Callable[[], T_Result],
- payments_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_purchase_orders_company: typing.Callable[[], T_Result],
- payments_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories: typing.Callable[[], T_Result],
- payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_contact: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_company: typing.Callable[[], T_Result],
- payments_tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- payments_tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- purchase_orders: typing.Callable[[], T_Result],
- purchase_orders_accounting_period: typing.Callable[[], T_Result],
- purchase_orders_company: typing.Callable[[], T_Result],
- purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- purchase_orders_contact: typing.Callable[[], T_Result],
- purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- purchase_orders_contact_company: typing.Callable[[], T_Result],
- purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_company: typing.Callable[[], T_Result],
- tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_company: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_contact: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_contact_company: typing.Callable[[], T_Result],
- tracking_categories_purchase_orders_contact_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is InvoicesRetrieveRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS:
- return applied_payments()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return applied_payments_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_COMPANY:
- return applied_payments_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_CONTACT:
- return applied_payments_contact()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_CONTACT_COMPANY:
- return applied_payments_contact_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS:
- return applied_payments_line_items()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return applied_payments_line_items_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_COMPANY:
- return applied_payments_line_items_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT:
- return applied_payments_line_items_contact()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_line_items_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return applied_payments_line_items_contact_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS:
- return applied_payments_line_items_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return applied_payments_line_items_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY:
- return applied_payments_line_items_purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_line_items_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT:
- return applied_payments_line_items_purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_line_items_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return applied_payments_line_items_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return applied_payments_line_items_tracking_categories()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_line_items_tracking_categories_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_line_items_tracking_categories_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return applied_payments_line_items_tracking_categories_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return applied_payments_line_items_tracking_categories_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return applied_payments_line_items_tracking_categories_purchase_orders()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_company_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_contact_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS:
- return applied_payments_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return applied_payments_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY:
- return applied_payments_purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT:
- return applied_payments_purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return applied_payments_purchase_orders_contact_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return applied_payments_tracking_categories()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_tracking_categories_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return applied_payments_tracking_categories_contact()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return applied_payments_tracking_categories_contact_company()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return applied_payments_tracking_categories_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return applied_payments_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return applied_payments_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return applied_payments_tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return applied_payments_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return applied_payments_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.COMPANY:
- return company()
- if self is InvoicesRetrieveRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.CONTACT:
- return contact()
- if self is InvoicesRetrieveRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.CONTACT_COMPANY:
- return contact_company()
- if self is InvoicesRetrieveRequestExpand.CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS:
- return line_items()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_ACCOUNTING_PERIOD:
- return line_items_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_COMPANY:
- return line_items_company()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_CONTACT:
- return line_items_contact()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_CONTACT_COMPANY:
- return line_items_contact_company()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_PURCHASE_ORDERS:
- return line_items_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return line_items_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_COMPANY:
- return line_items_purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_CONTACT:
- return line_items_purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return line_items_purchase_orders_contact_company()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES:
- return line_items_tracking_categories()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return line_items_tracking_categories_company()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return line_items_tracking_categories_contact()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return line_items_tracking_categories_contact_company()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return line_items_tracking_categories_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return line_items_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return line_items_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return line_items_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS:
- return payments()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_ACCOUNTING_PERIOD:
- return payments_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS:
- return payments_applied_payments()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return payments_applied_payments_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY:
- return payments_applied_payments_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT:
- return payments_applied_payments_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY:
- return payments_applied_payments_contact_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS:
- return payments_applied_payments_line_items()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY:
- return payments_applied_payments_line_items_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT:
- return payments_applied_payments_line_items_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return payments_applied_payments_line_items_contact_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS:
- return payments_applied_payments_line_items_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_applied_payments_line_items_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY:
- return payments_applied_payments_line_items_purchase_orders_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT:
- return payments_applied_payments_line_items_purchase_orders_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_applied_payments_line_items_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return payments_applied_payments_line_items_tracking_categories()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_line_items_tracking_categories_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return payments_applied_payments_line_items_tracking_categories_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_contact_company_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_company_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY
- ):
- return payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return (
- payments_applied_payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period()
- )
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS:
- return payments_applied_payments_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_applied_payments_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY:
- return payments_applied_payments_purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT:
- return payments_applied_payments_purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return payments_applied_payments_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_applied_payments_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return payments_applied_payments_tracking_categories()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_tracking_categories_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return payments_applied_payments_tracking_categories_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_applied_payments_tracking_categories_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return payments_applied_payments_tracking_categories_purchase_orders()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return payments_applied_payments_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return payments_applied_payments_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_contact_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_COMPANY:
- return payments_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_CONTACT:
- return payments_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_CONTACT_ACCOUNTING_PERIOD:
- return payments_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_CONTACT_COMPANY:
- return payments_contact_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS:
- return payments_line_items()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_ACCOUNTING_PERIOD:
- return payments_line_items_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_COMPANY:
- return payments_line_items_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT:
- return payments_line_items_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_COMPANY:
- return payments_line_items_contact_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS:
- return payments_line_items_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_line_items_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY:
- return payments_line_items_purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT:
- return payments_line_items_purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_line_items_purchase_orders_contact_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES:
- return payments_line_items_tracking_categories()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return payments_line_items_tracking_categories_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return payments_line_items_tracking_categories_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_line_items_tracking_categories_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_line_items_tracking_categories_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return payments_line_items_tracking_categories_purchase_orders()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return payments_line_items_tracking_categories_purchase_orders_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return payments_line_items_tracking_categories_purchase_orders_contact()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_purchase_orders_contact_accounting_period()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY
- ):
- return payments_line_items_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_LINE_ITEMS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_line_items_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_PURCHASE_ORDERS:
- return payments_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_PURCHASE_ORDERS_COMPANY:
- return payments_purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return payments_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_PURCHASE_ORDERS_CONTACT:
- return payments_purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return payments_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_purchase_orders_contact_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES:
- return payments_tracking_categories()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_tracking_categories_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_tracking_categories_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT:
- return payments_tracking_categories_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return payments_tracking_categories_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY:
- return payments_tracking_categories_contact_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return payments_tracking_categories_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return payments_tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return payments_tracking_categories_purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return payments_tracking_categories_purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return payments_tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return payments_tracking_categories_purchase_orders_contact_company()
- if (
- self
- is InvoicesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_tracking_categories_purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PURCHASE_ORDERS:
- return purchase_orders()
- if self is InvoicesRetrieveRequestExpand.PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PURCHASE_ORDERS_COMPANY:
- return purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PURCHASE_ORDERS_CONTACT:
- return purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.PURCHASE_ORDERS_CONTACT_COMPANY:
- return purchase_orders_contact_company()
- if self is InvoicesRetrieveRequestExpand.PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return purchase_orders_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY:
- return tracking_categories_contact_company()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS:
- return tracking_categories_purchase_orders()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_ACCOUNTING_PERIOD:
- return tracking_categories_purchase_orders_accounting_period()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY:
- return tracking_categories_purchase_orders_company()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_purchase_orders_company_accounting_period()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT:
- return tracking_categories_purchase_orders_contact()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_purchase_orders_contact_accounting_period()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY:
- return tracking_categories_purchase_orders_contact_company()
- if self is InvoicesRetrieveRequestExpand.TRACKING_CATEGORIES_PURCHASE_ORDERS_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_purchase_orders_contact_company_accounting_period()
+InvoicesRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "applied_payments",
+ "applied_payments,accounting_period",
+ "applied_payments,company",
+ "applied_payments,company,accounting_period",
+ "applied_payments,contact",
+ "applied_payments,contact,accounting_period",
+ "applied_payments,contact,company",
+ "applied_payments,contact,company,accounting_period",
+ "applied_payments,line_items",
+ "applied_payments,line_items,accounting_period",
+ "applied_payments,line_items,company",
+ "applied_payments,line_items,company,accounting_period",
+ "applied_payments,line_items,contact",
+ "applied_payments,line_items,contact,accounting_period",
+ "applied_payments,line_items,contact,company",
+ "applied_payments,line_items,contact,company,accounting_period",
+ "applied_payments,line_items,purchase_orders",
+ "applied_payments,line_items,purchase_orders,accounting_period",
+ "applied_payments,line_items,purchase_orders,company",
+ "applied_payments,line_items,purchase_orders,company,accounting_period",
+ "applied_payments,line_items,purchase_orders,contact",
+ "applied_payments,line_items,purchase_orders,contact,accounting_period",
+ "applied_payments,line_items,purchase_orders,contact,company",
+ "applied_payments,line_items,purchase_orders,contact,company,accounting_period",
+ "applied_payments,line_items,tracking_categories",
+ "applied_payments,line_items,tracking_categories,accounting_period",
+ "applied_payments,line_items,tracking_categories,company",
+ "applied_payments,line_items,tracking_categories,company,accounting_period",
+ "applied_payments,line_items,tracking_categories,contact",
+ "applied_payments,line_items,tracking_categories,contact,accounting_period",
+ "applied_payments,line_items,tracking_categories,contact,company",
+ "applied_payments,line_items,tracking_categories,contact,company,accounting_period",
+ "applied_payments,line_items,tracking_categories,purchase_orders",
+ "applied_payments,line_items,tracking_categories,purchase_orders,accounting_period",
+ "applied_payments,line_items,tracking_categories,purchase_orders,company",
+ "applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period",
+ "applied_payments,line_items,tracking_categories,purchase_orders,contact",
+ "applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period",
+ "applied_payments,line_items,tracking_categories,purchase_orders,contact,company",
+ "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "applied_payments,purchase_orders",
+ "applied_payments,purchase_orders,accounting_period",
+ "applied_payments,purchase_orders,company",
+ "applied_payments,purchase_orders,company,accounting_period",
+ "applied_payments,purchase_orders,contact",
+ "applied_payments,purchase_orders,contact,accounting_period",
+ "applied_payments,purchase_orders,contact,company",
+ "applied_payments,purchase_orders,contact,company,accounting_period",
+ "applied_payments,tracking_categories",
+ "applied_payments,tracking_categories,accounting_period",
+ "applied_payments,tracking_categories,company",
+ "applied_payments,tracking_categories,company,accounting_period",
+ "applied_payments,tracking_categories,contact",
+ "applied_payments,tracking_categories,contact,accounting_period",
+ "applied_payments,tracking_categories,contact,company",
+ "applied_payments,tracking_categories,contact,company,accounting_period",
+ "applied_payments,tracking_categories,purchase_orders",
+ "applied_payments,tracking_categories,purchase_orders,accounting_period",
+ "applied_payments,tracking_categories,purchase_orders,company",
+ "applied_payments,tracking_categories,purchase_orders,company,accounting_period",
+ "applied_payments,tracking_categories,purchase_orders,contact",
+ "applied_payments,tracking_categories,purchase_orders,contact,accounting_period",
+ "applied_payments,tracking_categories,purchase_orders,contact,company",
+ "applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "company",
+ "company,accounting_period",
+ "contact",
+ "contact,accounting_period",
+ "contact,company",
+ "contact,company,accounting_period",
+ "line_items",
+ "line_items,accounting_period",
+ "line_items,company",
+ "line_items,company,accounting_period",
+ "line_items,contact",
+ "line_items,contact,accounting_period",
+ "line_items,contact,company",
+ "line_items,contact,company,accounting_period",
+ "line_items,purchase_orders",
+ "line_items,purchase_orders,accounting_period",
+ "line_items,purchase_orders,company",
+ "line_items,purchase_orders,company,accounting_period",
+ "line_items,purchase_orders,contact",
+ "line_items,purchase_orders,contact,accounting_period",
+ "line_items,purchase_orders,contact,company",
+ "line_items,purchase_orders,contact,company,accounting_period",
+ "line_items,tracking_categories",
+ "line_items,tracking_categories,accounting_period",
+ "line_items,tracking_categories,company",
+ "line_items,tracking_categories,company,accounting_period",
+ "line_items,tracking_categories,contact",
+ "line_items,tracking_categories,contact,accounting_period",
+ "line_items,tracking_categories,contact,company",
+ "line_items,tracking_categories,contact,company,accounting_period",
+ "line_items,tracking_categories,purchase_orders",
+ "line_items,tracking_categories,purchase_orders,accounting_period",
+ "line_items,tracking_categories,purchase_orders,company",
+ "line_items,tracking_categories,purchase_orders,company,accounting_period",
+ "line_items,tracking_categories,purchase_orders,contact",
+ "line_items,tracking_categories,purchase_orders,contact,accounting_period",
+ "line_items,tracking_categories,purchase_orders,contact,company",
+ "line_items,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "payments",
+ "payments,accounting_period",
+ "payments,applied_payments",
+ "payments,applied_payments,accounting_period",
+ "payments,applied_payments,company",
+ "payments,applied_payments,company,accounting_period",
+ "payments,applied_payments,contact",
+ "payments,applied_payments,contact,accounting_period",
+ "payments,applied_payments,contact,company",
+ "payments,applied_payments,contact,company,accounting_period",
+ "payments,applied_payments,line_items",
+ "payments,applied_payments,line_items,accounting_period",
+ "payments,applied_payments,line_items,company",
+ "payments,applied_payments,line_items,company,accounting_period",
+ "payments,applied_payments,line_items,contact",
+ "payments,applied_payments,line_items,contact,accounting_period",
+ "payments,applied_payments,line_items,contact,company",
+ "payments,applied_payments,line_items,contact,company,accounting_period",
+ "payments,applied_payments,line_items,purchase_orders",
+ "payments,applied_payments,line_items,purchase_orders,accounting_period",
+ "payments,applied_payments,line_items,purchase_orders,company",
+ "payments,applied_payments,line_items,purchase_orders,company,accounting_period",
+ "payments,applied_payments,line_items,purchase_orders,contact",
+ "payments,applied_payments,line_items,purchase_orders,contact,accounting_period",
+ "payments,applied_payments,line_items,purchase_orders,contact,company",
+ "payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories",
+ "payments,applied_payments,line_items,tracking_categories,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,company",
+ "payments,applied_payments,line_items,tracking_categories,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,contact",
+ "payments,applied_payments,line_items,tracking_categories,contact,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,contact,company",
+ "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,company",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company",
+ "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "payments,applied_payments,purchase_orders",
+ "payments,applied_payments,purchase_orders,accounting_period",
+ "payments,applied_payments,purchase_orders,company",
+ "payments,applied_payments,purchase_orders,company,accounting_period",
+ "payments,applied_payments,purchase_orders,contact",
+ "payments,applied_payments,purchase_orders,contact,accounting_period",
+ "payments,applied_payments,purchase_orders,contact,company",
+ "payments,applied_payments,purchase_orders,contact,company,accounting_period",
+ "payments,applied_payments,tracking_categories",
+ "payments,applied_payments,tracking_categories,accounting_period",
+ "payments,applied_payments,tracking_categories,company",
+ "payments,applied_payments,tracking_categories,company,accounting_period",
+ "payments,applied_payments,tracking_categories,contact",
+ "payments,applied_payments,tracking_categories,contact,accounting_period",
+ "payments,applied_payments,tracking_categories,contact,company",
+ "payments,applied_payments,tracking_categories,contact,company,accounting_period",
+ "payments,applied_payments,tracking_categories,purchase_orders",
+ "payments,applied_payments,tracking_categories,purchase_orders,accounting_period",
+ "payments,applied_payments,tracking_categories,purchase_orders,company",
+ "payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period",
+ "payments,applied_payments,tracking_categories,purchase_orders,contact",
+ "payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period",
+ "payments,applied_payments,tracking_categories,purchase_orders,contact,company",
+ "payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "payments,company",
+ "payments,company,accounting_period",
+ "payments,contact",
+ "payments,contact,accounting_period",
+ "payments,contact,company",
+ "payments,contact,company,accounting_period",
+ "payments,line_items",
+ "payments,line_items,accounting_period",
+ "payments,line_items,company",
+ "payments,line_items,company,accounting_period",
+ "payments,line_items,contact",
+ "payments,line_items,contact,accounting_period",
+ "payments,line_items,contact,company",
+ "payments,line_items,contact,company,accounting_period",
+ "payments,line_items,purchase_orders",
+ "payments,line_items,purchase_orders,accounting_period",
+ "payments,line_items,purchase_orders,company",
+ "payments,line_items,purchase_orders,company,accounting_period",
+ "payments,line_items,purchase_orders,contact",
+ "payments,line_items,purchase_orders,contact,accounting_period",
+ "payments,line_items,purchase_orders,contact,company",
+ "payments,line_items,purchase_orders,contact,company,accounting_period",
+ "payments,line_items,tracking_categories",
+ "payments,line_items,tracking_categories,accounting_period",
+ "payments,line_items,tracking_categories,company",
+ "payments,line_items,tracking_categories,company,accounting_period",
+ "payments,line_items,tracking_categories,contact",
+ "payments,line_items,tracking_categories,contact,accounting_period",
+ "payments,line_items,tracking_categories,contact,company",
+ "payments,line_items,tracking_categories,contact,company,accounting_period",
+ "payments,line_items,tracking_categories,purchase_orders",
+ "payments,line_items,tracking_categories,purchase_orders,accounting_period",
+ "payments,line_items,tracking_categories,purchase_orders,company",
+ "payments,line_items,tracking_categories,purchase_orders,company,accounting_period",
+ "payments,line_items,tracking_categories,purchase_orders,contact",
+ "payments,line_items,tracking_categories,purchase_orders,contact,accounting_period",
+ "payments,line_items,tracking_categories,purchase_orders,contact,company",
+ "payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "payments,purchase_orders",
+ "payments,purchase_orders,accounting_period",
+ "payments,purchase_orders,company",
+ "payments,purchase_orders,company,accounting_period",
+ "payments,purchase_orders,contact",
+ "payments,purchase_orders,contact,accounting_period",
+ "payments,purchase_orders,contact,company",
+ "payments,purchase_orders,contact,company,accounting_period",
+ "payments,tracking_categories",
+ "payments,tracking_categories,accounting_period",
+ "payments,tracking_categories,company",
+ "payments,tracking_categories,company,accounting_period",
+ "payments,tracking_categories,contact",
+ "payments,tracking_categories,contact,accounting_period",
+ "payments,tracking_categories,contact,company",
+ "payments,tracking_categories,contact,company,accounting_period",
+ "payments,tracking_categories,purchase_orders",
+ "payments,tracking_categories,purchase_orders,accounting_period",
+ "payments,tracking_categories,purchase_orders,company",
+ "payments,tracking_categories,purchase_orders,company,accounting_period",
+ "payments,tracking_categories,purchase_orders,contact",
+ "payments,tracking_categories,purchase_orders,contact,accounting_period",
+ "payments,tracking_categories,purchase_orders,contact,company",
+ "payments,tracking_categories,purchase_orders,contact,company,accounting_period",
+ "purchase_orders",
+ "purchase_orders,accounting_period",
+ "purchase_orders,company",
+ "purchase_orders,company,accounting_period",
+ "purchase_orders,contact",
+ "purchase_orders,contact,accounting_period",
+ "purchase_orders,contact,company",
+ "purchase_orders,contact,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,accounting_period",
+ "tracking_categories,contact,company",
+ "tracking_categories,contact,company,accounting_period",
+ "tracking_categories,purchase_orders",
+ "tracking_categories,purchase_orders,accounting_period",
+ "tracking_categories,purchase_orders,company",
+ "tracking_categories,purchase_orders,company,accounting_period",
+ "tracking_categories,purchase_orders,contact",
+ "tracking_categories,purchase_orders,contact,accounting_period",
+ "tracking_categories,purchase_orders,contact,company",
+ "tracking_categories,purchase_orders,contact,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/issues/client.py b/src/merge/resources/accounting/resources/issues/client.py
index 03bd1ef6..8faa370f 100644
--- a/src/merge/resources/accounting/resources/issues/client.py
+++ b/src/merge/resources/accounting/resources/issues/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_issue_list import PaginatedIssueList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.issue import Issue
-from ...types.paginated_issue_list import PaginatedIssueList
-from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class IssuesClient:
@@ -32,13 +32,14 @@ def list(
integration_name: typing.Optional[str] = None,
last_incident_time_after: typing.Optional[dt.datetime] = None,
last_incident_time_before: typing.Optional[dt.datetime] = None,
+ linked_account_id: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
status: typing.Optional[IssuesListRequestStatus] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedIssueList:
"""
- Gets issues.
+ Gets all issues for Organization.
Parameters
----------
@@ -69,6 +70,9 @@ def list(
last_incident_time_before : typing.Optional[dt.datetime]
If provided, will only return issues whose last incident time was before this datetime.
+ linked_account_id : typing.Optional[str]
+ If provided, will only include issues pertaining to the linked account passed in.
+
page_size : typing.Optional[int]
Number of results to return per page.
@@ -91,7 +95,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -121,15 +125,22 @@ def list(
"last_incident_time_before": serialize_datetime(last_incident_time_before)
if last_incident_time_before is not None
else None,
+ "linked_account_id": linked_account_id,
"page_size": page_size,
"start_date": start_date,
"status": status,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,7 +164,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -164,11 +175,19 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"accounting/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"accounting/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -192,13 +211,14 @@ async def list(
integration_name: typing.Optional[str] = None,
last_incident_time_after: typing.Optional[dt.datetime] = None,
last_incident_time_before: typing.Optional[dt.datetime] = None,
+ linked_account_id: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
status: typing.Optional[IssuesListRequestStatus] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedIssueList:
"""
- Gets issues.
+ Gets all issues for Organization.
Parameters
----------
@@ -229,6 +249,9 @@ async def list(
last_incident_time_before : typing.Optional[dt.datetime]
If provided, will only return issues whose last incident time was before this datetime.
+ linked_account_id : typing.Optional[str]
+ If provided, will only include issues pertaining to the linked account passed in.
+
page_size : typing.Optional[int]
Number of results to return per page.
@@ -251,13 +274,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.issues.list()
+
+
+ async def main() -> None:
+ await client.accounting.issues.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/issues",
@@ -281,15 +312,22 @@ async def list(
"last_incident_time_before": serialize_datetime(last_incident_time_before)
if last_incident_time_before is not None
else None,
+ "linked_account_id": linked_account_id,
"page_size": page_size,
"start_date": start_date,
"status": status,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -313,22 +351,38 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.issues.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.issues.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"accounting/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"accounting/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/issues/types/issues_list_request_status.py b/src/merge/resources/accounting/resources/issues/types/issues_list_request_status.py
index 2bd3521e..3886423c 100644
--- a/src/merge/resources/accounting/resources/issues/types/issues_list_request_status.py
+++ b/src/merge/resources/accounting/resources/issues/types/issues_list_request_status.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssuesListRequestStatus(str, enum.Enum):
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssuesListRequestStatus.ONGOING:
- return ongoing()
- if self is IssuesListRequestStatus.RESOLVED:
- return resolved()
+IssuesListRequestStatus = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/accounting/resources/items/client.py b/src/merge/resources/accounting/resources/items/client.py
index 86396a9e..4cb368f4 100644
--- a/src/merge/resources/accounting/resources/items/client.py
+++ b/src/merge/resources/accounting/resources/items/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.items_list_request_expand import ItemsListRequestExpand
from .....core.request_options import RequestOptions
-from ...types.item import Item
from ...types.paginated_item_list import PaginatedItemList
-from .types.items_list_request_expand import ItemsListRequestExpand
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.items_retrieve_request_expand import ItemsRetrieveRequestExpand
+from ...types.item import Item
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class ItemsClient:
@@ -30,6 +30,7 @@ def list(
expand: typing.Optional[ItemsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -59,11 +60,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -92,7 +96,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -111,6 +115,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -120,9 +125,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedItemList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedItemList,
+ parse_obj_as(
+ type_=PaginatedItemList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -167,7 +178,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -188,9 +199,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Item, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Item,
+ parse_obj_as(
+ type_=Item, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -211,6 +228,7 @@ async def list(
expand: typing.Optional[ItemsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -240,11 +258,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -273,13 +294,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.items.list()
+
+
+ async def main() -> None:
+ await client.accounting.items.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/items",
@@ -292,6 +321,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -301,9 +331,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedItemList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedItemList,
+ parse_obj_as(
+ type_=PaginatedItemList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -348,15 +384,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.items.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.items.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/items/{jsonable_encoder(id)}",
@@ -369,9 +413,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Item, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Item,
+ parse_obj_as(
+ type_=Item, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/items/types/items_list_request_expand.py b/src/merge/resources/accounting/resources/items/types/items_list_request_expand.py
index 69cd1331..094d7255 100644
--- a/src/merge/resources/accounting/resources/items/types/items_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/items/types/items_list_request_expand.py
@@ -1,41 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ItemsListRequestExpand(str, enum.Enum):
- COMPANY = "company"
- PURCHASE_ACCOUNT = "purchase_account"
- PURCHASE_ACCOUNT_COMPANY = "purchase_account,company"
- PURCHASE_ACCOUNT_SALES_ACCOUNT = "purchase_account,sales_account"
- PURCHASE_ACCOUNT_SALES_ACCOUNT_COMPANY = "purchase_account,sales_account,company"
- SALES_ACCOUNT = "sales_account"
- SALES_ACCOUNT_COMPANY = "sales_account,company"
-
- def visit(
- self,
- company: typing.Callable[[], T_Result],
- purchase_account: typing.Callable[[], T_Result],
- purchase_account_company: typing.Callable[[], T_Result],
- purchase_account_sales_account: typing.Callable[[], T_Result],
- purchase_account_sales_account_company: typing.Callable[[], T_Result],
- sales_account: typing.Callable[[], T_Result],
- sales_account_company: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ItemsListRequestExpand.COMPANY:
- return company()
- if self is ItemsListRequestExpand.PURCHASE_ACCOUNT:
- return purchase_account()
- if self is ItemsListRequestExpand.PURCHASE_ACCOUNT_COMPANY:
- return purchase_account_company()
- if self is ItemsListRequestExpand.PURCHASE_ACCOUNT_SALES_ACCOUNT:
- return purchase_account_sales_account()
- if self is ItemsListRequestExpand.PURCHASE_ACCOUNT_SALES_ACCOUNT_COMPANY:
- return purchase_account_sales_account_company()
- if self is ItemsListRequestExpand.SALES_ACCOUNT:
- return sales_account()
- if self is ItemsListRequestExpand.SALES_ACCOUNT_COMPANY:
- return sales_account_company()
+ItemsListRequestExpand = typing.Union[
+ typing.Literal[
+ "company",
+ "company,purchase_tax_rate",
+ "company,sales_tax_rate",
+ "company,sales_tax_rate,purchase_tax_rate",
+ "purchase_account",
+ "purchase_account,company",
+ "purchase_account,company,purchase_tax_rate",
+ "purchase_account,company,sales_tax_rate",
+ "purchase_account,company,sales_tax_rate,purchase_tax_rate",
+ "purchase_account,purchase_tax_rate",
+ "purchase_account,sales_account",
+ "purchase_account,sales_account,company",
+ "purchase_account,sales_account,company,purchase_tax_rate",
+ "purchase_account,sales_account,company,sales_tax_rate",
+ "purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate",
+ "purchase_account,sales_account,purchase_tax_rate",
+ "purchase_account,sales_account,sales_tax_rate",
+ "purchase_account,sales_account,sales_tax_rate,purchase_tax_rate",
+ "purchase_account,sales_tax_rate",
+ "purchase_account,sales_tax_rate,purchase_tax_rate",
+ "purchase_tax_rate",
+ "sales_account",
+ "sales_account,company",
+ "sales_account,company,purchase_tax_rate",
+ "sales_account,company,sales_tax_rate",
+ "sales_account,company,sales_tax_rate,purchase_tax_rate",
+ "sales_account,purchase_tax_rate",
+ "sales_account,sales_tax_rate",
+ "sales_account,sales_tax_rate,purchase_tax_rate",
+ "sales_tax_rate",
+ "sales_tax_rate,purchase_tax_rate",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/items/types/items_retrieve_request_expand.py b/src/merge/resources/accounting/resources/items/types/items_retrieve_request_expand.py
index 66abe7d6..208e7b7d 100644
--- a/src/merge/resources/accounting/resources/items/types/items_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/items/types/items_retrieve_request_expand.py
@@ -1,41 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ItemsRetrieveRequestExpand(str, enum.Enum):
- COMPANY = "company"
- PURCHASE_ACCOUNT = "purchase_account"
- PURCHASE_ACCOUNT_COMPANY = "purchase_account,company"
- PURCHASE_ACCOUNT_SALES_ACCOUNT = "purchase_account,sales_account"
- PURCHASE_ACCOUNT_SALES_ACCOUNT_COMPANY = "purchase_account,sales_account,company"
- SALES_ACCOUNT = "sales_account"
- SALES_ACCOUNT_COMPANY = "sales_account,company"
-
- def visit(
- self,
- company: typing.Callable[[], T_Result],
- purchase_account: typing.Callable[[], T_Result],
- purchase_account_company: typing.Callable[[], T_Result],
- purchase_account_sales_account: typing.Callable[[], T_Result],
- purchase_account_sales_account_company: typing.Callable[[], T_Result],
- sales_account: typing.Callable[[], T_Result],
- sales_account_company: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ItemsRetrieveRequestExpand.COMPANY:
- return company()
- if self is ItemsRetrieveRequestExpand.PURCHASE_ACCOUNT:
- return purchase_account()
- if self is ItemsRetrieveRequestExpand.PURCHASE_ACCOUNT_COMPANY:
- return purchase_account_company()
- if self is ItemsRetrieveRequestExpand.PURCHASE_ACCOUNT_SALES_ACCOUNT:
- return purchase_account_sales_account()
- if self is ItemsRetrieveRequestExpand.PURCHASE_ACCOUNT_SALES_ACCOUNT_COMPANY:
- return purchase_account_sales_account_company()
- if self is ItemsRetrieveRequestExpand.SALES_ACCOUNT:
- return sales_account()
- if self is ItemsRetrieveRequestExpand.SALES_ACCOUNT_COMPANY:
- return sales_account_company()
+ItemsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "company",
+ "company,purchase_tax_rate",
+ "company,sales_tax_rate",
+ "company,sales_tax_rate,purchase_tax_rate",
+ "purchase_account",
+ "purchase_account,company",
+ "purchase_account,company,purchase_tax_rate",
+ "purchase_account,company,sales_tax_rate",
+ "purchase_account,company,sales_tax_rate,purchase_tax_rate",
+ "purchase_account,purchase_tax_rate",
+ "purchase_account,sales_account",
+ "purchase_account,sales_account,company",
+ "purchase_account,sales_account,company,purchase_tax_rate",
+ "purchase_account,sales_account,company,sales_tax_rate",
+ "purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate",
+ "purchase_account,sales_account,purchase_tax_rate",
+ "purchase_account,sales_account,sales_tax_rate",
+ "purchase_account,sales_account,sales_tax_rate,purchase_tax_rate",
+ "purchase_account,sales_tax_rate",
+ "purchase_account,sales_tax_rate,purchase_tax_rate",
+ "purchase_tax_rate",
+ "sales_account",
+ "sales_account,company",
+ "sales_account,company,purchase_tax_rate",
+ "sales_account,company,sales_tax_rate",
+ "sales_account,company,sales_tax_rate,purchase_tax_rate",
+ "sales_account,purchase_tax_rate",
+ "sales_account,sales_tax_rate",
+ "sales_account,sales_tax_rate,purchase_tax_rate",
+ "sales_tax_rate",
+ "sales_tax_rate,purchase_tax_rate",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/journal_entries/client.py b/src/merge/resources/accounting/resources/journal_entries/client.py
index a8ac58cb..ce4870a3 100644
--- a/src/merge/resources/accounting/resources/journal_entries/client.py
+++ b/src/merge/resources/accounting/resources/journal_entries/client.py
@@ -1,22 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.journal_entries_list_request_expand import JournalEntriesListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_journal_entry_list import PaginatedJournalEntryList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.journal_entry import JournalEntry
from ...types.journal_entry_request import JournalEntryRequest
from ...types.journal_entry_response import JournalEntryResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_journal_entry_list import PaginatedJournalEntryList
-from .types.journal_entries_list_request_expand import JournalEntriesListRequestExpand
from .types.journal_entries_retrieve_request_expand import JournalEntriesRetrieveRequestExpand
+from ...types.journal_entry import JournalEntry
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,6 +37,8 @@ def list(
expand: typing.Optional[JournalEntriesListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -65,11 +68,17 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -98,7 +107,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -117,6 +126,8 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -130,9 +141,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedJournalEntryList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedJournalEntryList,
+ parse_obj_as(
+ type_=PaginatedJournalEntryList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -169,7 +186,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import JournalEntryRequest
client = Merge(
@@ -183,14 +200,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/journal-entries",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(JournalEntryResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ JournalEntryResponse,
+ parse_obj_as(
+ type_=JournalEntryResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -202,6 +230,7 @@ def retrieve(
*,
expand: typing.Optional[JournalEntriesRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> JournalEntry:
"""
@@ -217,6 +246,9 @@ def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -227,7 +259,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -240,12 +272,101 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/journal-entries/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ JournalEntry,
+ parse_obj_as(
+ type_=JournalEntry, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def lines_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.journal_entries.lines_remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/journal-entries/lines/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(JournalEntry, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -267,7 +388,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -276,11 +397,98 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.accounting.journal_entries.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/journal-entries/meta/post", method="GET", request_options=request_options
+ "accounting/v1/journal-entries/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.journal_entries.remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/journal-entries/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -301,6 +509,8 @@ async def list(
expand: typing.Optional[JournalEntriesListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -330,11 +540,17 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -363,13 +579,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.journal_entries.list()
+
+
+ async def main() -> None:
+ await client.accounting.journal_entries.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/journal-entries",
@@ -382,6 +606,8 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -395,9 +621,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedJournalEntryList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedJournalEntryList,
+ parse_obj_as(
+ type_=PaginatedJournalEntryList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -434,28 +666,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import JournalEntryRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.journal_entries.create(
- model=JournalEntryRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.journal_entries.create(
+ model=JournalEntryRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/journal-entries",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(JournalEntryResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ JournalEntryResponse,
+ parse_obj_as(
+ type_=JournalEntryResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -467,6 +718,7 @@ async def retrieve(
*,
expand: typing.Optional[JournalEntriesRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> JournalEntry:
"""
@@ -482,6 +734,9 @@ async def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -492,25 +747,130 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.journal_entries.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.journal_entries.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/journal-entries/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(JournalEntry, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ JournalEntry,
+ parse_obj_as(
+ type_=JournalEntry, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def lines_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.journal_entries.lines_remote_field_classes_list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/journal-entries/lines/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -532,20 +892,123 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.journal_entries.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.journal_entries.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/journal-entries/meta/post", method="GET", request_options=request_options
+ "accounting/v1/journal-entries/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.journal_entries.remote_field_classes_list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/journal-entries/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/journal_entries/types/journal_entries_list_request_expand.py b/src/merge/resources/accounting/resources/journal_entries/types/journal_entries_list_request_expand.py
index d5a47081..0fc82000 100644
--- a/src/merge/resources/accounting/resources/journal_entries/types/journal_entries_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/journal_entries/types/journal_entries_list_request_expand.py
@@ -1,294 +1,72 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JournalEntriesListRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- APPLIED_PAYMENTS = "applied_payments"
- APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "applied_payments,accounting_period"
- APPLIED_PAYMENTS_COMPANY = "applied_payments,company"
- APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,company,accounting_period"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES = "applied_payments,tracking_categories"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "applied_payments,tracking_categories,accounting_period"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "applied_payments,tracking_categories,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,company,accounting_period"
- )
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- LINES = "lines"
- LINES_ACCOUNTING_PERIOD = "lines,accounting_period"
- LINES_APPLIED_PAYMENTS = "lines,applied_payments"
- LINES_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "lines,applied_payments,accounting_period"
- LINES_APPLIED_PAYMENTS_COMPANY = "lines,applied_payments,company"
- LINES_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "lines,applied_payments,company,accounting_period"
- LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "lines,applied_payments,tracking_categories"
- LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "lines,applied_payments,tracking_categories,accounting_period"
- )
- LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "lines,applied_payments,tracking_categories,company"
- LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "lines,applied_payments,tracking_categories,company,accounting_period"
- )
- LINES_COMPANY = "lines,company"
- LINES_COMPANY_ACCOUNTING_PERIOD = "lines,company,accounting_period"
- LINES_PAYMENTS = "lines,payments"
- LINES_PAYMENTS_ACCOUNTING_PERIOD = "lines,payments,accounting_period"
- LINES_PAYMENTS_APPLIED_PAYMENTS = "lines,payments,applied_payments"
- LINES_PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "lines,payments,applied_payments,accounting_period"
- LINES_PAYMENTS_APPLIED_PAYMENTS_COMPANY = "lines,payments,applied_payments,company"
- LINES_PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = (
- "lines,payments,applied_payments,company,accounting_period"
- )
- LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "lines,payments,applied_payments,tracking_categories"
- LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "lines,payments,applied_payments,tracking_categories,accounting_period"
- )
- LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = (
- "lines,payments,applied_payments,tracking_categories,company"
- )
- LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "lines,payments,applied_payments,tracking_categories,company,accounting_period"
- )
- LINES_PAYMENTS_COMPANY = "lines,payments,company"
- LINES_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "lines,payments,company,accounting_period"
- LINES_PAYMENTS_TRACKING_CATEGORIES = "lines,payments,tracking_categories"
- LINES_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "lines,payments,tracking_categories,accounting_period"
- LINES_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "lines,payments,tracking_categories,company"
- LINES_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "lines,payments,tracking_categories,company,accounting_period"
- )
- LINES_TRACKING_CATEGORIES = "lines,tracking_categories"
- LINES_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "lines,tracking_categories,accounting_period"
- LINES_TRACKING_CATEGORIES_COMPANY = "lines,tracking_categories,company"
- LINES_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "lines,tracking_categories,company,accounting_period"
- PAYMENTS = "payments"
- PAYMENTS_ACCOUNTING_PERIOD = "payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS = "payments,applied_payments"
- PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "payments,applied_payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY = "payments,applied_payments,company"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,applied_payments,company,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "payments,applied_payments,tracking_categories"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,applied_payments,tracking_categories,company"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,company,accounting_period"
- )
- PAYMENTS_COMPANY = "payments,company"
- PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,company,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES = "payments,tracking_categories"
- PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "payments,tracking_categories,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,tracking_categories,company"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "payments,tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- applied_payments: typing.Callable[[], T_Result],
- applied_payments_accounting_period: typing.Callable[[], T_Result],
- applied_payments_company: typing.Callable[[], T_Result],
- applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- lines: typing.Callable[[], T_Result],
- lines_accounting_period: typing.Callable[[], T_Result],
- lines_applied_payments: typing.Callable[[], T_Result],
- lines_applied_payments_accounting_period: typing.Callable[[], T_Result],
- lines_applied_payments_company: typing.Callable[[], T_Result],
- lines_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- lines_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- lines_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- lines_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- lines_company: typing.Callable[[], T_Result],
- lines_company_accounting_period: typing.Callable[[], T_Result],
- lines_payments: typing.Callable[[], T_Result],
- lines_payments_accounting_period: typing.Callable[[], T_Result],
- lines_payments_applied_payments: typing.Callable[[], T_Result],
- lines_payments_applied_payments_accounting_period: typing.Callable[[], T_Result],
- lines_payments_applied_payments_company: typing.Callable[[], T_Result],
- lines_payments_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- lines_payments_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- lines_payments_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_payments_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- lines_payments_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- lines_payments_company: typing.Callable[[], T_Result],
- lines_payments_company_accounting_period: typing.Callable[[], T_Result],
- lines_payments_tracking_categories: typing.Callable[[], T_Result],
- lines_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_payments_tracking_categories_company: typing.Callable[[], T_Result],
- lines_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories: typing.Callable[[], T_Result],
- lines_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories_company: typing.Callable[[], T_Result],
- lines_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments: typing.Callable[[], T_Result],
- payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments: typing.Callable[[], T_Result],
- payments_applied_payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_company: typing.Callable[[], T_Result],
- payments_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_company: typing.Callable[[], T_Result],
- payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories: typing.Callable[[], T_Result],
- payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JournalEntriesListRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is JournalEntriesListRequestExpand.APPLIED_PAYMENTS:
- return applied_payments()
- if self is JournalEntriesListRequestExpand.APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return applied_payments_accounting_period()
- if self is JournalEntriesListRequestExpand.APPLIED_PAYMENTS_COMPANY:
- return applied_payments_company()
- if self is JournalEntriesListRequestExpand.APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_company_accounting_period()
- if self is JournalEntriesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return applied_payments_tracking_categories()
- if self is JournalEntriesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_accounting_period()
- if self is JournalEntriesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_tracking_categories_company()
- if self is JournalEntriesListRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesListRequestExpand.COMPANY:
- return company()
- if self is JournalEntriesListRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES:
- return lines()
- if self is JournalEntriesListRequestExpand.LINES_ACCOUNTING_PERIOD:
- return lines_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_APPLIED_PAYMENTS:
- return lines_applied_payments()
- if self is JournalEntriesListRequestExpand.LINES_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return lines_applied_payments_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_APPLIED_PAYMENTS_COMPANY:
- return lines_applied_payments_company()
- if self is JournalEntriesListRequestExpand.LINES_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return lines_applied_payments_company_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return lines_applied_payments_tracking_categories()
- if self is JournalEntriesListRequestExpand.LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return lines_applied_payments_tracking_categories_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return lines_applied_payments_tracking_categories_company()
- if self is JournalEntriesListRequestExpand.LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return lines_applied_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_COMPANY:
- return lines_company()
- if self is JournalEntriesListRequestExpand.LINES_COMPANY_ACCOUNTING_PERIOD:
- return lines_company_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS:
- return lines_payments()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_ACCOUNTING_PERIOD:
- return lines_payments_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS:
- return lines_payments_applied_payments()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return lines_payments_applied_payments_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_COMPANY:
- return lines_payments_applied_payments_company()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return lines_payments_applied_payments_company_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return lines_payments_applied_payments_tracking_categories()
- if (
- self
- is JournalEntriesListRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD
- ):
- return lines_payments_applied_payments_tracking_categories_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return lines_payments_applied_payments_tracking_categories_company()
- if (
- self
- is JournalEntriesListRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return lines_payments_applied_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_COMPANY:
- return lines_payments_company()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return lines_payments_company_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_TRACKING_CATEGORIES:
- return lines_payments_tracking_categories()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return lines_payments_tracking_categories_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return lines_payments_tracking_categories_company()
- if self is JournalEntriesListRequestExpand.LINES_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return lines_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_TRACKING_CATEGORIES:
- return lines_tracking_categories()
- if self is JournalEntriesListRequestExpand.LINES_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return lines_tracking_categories_accounting_period()
- if self is JournalEntriesListRequestExpand.LINES_TRACKING_CATEGORIES_COMPANY:
- return lines_tracking_categories_company()
- if self is JournalEntriesListRequestExpand.LINES_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return lines_tracking_categories_company_accounting_period()
- if self is JournalEntriesListRequestExpand.PAYMENTS:
- return payments()
- if self is JournalEntriesListRequestExpand.PAYMENTS_ACCOUNTING_PERIOD:
- return payments_accounting_period()
- if self is JournalEntriesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS:
- return payments_applied_payments()
- if self is JournalEntriesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return payments_applied_payments_accounting_period()
- if self is JournalEntriesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY:
- return payments_applied_payments_company()
- if self is JournalEntriesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_company_accounting_period()
- if self is JournalEntriesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return payments_applied_payments_tracking_categories()
- if self is JournalEntriesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_accounting_period()
- if self is JournalEntriesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_tracking_categories_company()
- if (
- self
- is JournalEntriesListRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesListRequestExpand.PAYMENTS_COMPANY:
- return payments_company()
- if self is JournalEntriesListRequestExpand.PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_company_accounting_period()
- if self is JournalEntriesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES:
- return payments_tracking_categories()
- if self is JournalEntriesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_tracking_categories_accounting_period()
- if self is JournalEntriesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_tracking_categories_company()
- if self is JournalEntriesListRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesListRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is JournalEntriesListRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is JournalEntriesListRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is JournalEntriesListRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
+JournalEntriesListRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "applied_payments",
+ "applied_payments,accounting_period",
+ "applied_payments,company",
+ "applied_payments,company,accounting_period",
+ "applied_payments,tracking_categories",
+ "applied_payments,tracking_categories,accounting_period",
+ "applied_payments,tracking_categories,company",
+ "applied_payments,tracking_categories,company,accounting_period",
+ "company",
+ "company,accounting_period",
+ "lines",
+ "lines,accounting_period",
+ "lines,applied_payments",
+ "lines,applied_payments,accounting_period",
+ "lines,applied_payments,company",
+ "lines,applied_payments,company,accounting_period",
+ "lines,applied_payments,tracking_categories",
+ "lines,applied_payments,tracking_categories,accounting_period",
+ "lines,applied_payments,tracking_categories,company",
+ "lines,applied_payments,tracking_categories,company,accounting_period",
+ "lines,company",
+ "lines,company,accounting_period",
+ "lines,payments",
+ "lines,payments,accounting_period",
+ "lines,payments,applied_payments",
+ "lines,payments,applied_payments,accounting_period",
+ "lines,payments,applied_payments,company",
+ "lines,payments,applied_payments,company,accounting_period",
+ "lines,payments,applied_payments,tracking_categories",
+ "lines,payments,applied_payments,tracking_categories,accounting_period",
+ "lines,payments,applied_payments,tracking_categories,company",
+ "lines,payments,applied_payments,tracking_categories,company,accounting_period",
+ "lines,payments,company",
+ "lines,payments,company,accounting_period",
+ "lines,payments,tracking_categories",
+ "lines,payments,tracking_categories,accounting_period",
+ "lines,payments,tracking_categories,company",
+ "lines,payments,tracking_categories,company,accounting_period",
+ "lines,tracking_categories",
+ "lines,tracking_categories,accounting_period",
+ "lines,tracking_categories,company",
+ "lines,tracking_categories,company,accounting_period",
+ "payments",
+ "payments,accounting_period",
+ "payments,applied_payments",
+ "payments,applied_payments,accounting_period",
+ "payments,applied_payments,company",
+ "payments,applied_payments,company,accounting_period",
+ "payments,applied_payments,tracking_categories",
+ "payments,applied_payments,tracking_categories,accounting_period",
+ "payments,applied_payments,tracking_categories,company",
+ "payments,applied_payments,tracking_categories,company,accounting_period",
+ "payments,company",
+ "payments,company,accounting_period",
+ "payments,tracking_categories",
+ "payments,tracking_categories,accounting_period",
+ "payments,tracking_categories,company",
+ "payments,tracking_categories,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/journal_entries/types/journal_entries_retrieve_request_expand.py b/src/merge/resources/accounting/resources/journal_entries/types/journal_entries_retrieve_request_expand.py
index bdac2481..ef2a3838 100644
--- a/src/merge/resources/accounting/resources/journal_entries/types/journal_entries_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/journal_entries/types/journal_entries_retrieve_request_expand.py
@@ -1,297 +1,72 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JournalEntriesRetrieveRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- APPLIED_PAYMENTS = "applied_payments"
- APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "applied_payments,accounting_period"
- APPLIED_PAYMENTS_COMPANY = "applied_payments,company"
- APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "applied_payments,company,accounting_period"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES = "applied_payments,tracking_categories"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "applied_payments,tracking_categories,accounting_period"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "applied_payments,tracking_categories,company"
- APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "applied_payments,tracking_categories,company,accounting_period"
- )
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- LINES = "lines"
- LINES_ACCOUNTING_PERIOD = "lines,accounting_period"
- LINES_APPLIED_PAYMENTS = "lines,applied_payments"
- LINES_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "lines,applied_payments,accounting_period"
- LINES_APPLIED_PAYMENTS_COMPANY = "lines,applied_payments,company"
- LINES_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "lines,applied_payments,company,accounting_period"
- LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "lines,applied_payments,tracking_categories"
- LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "lines,applied_payments,tracking_categories,accounting_period"
- )
- LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "lines,applied_payments,tracking_categories,company"
- LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "lines,applied_payments,tracking_categories,company,accounting_period"
- )
- LINES_COMPANY = "lines,company"
- LINES_COMPANY_ACCOUNTING_PERIOD = "lines,company,accounting_period"
- LINES_PAYMENTS = "lines,payments"
- LINES_PAYMENTS_ACCOUNTING_PERIOD = "lines,payments,accounting_period"
- LINES_PAYMENTS_APPLIED_PAYMENTS = "lines,payments,applied_payments"
- LINES_PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "lines,payments,applied_payments,accounting_period"
- LINES_PAYMENTS_APPLIED_PAYMENTS_COMPANY = "lines,payments,applied_payments,company"
- LINES_PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = (
- "lines,payments,applied_payments,company,accounting_period"
- )
- LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "lines,payments,applied_payments,tracking_categories"
- LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "lines,payments,applied_payments,tracking_categories,accounting_period"
- )
- LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = (
- "lines,payments,applied_payments,tracking_categories,company"
- )
- LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "lines,payments,applied_payments,tracking_categories,company,accounting_period"
- )
- LINES_PAYMENTS_COMPANY = "lines,payments,company"
- LINES_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "lines,payments,company,accounting_period"
- LINES_PAYMENTS_TRACKING_CATEGORIES = "lines,payments,tracking_categories"
- LINES_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "lines,payments,tracking_categories,accounting_period"
- LINES_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "lines,payments,tracking_categories,company"
- LINES_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "lines,payments,tracking_categories,company,accounting_period"
- )
- LINES_TRACKING_CATEGORIES = "lines,tracking_categories"
- LINES_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "lines,tracking_categories,accounting_period"
- LINES_TRACKING_CATEGORIES_COMPANY = "lines,tracking_categories,company"
- LINES_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "lines,tracking_categories,company,accounting_period"
- PAYMENTS = "payments"
- PAYMENTS_ACCOUNTING_PERIOD = "payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS = "payments,applied_payments"
- PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD = "payments,applied_payments,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY = "payments,applied_payments,company"
- PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,applied_payments,company,accounting_period"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES = "payments,applied_payments,tracking_categories"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,accounting_period"
- )
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,applied_payments,tracking_categories,company"
- PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "payments,applied_payments,tracking_categories,company,accounting_period"
- )
- PAYMENTS_COMPANY = "payments,company"
- PAYMENTS_COMPANY_ACCOUNTING_PERIOD = "payments,company,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES = "payments,tracking_categories"
- PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "payments,tracking_categories,accounting_period"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY = "payments,tracking_categories,company"
- PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "payments,tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- applied_payments: typing.Callable[[], T_Result],
- applied_payments_accounting_period: typing.Callable[[], T_Result],
- applied_payments_company: typing.Callable[[], T_Result],
- applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- lines: typing.Callable[[], T_Result],
- lines_accounting_period: typing.Callable[[], T_Result],
- lines_applied_payments: typing.Callable[[], T_Result],
- lines_applied_payments_accounting_period: typing.Callable[[], T_Result],
- lines_applied_payments_company: typing.Callable[[], T_Result],
- lines_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- lines_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- lines_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- lines_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- lines_company: typing.Callable[[], T_Result],
- lines_company_accounting_period: typing.Callable[[], T_Result],
- lines_payments: typing.Callable[[], T_Result],
- lines_payments_accounting_period: typing.Callable[[], T_Result],
- lines_payments_applied_payments: typing.Callable[[], T_Result],
- lines_payments_applied_payments_accounting_period: typing.Callable[[], T_Result],
- lines_payments_applied_payments_company: typing.Callable[[], T_Result],
- lines_payments_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- lines_payments_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- lines_payments_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_payments_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- lines_payments_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- lines_payments_company: typing.Callable[[], T_Result],
- lines_payments_company_accounting_period: typing.Callable[[], T_Result],
- lines_payments_tracking_categories: typing.Callable[[], T_Result],
- lines_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_payments_tracking_categories_company: typing.Callable[[], T_Result],
- lines_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories: typing.Callable[[], T_Result],
- lines_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories_company: typing.Callable[[], T_Result],
- lines_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments: typing.Callable[[], T_Result],
- payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments: typing.Callable[[], T_Result],
- payments_applied_payments_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_company: typing.Callable[[], T_Result],
- payments_applied_payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_applied_payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- payments_company: typing.Callable[[], T_Result],
- payments_company_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories: typing.Callable[[], T_Result],
- payments_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- payments_tracking_categories_company: typing.Callable[[], T_Result],
- payments_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JournalEntriesRetrieveRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.APPLIED_PAYMENTS:
- return applied_payments()
- if self is JournalEntriesRetrieveRequestExpand.APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return applied_payments_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.APPLIED_PAYMENTS_COMPANY:
- return applied_payments_company()
- if self is JournalEntriesRetrieveRequestExpand.APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return applied_payments_tracking_categories()
- if self is JournalEntriesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return applied_payments_tracking_categories_company()
- if self is JournalEntriesRetrieveRequestExpand.APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return applied_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.COMPANY:
- return company()
- if self is JournalEntriesRetrieveRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES:
- return lines()
- if self is JournalEntriesRetrieveRequestExpand.LINES_ACCOUNTING_PERIOD:
- return lines_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_APPLIED_PAYMENTS:
- return lines_applied_payments()
- if self is JournalEntriesRetrieveRequestExpand.LINES_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return lines_applied_payments_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_APPLIED_PAYMENTS_COMPANY:
- return lines_applied_payments_company()
- if self is JournalEntriesRetrieveRequestExpand.LINES_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return lines_applied_payments_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return lines_applied_payments_tracking_categories()
- if self is JournalEntriesRetrieveRequestExpand.LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return lines_applied_payments_tracking_categories_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return lines_applied_payments_tracking_categories_company()
- if (
- self
- is JournalEntriesRetrieveRequestExpand.LINES_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return lines_applied_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_COMPANY:
- return lines_company()
- if self is JournalEntriesRetrieveRequestExpand.LINES_COMPANY_ACCOUNTING_PERIOD:
- return lines_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS:
- return lines_payments()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_ACCOUNTING_PERIOD:
- return lines_payments_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS:
- return lines_payments_applied_payments()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return lines_payments_applied_payments_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_COMPANY:
- return lines_payments_applied_payments_company()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return lines_payments_applied_payments_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return lines_payments_applied_payments_tracking_categories()
- if (
- self
- is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD
- ):
- return lines_payments_applied_payments_tracking_categories_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return lines_payments_applied_payments_tracking_categories_company()
- if (
- self
- is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return lines_payments_applied_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_COMPANY:
- return lines_payments_company()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return lines_payments_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_TRACKING_CATEGORIES:
- return lines_payments_tracking_categories()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return lines_payments_tracking_categories_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return lines_payments_tracking_categories_company()
- if self is JournalEntriesRetrieveRequestExpand.LINES_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return lines_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_TRACKING_CATEGORIES:
- return lines_tracking_categories()
- if self is JournalEntriesRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return lines_tracking_categories_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_COMPANY:
- return lines_tracking_categories_company()
- if self is JournalEntriesRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return lines_tracking_categories_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS:
- return payments()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_ACCOUNTING_PERIOD:
- return payments_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS:
- return payments_applied_payments()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_ACCOUNTING_PERIOD:
- return payments_applied_payments_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY:
- return payments_applied_payments_company()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_applied_payments_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES:
- return payments_applied_payments_tracking_categories()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_applied_payments_tracking_categories_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_applied_payments_tracking_categories_company()
- if (
- self
- is JournalEntriesRetrieveRequestExpand.PAYMENTS_APPLIED_PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD
- ):
- return payments_applied_payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_COMPANY:
- return payments_company()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_COMPANY_ACCOUNTING_PERIOD:
- return payments_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES:
- return payments_tracking_categories()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return payments_tracking_categories_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY:
- return payments_tracking_categories_company()
- if self is JournalEntriesRetrieveRequestExpand.PAYMENTS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return payments_tracking_categories_company_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is JournalEntriesRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is JournalEntriesRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is JournalEntriesRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
+JournalEntriesRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "applied_payments",
+ "applied_payments,accounting_period",
+ "applied_payments,company",
+ "applied_payments,company,accounting_period",
+ "applied_payments,tracking_categories",
+ "applied_payments,tracking_categories,accounting_period",
+ "applied_payments,tracking_categories,company",
+ "applied_payments,tracking_categories,company,accounting_period",
+ "company",
+ "company,accounting_period",
+ "lines",
+ "lines,accounting_period",
+ "lines,applied_payments",
+ "lines,applied_payments,accounting_period",
+ "lines,applied_payments,company",
+ "lines,applied_payments,company,accounting_period",
+ "lines,applied_payments,tracking_categories",
+ "lines,applied_payments,tracking_categories,accounting_period",
+ "lines,applied_payments,tracking_categories,company",
+ "lines,applied_payments,tracking_categories,company,accounting_period",
+ "lines,company",
+ "lines,company,accounting_period",
+ "lines,payments",
+ "lines,payments,accounting_period",
+ "lines,payments,applied_payments",
+ "lines,payments,applied_payments,accounting_period",
+ "lines,payments,applied_payments,company",
+ "lines,payments,applied_payments,company,accounting_period",
+ "lines,payments,applied_payments,tracking_categories",
+ "lines,payments,applied_payments,tracking_categories,accounting_period",
+ "lines,payments,applied_payments,tracking_categories,company",
+ "lines,payments,applied_payments,tracking_categories,company,accounting_period",
+ "lines,payments,company",
+ "lines,payments,company,accounting_period",
+ "lines,payments,tracking_categories",
+ "lines,payments,tracking_categories,accounting_period",
+ "lines,payments,tracking_categories,company",
+ "lines,payments,tracking_categories,company,accounting_period",
+ "lines,tracking_categories",
+ "lines,tracking_categories,accounting_period",
+ "lines,tracking_categories,company",
+ "lines,tracking_categories,company,accounting_period",
+ "payments",
+ "payments,accounting_period",
+ "payments,applied_payments",
+ "payments,applied_payments,accounting_period",
+ "payments,applied_payments,company",
+ "payments,applied_payments,company,accounting_period",
+ "payments,applied_payments,tracking_categories",
+ "payments,applied_payments,tracking_categories,accounting_period",
+ "payments,applied_payments,tracking_categories,company",
+ "payments,applied_payments,tracking_categories,company,accounting_period",
+ "payments,company",
+ "payments,company,accounting_period",
+ "payments,tracking_categories",
+ "payments,tracking_categories,accounting_period",
+ "payments,tracking_categories,company",
+ "payments,tracking_categories,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/link_token/client.py b/src/merge/resources/accounting/resources/link_token/client.py
index 9c69fca1..5b1a6c64 100644
--- a/src/merge/resources/accounting/resources/link_token/client.py
+++ b/src/merge/resources/accounting/resources/link_token/client.py
@@ -1,16 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.categories_enum import CategoriesEnum
from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from ...types.language_enum import LanguageEnum
+from .....core.request_options import RequestOptions
from ...types.link_token import LinkToken
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -30,13 +31,14 @@ def create(
integration: typing.Optional[str] = OMIT,
link_expiry_mins: typing.Optional[int] = OMIT,
should_create_magic_link_url: typing.Optional[bool] = OMIT,
+ hide_admin_magic_link: typing.Optional[bool] = OMIT,
common_models: typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] = OMIT,
category_common_model_scopes: typing.Optional[
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
- language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ language: typing.Optional[LanguageEnum] = OMIT,
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -64,16 +66,22 @@ def create(
should_create_magic_link_url : typing.Optional[bool]
Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+ hide_admin_magic_link : typing.Optional[bool]
+ Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
common_models : typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]
An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
category_common_model_scopes : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]]
When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
- language : typing.Optional[str]
- The language code for the language to localize Merge Link to.
+ language : typing.Optional[LanguageEnum]
+ The following subset of IETF language tags can be used to configure localization.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ * `en` - en
+ * `de` - de
+
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -86,8 +94,7 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.accounting import CategoriesEnum
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -97,7 +104,7 @@ def create(
end_user_email_address="example@gmail.com",
end_user_organization_name="Test Organization",
end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
+ categories=["hris", "ats"],
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -111,6 +118,7 @@ def create(
"integration": integration,
"link_expiry_mins": link_expiry_mins,
"should_create_magic_link_url": should_create_magic_link_url,
+ "hide_admin_magic_link": hide_admin_magic_link,
"common_models": common_models,
"category_common_model_scopes": category_common_model_scopes,
"language": language,
@@ -119,9 +127,15 @@ def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -142,13 +156,14 @@ async def create(
integration: typing.Optional[str] = OMIT,
link_expiry_mins: typing.Optional[int] = OMIT,
should_create_magic_link_url: typing.Optional[bool] = OMIT,
+ hide_admin_magic_link: typing.Optional[bool] = OMIT,
common_models: typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]] = OMIT,
category_common_model_scopes: typing.Optional[
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
- language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ language: typing.Optional[LanguageEnum] = OMIT,
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -176,16 +191,22 @@ async def create(
should_create_magic_link_url : typing.Optional[bool]
Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+ hide_admin_magic_link : typing.Optional[bool]
+ Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
+
common_models : typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]
An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
category_common_model_scopes : typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]]
When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
- language : typing.Optional[str]
- The language code for the language to localize Merge Link to.
+ language : typing.Optional[LanguageEnum]
+ The following subset of IETF language tags can be used to configure localization.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ * `en` - en
+ * `de` - de
+
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -198,19 +219,26 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.accounting import CategoriesEnum
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.link_token.create(
- end_user_email_address="example@gmail.com",
- end_user_organization_name="Test Organization",
- end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
- )
+
+
+ async def main() -> None:
+ await client.accounting.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/link-token",
@@ -223,6 +251,7 @@ async def create(
"integration": integration,
"link_expiry_mins": link_expiry_mins,
"should_create_magic_link_url": should_create_magic_link_url,
+ "hide_admin_magic_link": hide_admin_magic_link,
"common_models": common_models,
"category_common_model_scopes": category_common_model_scopes,
"language": language,
@@ -231,9 +260,15 @@ async def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/linked_accounts/client.py b/src/merge/resources/accounting/resources/linked_accounts/client.py
index 131507fd..6902a239 100644
--- a/src/merge/resources/accounting/resources/linked_accounts/client.py
+++ b/src/merge/resources/accounting/resources/linked_accounts/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
from .....core.request_options import RequestOptions
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
-from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class LinkedAccountsClient:
@@ -31,7 +31,7 @@ def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -82,7 +82,7 @@ def list(
Number of results to return per page.
status : typing.Optional[str]
- Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`
+ Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -122,9 +122,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -151,7 +157,7 @@ async def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -202,7 +208,7 @@ async def list(
Number of results to return per page.
status : typing.Optional[str]
- Filter by status. Options: `COMPLETE`, `INCOMPLETE`, `RELINK_NEEDED`
+ Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -214,13 +220,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.linked_accounts.list()
+
+
+ async def main() -> None:
+ await client.accounting.linked_accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/linked-accounts",
@@ -242,9 +256,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/linked_accounts/types/linked_accounts_list_request_category.py b/src/merge/resources/accounting/resources/linked_accounts/types/linked_accounts_list_request_category.py
index bd873ea8..531279d5 100644
--- a/src/merge/resources/accounting/resources/linked_accounts/types/linked_accounts_list_request_category.py
+++ b/src/merge/resources/accounting/resources/linked_accounts/types/linked_accounts_list_request_category.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LinkedAccountsListRequestCategory(str, enum.Enum):
- ACCOUNTING = "accounting"
- ATS = "ats"
- CRM = "crm"
- FILESTORAGE = "filestorage"
- HRIS = "hris"
- MKTG = "mktg"
- TICKETING = "ticketing"
-
- def visit(
- self,
- accounting: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- hris: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is LinkedAccountsListRequestCategory.ACCOUNTING:
- return accounting()
- if self is LinkedAccountsListRequestCategory.ATS:
- return ats()
- if self is LinkedAccountsListRequestCategory.CRM:
- return crm()
- if self is LinkedAccountsListRequestCategory.FILESTORAGE:
- return filestorage()
- if self is LinkedAccountsListRequestCategory.HRIS:
- return hris()
- if self is LinkedAccountsListRequestCategory.MKTG:
- return mktg()
- if self is LinkedAccountsListRequestCategory.TICKETING:
- return ticketing()
+LinkedAccountsListRequestCategory = typing.Union[
+ typing.Literal["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"], typing.Any
+]
diff --git a/src/merge/resources/accounting/resources/passthrough/client.py b/src/merge/resources/accounting/resources/passthrough/client.py
index a9fe343d..73efe7e7 100644
--- a/src/merge/resources/accounting/resources/passthrough/client.py
+++ b/src/merge/resources/accounting/resources/passthrough/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.request_options import RequestOptions
from ...types.remote_response import RemoteResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -38,8 +38,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.accounting import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.accounting import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,17 +47,27 @@ def create(
)
client.accounting.passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "accounting/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -88,26 +98,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.accounting import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.accounting import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.accounting.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "accounting/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/payments/client.py b/src/merge/resources/accounting/resources/payments/client.py
index d6b66e83..b766d612 100644
--- a/src/merge/resources/accounting/resources/payments/client.py
+++ b/src/merge/resources/accounting/resources/payments/client.py
@@ -1,23 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.payments_list_request_expand import PaymentsListRequestExpand
from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
from ...types.paginated_payment_list import PaginatedPaymentList
-from ...types.patched_payment_request import PatchedPaymentRequest
-from ...types.payment import Payment
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.payment_request import PaymentRequest
from ...types.payment_response import PaymentResponse
-from .types.payments_list_request_expand import PaymentsListRequestExpand
from .types.payments_retrieve_request_expand import PaymentsRetrieveRequestExpand
+from ...types.payment import Payment
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.patched_payment_request import PatchedPaymentRequest
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -39,6 +40,8 @@ def list(
expand: typing.Optional[PaymentsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -74,11 +77,17 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -107,7 +116,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -128,6 +137,8 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -141,9 +152,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedPaymentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedPaymentList,
+ parse_obj_as(
+ type_=PaginatedPaymentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -180,7 +197,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import PaymentRequest
client = Merge(
@@ -194,14 +211,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/payments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaymentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaymentResponse,
+ parse_obj_as(
+ type_=PaymentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -213,6 +241,7 @@ def retrieve(
*,
expand: typing.Optional[PaymentsRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> Payment:
"""
@@ -228,6 +257,9 @@ def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -238,7 +270,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -251,12 +283,22 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/payments/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Payment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Payment,
+ parse_obj_as(
+ type_=Payment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -296,7 +338,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import PatchedPaymentRequest
client = Merge(
@@ -311,14 +353,104 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/payments/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaymentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaymentResponse,
+ parse_obj_as(
+ type_=PaymentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def line_items_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.payments.line_items_remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/payments/line-items/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -342,7 +474,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -353,11 +485,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"accounting/v1/payments/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"accounting/v1/payments/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -379,7 +519,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -388,11 +528,98 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.accounting.payments.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/payments/meta/post", method="GET", request_options=request_options
+ "accounting/v1/payments/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.payments.remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/payments/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -415,6 +642,8 @@ async def list(
expand: typing.Optional[PaymentsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -450,11 +679,17 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -483,13 +718,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.payments.list()
+
+
+ async def main() -> None:
+ await client.accounting.payments.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/payments",
@@ -504,6 +747,8 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -517,9 +762,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedPaymentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedPaymentList,
+ parse_obj_as(
+ type_=PaginatedPaymentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -556,28 +807,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import PaymentRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.payments.create(
- model=PaymentRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.payments.create(
+ model=PaymentRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/payments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaymentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaymentResponse,
+ parse_obj_as(
+ type_=PaymentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -589,6 +859,7 @@ async def retrieve(
*,
expand: typing.Optional[PaymentsRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> Payment:
"""
@@ -604,6 +875,9 @@ async def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -614,25 +888,43 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.payments.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.payments.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/payments/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Payment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Payment,
+ parse_obj_as(
+ type_=Payment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -672,29 +964,135 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import PatchedPaymentRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.payments.partial_update(
- id="id",
- model=PatchedPaymentRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.payments.partial_update(
+ id="id",
+ model=PatchedPaymentRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/payments/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaymentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaymentResponse,
+ parse_obj_as(
+ type_=PaymentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def line_items_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.payments.line_items_remote_field_classes_list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/payments/line-items/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -720,22 +1118,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.payments.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.payments.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"accounting/v1/payments/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"accounting/v1/payments/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -757,20 +1171,123 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.payments.meta_post_retrieve()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/payments/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.payments.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.payments.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/payments/meta/post", method="GET", request_options=request_options
+ "accounting/v1/payments/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/payments/types/payments_list_request_expand.py b/src/merge/resources/accounting/resources/payments/types/payments_list_request_expand.py
index 712c48ce..6d437c55 100644
--- a/src/merge/resources/accounting/resources/payments/types/payments_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/payments/types/payments_list_request_expand.py
@@ -1,288 +1,72 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PaymentsListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_ACCOUNTING_PERIOD = "account,accounting_period"
- ACCOUNT_COMPANY = "account,company"
- ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "account,company,accounting_period"
- ACCOUNTING_PERIOD = "accounting_period"
- APPLIED_TO_LINES = "applied_to_lines"
- APPLIED_TO_LINES_ACCOUNT = "applied_to_lines,account"
- APPLIED_TO_LINES_ACCOUNT_ACCOUNTING_PERIOD = "applied_to_lines,account,accounting_period"
- APPLIED_TO_LINES_ACCOUNT_COMPANY = "applied_to_lines,account,company"
- APPLIED_TO_LINES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "applied_to_lines,account,company,accounting_period"
- APPLIED_TO_LINES_ACCOUNTING_PERIOD = "applied_to_lines,accounting_period"
- APPLIED_TO_LINES_COMPANY = "applied_to_lines,company"
- APPLIED_TO_LINES_COMPANY_ACCOUNTING_PERIOD = "applied_to_lines,company,accounting_period"
- APPLIED_TO_LINES_CONTACT = "applied_to_lines,contact"
- APPLIED_TO_LINES_CONTACT_ACCOUNT = "applied_to_lines,contact,account"
- APPLIED_TO_LINES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "applied_to_lines,contact,account,accounting_period"
- APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY = "applied_to_lines,contact,account,company"
- APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_to_lines,contact,account,company,accounting_period"
- )
- APPLIED_TO_LINES_CONTACT_ACCOUNTING_PERIOD = "applied_to_lines,contact,accounting_period"
- APPLIED_TO_LINES_CONTACT_COMPANY = "applied_to_lines,contact,company"
- APPLIED_TO_LINES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "applied_to_lines,contact,company,accounting_period"
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNT = "contact,account"
- CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "contact,account,accounting_period"
- CONTACT_ACCOUNT_COMPANY = "contact,account,company"
- CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "contact,account,company,accounting_period"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- CONTACT_COMPANY = "contact,company"
- CONTACT_COMPANY_ACCOUNTING_PERIOD = "contact,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNT = "tracking_categories,account"
- TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,account,accounting_period"
- TRACKING_CATEGORIES_ACCOUNT_COMPANY = "tracking_categories,account,company"
- TRACKING_CATEGORIES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,account,company,accounting_period"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_APPLIED_TO_LINES = "tracking_categories,applied_to_lines"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT = "tracking_categories,applied_to_lines,account"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,account,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_COMPANY = "tracking_categories,applied_to_lines,account,company"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,account,company,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNTING_PERIOD = "tracking_categories,applied_to_lines,accounting_period"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_COMPANY = "tracking_categories,applied_to_lines,company"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,company,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT = "tracking_categories,applied_to_lines,contact"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT = "tracking_categories,applied_to_lines,contact,account"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,contact,account,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY = (
- "tracking_categories,applied_to_lines,contact,account,company"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,contact,account,company,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,contact,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_COMPANY = "tracking_categories,applied_to_lines,contact,company"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,contact,company,accounting_period"
- )
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT = "tracking_categories,contact,account"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,contact,account,accounting_period"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT_COMPANY = "tracking_categories,contact,account,company"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,contact,account,company,accounting_period"
- )
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
- TRACKING_CATEGORIES_CONTACT_COMPANY = "tracking_categories,contact,company"
- TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,contact,company,accounting_period"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_accounting_period: typing.Callable[[], T_Result],
- account_company: typing.Callable[[], T_Result],
- account_company_accounting_period: typing.Callable[[], T_Result],
- accounting_period: typing.Callable[[], T_Result],
- applied_to_lines: typing.Callable[[], T_Result],
- applied_to_lines_account: typing.Callable[[], T_Result],
- applied_to_lines_account_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_account_company: typing.Callable[[], T_Result],
- applied_to_lines_account_company_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_company: typing.Callable[[], T_Result],
- applied_to_lines_company_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_contact: typing.Callable[[], T_Result],
- applied_to_lines_contact_account: typing.Callable[[], T_Result],
- applied_to_lines_contact_account_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_contact_account_company: typing.Callable[[], T_Result],
- applied_to_lines_contact_account_company_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_contact_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_contact_company: typing.Callable[[], T_Result],
- applied_to_lines_contact_company_accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_account: typing.Callable[[], T_Result],
- contact_account_accounting_period: typing.Callable[[], T_Result],
- contact_account_company: typing.Callable[[], T_Result],
- contact_account_company_accounting_period: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- contact_company: typing.Callable[[], T_Result],
- contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_account: typing.Callable[[], T_Result],
- tracking_categories_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_account_company: typing.Callable[[], T_Result],
- tracking_categories_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_account: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_account_company: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_company: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_account: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_account_company: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_company: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_account: typing.Callable[[], T_Result],
- tracking_categories_contact_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_account_company: typing.Callable[[], T_Result],
- tracking_categories_contact_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_company: typing.Callable[[], T_Result],
- tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PaymentsListRequestExpand.ACCOUNT:
- return account()
- if self is PaymentsListRequestExpand.ACCOUNT_ACCOUNTING_PERIOD:
- return account_accounting_period()
- if self is PaymentsListRequestExpand.ACCOUNT_COMPANY:
- return account_company()
- if self is PaymentsListRequestExpand.ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return account_company_accounting_period()
- if self is PaymentsListRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES:
- return applied_to_lines()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_ACCOUNT:
- return applied_to_lines_account()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_ACCOUNT_ACCOUNTING_PERIOD:
- return applied_to_lines_account_accounting_period()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_ACCOUNT_COMPANY:
- return applied_to_lines_account_company()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return applied_to_lines_account_company_accounting_period()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_ACCOUNTING_PERIOD:
- return applied_to_lines_accounting_period()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_COMPANY:
- return applied_to_lines_company()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_COMPANY_ACCOUNTING_PERIOD:
- return applied_to_lines_company_accounting_period()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_CONTACT:
- return applied_to_lines_contact()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNT:
- return applied_to_lines_contact_account()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return applied_to_lines_contact_account_accounting_period()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY:
- return applied_to_lines_contact_account_company()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return applied_to_lines_contact_account_company_accounting_period()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNTING_PERIOD:
- return applied_to_lines_contact_accounting_period()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_CONTACT_COMPANY:
- return applied_to_lines_contact_company()
- if self is PaymentsListRequestExpand.APPLIED_TO_LINES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_to_lines_contact_company_accounting_period()
- if self is PaymentsListRequestExpand.COMPANY:
- return company()
- if self is PaymentsListRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is PaymentsListRequestExpand.CONTACT:
- return contact()
- if self is PaymentsListRequestExpand.CONTACT_ACCOUNT:
- return contact_account()
- if self is PaymentsListRequestExpand.CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return contact_account_accounting_period()
- if self is PaymentsListRequestExpand.CONTACT_ACCOUNT_COMPANY:
- return contact_account_company()
- if self is PaymentsListRequestExpand.CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return contact_account_company_accounting_period()
- if self is PaymentsListRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is PaymentsListRequestExpand.CONTACT_COMPANY:
- return contact_company()
- if self is PaymentsListRequestExpand.CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return contact_company_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_ACCOUNT:
- return tracking_categories_account()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_account_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_COMPANY:
- return tracking_categories_account_company()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_account_company_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES:
- return tracking_categories_applied_to_lines()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT:
- return tracking_categories_applied_to_lines_account()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_account_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_COMPANY:
- return tracking_categories_applied_to_lines_account_company()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_account_company_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_COMPANY:
- return tracking_categories_applied_to_lines_company()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_company_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT:
- return tracking_categories_applied_to_lines_contact()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT:
- return tracking_categories_applied_to_lines_contact_account()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_contact_account_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY:
- return tracking_categories_applied_to_lines_contact_account_company()
- if (
- self
- is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD
- ):
- return tracking_categories_applied_to_lines_contact_account_company_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_contact_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_COMPANY:
- return tracking_categories_applied_to_lines_contact_company()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_contact_company_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT:
- return tracking_categories_contact_account()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_account_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT_COMPANY:
- return tracking_categories_contact_account_company()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_account_company_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY:
- return tracking_categories_contact_company()
- if self is PaymentsListRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_company_accounting_period()
+PaymentsListRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,accounting_period",
+ "account,company",
+ "account,company,accounting_period",
+ "accounting_period",
+ "applied_to_lines",
+ "applied_to_lines,account",
+ "applied_to_lines,account,accounting_period",
+ "applied_to_lines,account,company",
+ "applied_to_lines,account,company,accounting_period",
+ "applied_to_lines,accounting_period",
+ "applied_to_lines,company",
+ "applied_to_lines,company,accounting_period",
+ "applied_to_lines,contact",
+ "applied_to_lines,contact,account",
+ "applied_to_lines,contact,account,accounting_period",
+ "applied_to_lines,contact,account,company",
+ "applied_to_lines,contact,account,company,accounting_period",
+ "applied_to_lines,contact,accounting_period",
+ "applied_to_lines,contact,company",
+ "applied_to_lines,contact,company,accounting_period",
+ "company",
+ "company,accounting_period",
+ "contact",
+ "contact,account",
+ "contact,account,accounting_period",
+ "contact,account,company",
+ "contact,account,company,accounting_period",
+ "contact,accounting_period",
+ "contact,company",
+ "contact,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,account",
+ "tracking_categories,account,accounting_period",
+ "tracking_categories,account,company",
+ "tracking_categories,account,company,accounting_period",
+ "tracking_categories,accounting_period",
+ "tracking_categories,applied_to_lines",
+ "tracking_categories,applied_to_lines,account",
+ "tracking_categories,applied_to_lines,account,accounting_period",
+ "tracking_categories,applied_to_lines,account,company",
+ "tracking_categories,applied_to_lines,account,company,accounting_period",
+ "tracking_categories,applied_to_lines,accounting_period",
+ "tracking_categories,applied_to_lines,company",
+ "tracking_categories,applied_to_lines,company,accounting_period",
+ "tracking_categories,applied_to_lines,contact",
+ "tracking_categories,applied_to_lines,contact,account",
+ "tracking_categories,applied_to_lines,contact,account,accounting_period",
+ "tracking_categories,applied_to_lines,contact,account,company",
+ "tracking_categories,applied_to_lines,contact,account,company,accounting_period",
+ "tracking_categories,applied_to_lines,contact,accounting_period",
+ "tracking_categories,applied_to_lines,contact,company",
+ "tracking_categories,applied_to_lines,contact,company,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,account",
+ "tracking_categories,contact,account,accounting_period",
+ "tracking_categories,contact,account,company",
+ "tracking_categories,contact,account,company,accounting_period",
+ "tracking_categories,contact,accounting_period",
+ "tracking_categories,contact,company",
+ "tracking_categories,contact,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/payments/types/payments_retrieve_request_expand.py b/src/merge/resources/accounting/resources/payments/types/payments_retrieve_request_expand.py
index 088a44c8..01ea21db 100644
--- a/src/merge/resources/accounting/resources/payments/types/payments_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/payments/types/payments_retrieve_request_expand.py
@@ -1,288 +1,72 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PaymentsRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_ACCOUNTING_PERIOD = "account,accounting_period"
- ACCOUNT_COMPANY = "account,company"
- ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "account,company,accounting_period"
- ACCOUNTING_PERIOD = "accounting_period"
- APPLIED_TO_LINES = "applied_to_lines"
- APPLIED_TO_LINES_ACCOUNT = "applied_to_lines,account"
- APPLIED_TO_LINES_ACCOUNT_ACCOUNTING_PERIOD = "applied_to_lines,account,accounting_period"
- APPLIED_TO_LINES_ACCOUNT_COMPANY = "applied_to_lines,account,company"
- APPLIED_TO_LINES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "applied_to_lines,account,company,accounting_period"
- APPLIED_TO_LINES_ACCOUNTING_PERIOD = "applied_to_lines,accounting_period"
- APPLIED_TO_LINES_COMPANY = "applied_to_lines,company"
- APPLIED_TO_LINES_COMPANY_ACCOUNTING_PERIOD = "applied_to_lines,company,accounting_period"
- APPLIED_TO_LINES_CONTACT = "applied_to_lines,contact"
- APPLIED_TO_LINES_CONTACT_ACCOUNT = "applied_to_lines,contact,account"
- APPLIED_TO_LINES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "applied_to_lines,contact,account,accounting_period"
- APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY = "applied_to_lines,contact,account,company"
- APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = (
- "applied_to_lines,contact,account,company,accounting_period"
- )
- APPLIED_TO_LINES_CONTACT_ACCOUNTING_PERIOD = "applied_to_lines,contact,accounting_period"
- APPLIED_TO_LINES_CONTACT_COMPANY = "applied_to_lines,contact,company"
- APPLIED_TO_LINES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "applied_to_lines,contact,company,accounting_period"
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNT = "contact,account"
- CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "contact,account,accounting_period"
- CONTACT_ACCOUNT_COMPANY = "contact,account,company"
- CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "contact,account,company,accounting_period"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- CONTACT_COMPANY = "contact,company"
- CONTACT_COMPANY_ACCOUNTING_PERIOD = "contact,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNT = "tracking_categories,account"
- TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,account,accounting_period"
- TRACKING_CATEGORIES_ACCOUNT_COMPANY = "tracking_categories,account,company"
- TRACKING_CATEGORIES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,account,company,accounting_period"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_APPLIED_TO_LINES = "tracking_categories,applied_to_lines"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT = "tracking_categories,applied_to_lines,account"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,account,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_COMPANY = "tracking_categories,applied_to_lines,account,company"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,account,company,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNTING_PERIOD = "tracking_categories,applied_to_lines,accounting_period"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_COMPANY = "tracking_categories,applied_to_lines,company"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,company,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT = "tracking_categories,applied_to_lines,contact"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT = "tracking_categories,applied_to_lines,contact,account"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,contact,account,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY = (
- "tracking_categories,applied_to_lines,contact,account,company"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,contact,account,company,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,contact,accounting_period"
- )
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_COMPANY = "tracking_categories,applied_to_lines,contact,company"
- TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,applied_to_lines,contact,company,accounting_period"
- )
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT = "tracking_categories,contact,account"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,contact,account,accounting_period"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT_COMPANY = "tracking_categories,contact,account,company"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,contact,account,company,accounting_period"
- )
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
- TRACKING_CATEGORIES_CONTACT_COMPANY = "tracking_categories,contact,company"
- TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,contact,company,accounting_period"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_accounting_period: typing.Callable[[], T_Result],
- account_company: typing.Callable[[], T_Result],
- account_company_accounting_period: typing.Callable[[], T_Result],
- accounting_period: typing.Callable[[], T_Result],
- applied_to_lines: typing.Callable[[], T_Result],
- applied_to_lines_account: typing.Callable[[], T_Result],
- applied_to_lines_account_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_account_company: typing.Callable[[], T_Result],
- applied_to_lines_account_company_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_company: typing.Callable[[], T_Result],
- applied_to_lines_company_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_contact: typing.Callable[[], T_Result],
- applied_to_lines_contact_account: typing.Callable[[], T_Result],
- applied_to_lines_contact_account_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_contact_account_company: typing.Callable[[], T_Result],
- applied_to_lines_contact_account_company_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_contact_accounting_period: typing.Callable[[], T_Result],
- applied_to_lines_contact_company: typing.Callable[[], T_Result],
- applied_to_lines_contact_company_accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_account: typing.Callable[[], T_Result],
- contact_account_accounting_period: typing.Callable[[], T_Result],
- contact_account_company: typing.Callable[[], T_Result],
- contact_account_company_accounting_period: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- contact_company: typing.Callable[[], T_Result],
- contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_account: typing.Callable[[], T_Result],
- tracking_categories_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_account_company: typing.Callable[[], T_Result],
- tracking_categories_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_account: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_account_company: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_company: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_account: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_account_company: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_company: typing.Callable[[], T_Result],
- tracking_categories_applied_to_lines_contact_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_account: typing.Callable[[], T_Result],
- tracking_categories_contact_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_account_company: typing.Callable[[], T_Result],
- tracking_categories_contact_account_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_company: typing.Callable[[], T_Result],
- tracking_categories_contact_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PaymentsRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is PaymentsRetrieveRequestExpand.ACCOUNT_ACCOUNTING_PERIOD:
- return account_accounting_period()
- if self is PaymentsRetrieveRequestExpand.ACCOUNT_COMPANY:
- return account_company()
- if self is PaymentsRetrieveRequestExpand.ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return account_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES:
- return applied_to_lines()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_ACCOUNT:
- return applied_to_lines_account()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_ACCOUNT_ACCOUNTING_PERIOD:
- return applied_to_lines_account_accounting_period()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_ACCOUNT_COMPANY:
- return applied_to_lines_account_company()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return applied_to_lines_account_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_ACCOUNTING_PERIOD:
- return applied_to_lines_accounting_period()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_COMPANY:
- return applied_to_lines_company()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_COMPANY_ACCOUNTING_PERIOD:
- return applied_to_lines_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_CONTACT:
- return applied_to_lines_contact()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNT:
- return applied_to_lines_contact_account()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return applied_to_lines_contact_account_accounting_period()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY:
- return applied_to_lines_contact_account_company()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return applied_to_lines_contact_account_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_CONTACT_ACCOUNTING_PERIOD:
- return applied_to_lines_contact_accounting_period()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_CONTACT_COMPANY:
- return applied_to_lines_contact_company()
- if self is PaymentsRetrieveRequestExpand.APPLIED_TO_LINES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return applied_to_lines_contact_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.COMPANY:
- return company()
- if self is PaymentsRetrieveRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.CONTACT:
- return contact()
- if self is PaymentsRetrieveRequestExpand.CONTACT_ACCOUNT:
- return contact_account()
- if self is PaymentsRetrieveRequestExpand.CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return contact_account_accounting_period()
- if self is PaymentsRetrieveRequestExpand.CONTACT_ACCOUNT_COMPANY:
- return contact_account_company()
- if self is PaymentsRetrieveRequestExpand.CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return contact_account_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is PaymentsRetrieveRequestExpand.CONTACT_COMPANY:
- return contact_company()
- if self is PaymentsRetrieveRequestExpand.CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return contact_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT:
- return tracking_categories_account()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_account_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_COMPANY:
- return tracking_categories_account_company()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_account_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES:
- return tracking_categories_applied_to_lines()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT:
- return tracking_categories_applied_to_lines_account()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_account_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_COMPANY:
- return tracking_categories_applied_to_lines_account_company()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_account_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_COMPANY:
- return tracking_categories_applied_to_lines_company()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT:
- return tracking_categories_applied_to_lines_contact()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT:
- return tracking_categories_applied_to_lines_contact_account()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_contact_account_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY:
- return tracking_categories_applied_to_lines_contact_account_company()
- if (
- self
- is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD
- ):
- return tracking_categories_applied_to_lines_contact_account_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_contact_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_COMPANY:
- return tracking_categories_applied_to_lines_contact_company()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_APPLIED_TO_LINES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_applied_to_lines_contact_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT:
- return tracking_categories_contact_account()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_account_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT_COMPANY:
- return tracking_categories_contact_account_company()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_account_company_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY:
- return tracking_categories_contact_company()
- if self is PaymentsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_contact_company_accounting_period()
+PaymentsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,accounting_period",
+ "account,company",
+ "account,company,accounting_period",
+ "accounting_period",
+ "applied_to_lines",
+ "applied_to_lines,account",
+ "applied_to_lines,account,accounting_period",
+ "applied_to_lines,account,company",
+ "applied_to_lines,account,company,accounting_period",
+ "applied_to_lines,accounting_period",
+ "applied_to_lines,company",
+ "applied_to_lines,company,accounting_period",
+ "applied_to_lines,contact",
+ "applied_to_lines,contact,account",
+ "applied_to_lines,contact,account,accounting_period",
+ "applied_to_lines,contact,account,company",
+ "applied_to_lines,contact,account,company,accounting_period",
+ "applied_to_lines,contact,accounting_period",
+ "applied_to_lines,contact,company",
+ "applied_to_lines,contact,company,accounting_period",
+ "company",
+ "company,accounting_period",
+ "contact",
+ "contact,account",
+ "contact,account,accounting_period",
+ "contact,account,company",
+ "contact,account,company,accounting_period",
+ "contact,accounting_period",
+ "contact,company",
+ "contact,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,account",
+ "tracking_categories,account,accounting_period",
+ "tracking_categories,account,company",
+ "tracking_categories,account,company,accounting_period",
+ "tracking_categories,accounting_period",
+ "tracking_categories,applied_to_lines",
+ "tracking_categories,applied_to_lines,account",
+ "tracking_categories,applied_to_lines,account,accounting_period",
+ "tracking_categories,applied_to_lines,account,company",
+ "tracking_categories,applied_to_lines,account,company,accounting_period",
+ "tracking_categories,applied_to_lines,accounting_period",
+ "tracking_categories,applied_to_lines,company",
+ "tracking_categories,applied_to_lines,company,accounting_period",
+ "tracking_categories,applied_to_lines,contact",
+ "tracking_categories,applied_to_lines,contact,account",
+ "tracking_categories,applied_to_lines,contact,account,accounting_period",
+ "tracking_categories,applied_to_lines,contact,account,company",
+ "tracking_categories,applied_to_lines,contact,account,company,accounting_period",
+ "tracking_categories,applied_to_lines,contact,accounting_period",
+ "tracking_categories,applied_to_lines,contact,company",
+ "tracking_categories,applied_to_lines,contact,company,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,account",
+ "tracking_categories,contact,account,accounting_period",
+ "tracking_categories,contact,account,company",
+ "tracking_categories,contact,account,company,accounting_period",
+ "tracking_categories,contact,accounting_period",
+ "tracking_categories,contact,company",
+ "tracking_categories,contact,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/phone_numbers/client.py b/src/merge/resources/accounting/resources/phone_numbers/client.py
index 1e24bd42..13a62d97 100644
--- a/src/merge/resources/accounting/resources/phone_numbers/client.py
+++ b/src/merge/resources/accounting/resources/phone_numbers/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.accounting_phone_number import AccountingPhoneNumber
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class PhoneNumbersClient:
@@ -42,7 +42,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -55,12 +55,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/phone-numbers/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountingPhoneNumber, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountingPhoneNumber,
+ parse_obj_as(
+ type_=AccountingPhoneNumber, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -98,25 +106,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.phone_numbers.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.phone_numbers.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/phone-numbers/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountingPhoneNumber, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountingPhoneNumber,
+ parse_obj_as(
+ type_=AccountingPhoneNumber, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/purchase_orders/client.py b/src/merge/resources/accounting/resources/purchase_orders/client.py
index 6de5b0fa..383692aa 100644
--- a/src/merge/resources/accounting/resources/purchase_orders/client.py
+++ b/src/merge/resources/accounting/resources/purchase_orders/client.py
@@ -1,22 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.purchase_orders_list_request_expand import PurchaseOrdersListRequestExpand
from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
from ...types.paginated_purchase_order_list import PaginatedPurchaseOrderList
-from ...types.purchase_order import PurchaseOrder
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.purchase_order_request import PurchaseOrderRequest
from ...types.purchase_order_response import PurchaseOrderResponse
-from .types.purchase_orders_list_request_expand import PurchaseOrdersListRequestExpand
from .types.purchase_orders_retrieve_request_expand import PurchaseOrdersRetrieveRequestExpand
+from ...types.purchase_order import PurchaseOrder
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,6 +37,8 @@ def list(
expand: typing.Optional[PurchaseOrdersListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
issue_date_after: typing.Optional[dt.datetime] = None,
issue_date_before: typing.Optional[dt.datetime] = None,
modified_after: typing.Optional[dt.datetime] = None,
@@ -67,11 +70,17 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
issue_date_after : typing.Optional[dt.datetime]
If provided, will only return objects created after this datetime.
@@ -106,7 +115,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -125,6 +134,8 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"issue_date_after": serialize_datetime(issue_date_after) if issue_date_after is not None else None,
"issue_date_before": serialize_datetime(issue_date_before) if issue_date_before is not None else None,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
@@ -136,9 +147,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedPurchaseOrderList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedPurchaseOrderList,
+ parse_obj_as(
+ type_=PaginatedPurchaseOrderList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -175,7 +192,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import PurchaseOrderRequest
client = Merge(
@@ -189,14 +206,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/purchase-orders",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PurchaseOrderResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PurchaseOrderResponse,
+ parse_obj_as(
+ type_=PurchaseOrderResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -208,6 +236,7 @@ def retrieve(
*,
expand: typing.Optional[PurchaseOrdersRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
remote_fields: typing.Optional[typing.Literal["status"]] = None,
show_enum_origins: typing.Optional[typing.Literal["status"]] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -225,6 +254,9 @@ def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
remote_fields : typing.Optional[typing.Literal["status"]]
Deprecated. Use show_enum_origins.
@@ -241,7 +273,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -257,14 +289,100 @@ def retrieve(
params={
"expand": expand,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
"remote_fields": remote_fields,
"show_enum_origins": show_enum_origins,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PurchaseOrder, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PurchaseOrder,
+ parse_obj_as(
+ type_=PurchaseOrder, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def line_items_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.purchase_orders.line_items_remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/purchase-orders/line-items/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -286,7 +404,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -295,11 +413,98 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.accounting.purchase_orders.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/purchase-orders/meta/post", method="GET", request_options=request_options
+ "accounting/v1/purchase-orders/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.purchase_orders.remote_field_classes_list()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "accounting/v1/purchase-orders/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -320,6 +525,8 @@ async def list(
expand: typing.Optional[PurchaseOrdersListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
issue_date_after: typing.Optional[dt.datetime] = None,
issue_date_before: typing.Optional[dt.datetime] = None,
modified_after: typing.Optional[dt.datetime] = None,
@@ -351,11 +558,17 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
issue_date_after : typing.Optional[dt.datetime]
If provided, will only return objects created after this datetime.
@@ -390,13 +603,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.purchase_orders.list()
+
+
+ async def main() -> None:
+ await client.accounting.purchase_orders.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/purchase-orders",
@@ -409,6 +630,8 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ "include_shell_data": include_shell_data,
"issue_date_after": serialize_datetime(issue_date_after) if issue_date_after is not None else None,
"issue_date_before": serialize_datetime(issue_date_before) if issue_date_before is not None else None,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
@@ -420,9 +643,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedPurchaseOrderList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedPurchaseOrderList,
+ parse_obj_as(
+ type_=PaginatedPurchaseOrderList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -459,28 +688,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import PurchaseOrderRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.purchase_orders.create(
- model=PurchaseOrderRequest(),
- )
+
+
+ async def main() -> None:
+ await client.accounting.purchase_orders.create(
+ model=PurchaseOrderRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/purchase-orders",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PurchaseOrderResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PurchaseOrderResponse,
+ parse_obj_as(
+ type_=PurchaseOrderResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -492,6 +740,7 @@ async def retrieve(
*,
expand: typing.Optional[PurchaseOrdersRetrieveRequestExpand] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_remote_fields: typing.Optional[bool] = None,
remote_fields: typing.Optional[typing.Literal["status"]] = None,
show_enum_origins: typing.Optional[typing.Literal["status"]] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -509,6 +758,9 @@ async def retrieve(
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_remote_fields : typing.Optional[bool]
+ Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
+
remote_fields : typing.Optional[typing.Literal["status"]]
Deprecated. Use show_enum_origins.
@@ -525,15 +777,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.purchase_orders.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.purchase_orders.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/purchase-orders/{jsonable_encoder(id)}",
@@ -541,14 +801,108 @@ async def retrieve(
params={
"expand": expand,
"include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
"remote_fields": remote_fields,
"show_enum_origins": show_enum_origins,
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PurchaseOrder, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PurchaseOrder,
+ parse_obj_as(
+ type_=PurchaseOrder, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def line_items_remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.purchase_orders.line_items_remote_field_classes_list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/purchase-orders/line-items/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -570,20 +924,123 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.purchase_orders.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.purchase_orders.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/purchase-orders/meta/post", method="GET", request_options=request_options
+ "accounting/v1/purchase-orders/meta/post",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def remote_field_classes_list(
+ self,
+ *,
+ cursor: typing.Optional[str] = None,
+ include_deleted_data: typing.Optional[bool] = None,
+ include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
+ is_common_model_field: typing.Optional[bool] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> PaginatedRemoteFieldClassList:
+ """
+ Returns a list of `RemoteFieldClass` objects.
+
+ Parameters
+ ----------
+ cursor : typing.Optional[str]
+ The pagination cursor value.
+
+ include_deleted_data : typing.Optional[bool]
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+
+ include_remote_data : typing.Optional[bool]
+ Whether to include the original data Merge fetched from the third-party to produce these models.
+
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
+ is_common_model_field : typing.Optional[bool]
+ If provided, will only return remote field classes with this is_common_model_field value
+
+ page_size : typing.Optional[int]
+ Number of results to return per page.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ PaginatedRemoteFieldClassList
+
+
+ Examples
+ --------
+ import asyncio
+
+ from merge import AsyncMerge
+
+ client = AsyncMerge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.accounting.purchase_orders.remote_field_classes_list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "accounting/v1/purchase-orders/remote-field-classes",
+ method="GET",
+ params={
+ "cursor": cursor,
+ "include_deleted_data": include_deleted_data,
+ "include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
+ "is_common_model_field": is_common_model_field,
+ "page_size": page_size,
+ },
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/purchase_orders/types/purchase_orders_list_request_expand.py b/src/merge/resources/accounting/resources/purchase_orders/types/purchase_orders_list_request_expand.py
index 0a18c508..d762a182 100644
--- a/src/merge/resources/accounting/resources/purchase_orders/types/purchase_orders_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/purchase_orders/types/purchase_orders_list_request_expand.py
@@ -1,299 +1,72 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PurchaseOrdersListRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- DELIVERY_ADDRESS = "delivery_address"
- DELIVERY_ADDRESS_ACCOUNTING_PERIOD = "delivery_address,accounting_period"
- DELIVERY_ADDRESS_COMPANY = "delivery_address,company"
- DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD = "delivery_address,company,accounting_period"
- DELIVERY_ADDRESS_VENDOR = "delivery_address,vendor"
- DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD = "delivery_address,vendor,accounting_period"
- DELIVERY_ADDRESS_VENDOR_COMPANY = "delivery_address,vendor,company"
- DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD = "delivery_address,vendor,company,accounting_period"
- LINE_ITEMS = "line_items"
- LINE_ITEMS_ACCOUNTING_PERIOD = "line_items,accounting_period"
- LINE_ITEMS_COMPANY = "line_items,company"
- LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "line_items,company,accounting_period"
- LINE_ITEMS_DELIVERY_ADDRESS = "line_items,delivery_address"
- LINE_ITEMS_DELIVERY_ADDRESS_ACCOUNTING_PERIOD = "line_items,delivery_address,accounting_period"
- LINE_ITEMS_DELIVERY_ADDRESS_COMPANY = "line_items,delivery_address,company"
- LINE_ITEMS_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD = "line_items,delivery_address,company,accounting_period"
- LINE_ITEMS_DELIVERY_ADDRESS_VENDOR = "line_items,delivery_address,vendor"
- LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD = "line_items,delivery_address,vendor,accounting_period"
- LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_COMPANY = "line_items,delivery_address,vendor,company"
- LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,delivery_address,vendor,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES = "line_items,tracking_categories"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "line_items,tracking_categories,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "line_items,tracking_categories,company"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS = "line_items,tracking_categories,delivery_address"
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,delivery_address,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY = "line_items,tracking_categories,delivery_address,company"
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,delivery_address,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR = "line_items,tracking_categories,delivery_address,vendor"
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,delivery_address,vendor,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY = (
- "line_items,tracking_categories,delivery_address,vendor,company"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,delivery_address,vendor,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_VENDOR = "line_items,tracking_categories,vendor"
- LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD = "line_items,tracking_categories,vendor,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_COMPANY = "line_items,tracking_categories,vendor,company"
- LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,vendor,company,accounting_period"
- )
- LINE_ITEMS_VENDOR = "line_items,vendor"
- LINE_ITEMS_VENDOR_ACCOUNTING_PERIOD = "line_items,vendor,accounting_period"
- LINE_ITEMS_VENDOR_COMPANY = "line_items,vendor,company"
- LINE_ITEMS_VENDOR_COMPANY_ACCOUNTING_PERIOD = "line_items,vendor,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS = "tracking_categories,delivery_address"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_ACCOUNTING_PERIOD = "tracking_categories,delivery_address,accounting_period"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY = "tracking_categories,delivery_address,company"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,delivery_address,company,accounting_period"
- )
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR = "tracking_categories,delivery_address,vendor"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD = (
- "tracking_categories,delivery_address,vendor,accounting_period"
- )
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY = "tracking_categories,delivery_address,vendor,company"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,delivery_address,vendor,company,accounting_period"
- )
- TRACKING_CATEGORIES_VENDOR = "tracking_categories,vendor"
- TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD = "tracking_categories,vendor,accounting_period"
- TRACKING_CATEGORIES_VENDOR_COMPANY = "tracking_categories,vendor,company"
- TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,vendor,company,accounting_period"
- VENDOR = "vendor"
- VENDOR_ACCOUNTING_PERIOD = "vendor,accounting_period"
- VENDOR_COMPANY = "vendor,company"
- VENDOR_COMPANY_ACCOUNTING_PERIOD = "vendor,company,accounting_period"
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- delivery_address: typing.Callable[[], T_Result],
- delivery_address_accounting_period: typing.Callable[[], T_Result],
- delivery_address_company: typing.Callable[[], T_Result],
- delivery_address_company_accounting_period: typing.Callable[[], T_Result],
- delivery_address_vendor: typing.Callable[[], T_Result],
- delivery_address_vendor_accounting_period: typing.Callable[[], T_Result],
- delivery_address_vendor_company: typing.Callable[[], T_Result],
- delivery_address_vendor_company_accounting_period: typing.Callable[[], T_Result],
- line_items: typing.Callable[[], T_Result],
- line_items_accounting_period: typing.Callable[[], T_Result],
- line_items_company: typing.Callable[[], T_Result],
- line_items_company_accounting_period: typing.Callable[[], T_Result],
- line_items_delivery_address: typing.Callable[[], T_Result],
- line_items_delivery_address_accounting_period: typing.Callable[[], T_Result],
- line_items_delivery_address_company: typing.Callable[[], T_Result],
- line_items_delivery_address_company_accounting_period: typing.Callable[[], T_Result],
- line_items_delivery_address_vendor: typing.Callable[[], T_Result],
- line_items_delivery_address_vendor_accounting_period: typing.Callable[[], T_Result],
- line_items_delivery_address_vendor_company: typing.Callable[[], T_Result],
- line_items_delivery_address_vendor_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories: typing.Callable[[], T_Result],
- line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_vendor: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_vendor_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_vendor_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_vendor_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_vendor: typing.Callable[[], T_Result],
- line_items_tracking_categories_vendor_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_vendor_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_vendor_company_accounting_period: typing.Callable[[], T_Result],
- line_items_vendor: typing.Callable[[], T_Result],
- line_items_vendor_accounting_period: typing.Callable[[], T_Result],
- line_items_vendor_company: typing.Callable[[], T_Result],
- line_items_vendor_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_delivery_address: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_company: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_vendor: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_vendor_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_vendor_company: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_vendor_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_vendor: typing.Callable[[], T_Result],
- tracking_categories_vendor_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_vendor_company: typing.Callable[[], T_Result],
- tracking_categories_vendor_company_accounting_period: typing.Callable[[], T_Result],
- vendor: typing.Callable[[], T_Result],
- vendor_accounting_period: typing.Callable[[], T_Result],
- vendor_company: typing.Callable[[], T_Result],
- vendor_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PurchaseOrdersListRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is PurchaseOrdersListRequestExpand.COMPANY:
- return company()
- if self is PurchaseOrdersListRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.DELIVERY_ADDRESS:
- return delivery_address()
- if self is PurchaseOrdersListRequestExpand.DELIVERY_ADDRESS_ACCOUNTING_PERIOD:
- return delivery_address_accounting_period()
- if self is PurchaseOrdersListRequestExpand.DELIVERY_ADDRESS_COMPANY:
- return delivery_address_company()
- if self is PurchaseOrdersListRequestExpand.DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD:
- return delivery_address_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.DELIVERY_ADDRESS_VENDOR:
- return delivery_address_vendor()
- if self is PurchaseOrdersListRequestExpand.DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD:
- return delivery_address_vendor_accounting_period()
- if self is PurchaseOrdersListRequestExpand.DELIVERY_ADDRESS_VENDOR_COMPANY:
- return delivery_address_vendor_company()
- if self is PurchaseOrdersListRequestExpand.DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return delivery_address_vendor_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS:
- return line_items()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_ACCOUNTING_PERIOD:
- return line_items_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_COMPANY:
- return line_items_company()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS:
- return line_items_delivery_address()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_ACCOUNTING_PERIOD:
- return line_items_delivery_address_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_COMPANY:
- return line_items_delivery_address_company()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_delivery_address_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_VENDOR:
- return line_items_delivery_address_vendor()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD:
- return line_items_delivery_address_vendor_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_COMPANY:
- return line_items_delivery_address_vendor_company()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return line_items_delivery_address_vendor_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES:
- return line_items_tracking_categories()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return line_items_tracking_categories_company()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS:
- return line_items_tracking_categories_delivery_address()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_delivery_address_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY:
- return line_items_tracking_categories_delivery_address_company()
- if (
- self
- is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_delivery_address_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR:
- return line_items_tracking_categories_delivery_address_vendor()
- if (
- self
- is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_delivery_address_vendor_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY:
- return line_items_tracking_categories_delivery_address_vendor_company()
- if (
- self
- is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_delivery_address_vendor_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_VENDOR:
- return line_items_tracking_categories_vendor()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_vendor_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_COMPANY:
- return line_items_tracking_categories_vendor_company()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_vendor_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_VENDOR:
- return line_items_vendor()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_VENDOR_ACCOUNTING_PERIOD:
- return line_items_vendor_accounting_period()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_VENDOR_COMPANY:
- return line_items_vendor_company()
- if self is PurchaseOrdersListRequestExpand.LINE_ITEMS_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return line_items_vendor_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS:
- return tracking_categories_delivery_address()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_ACCOUNTING_PERIOD:
- return tracking_categories_delivery_address_accounting_period()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY:
- return tracking_categories_delivery_address_company()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_delivery_address_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR:
- return tracking_categories_delivery_address_vendor()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD:
- return tracking_categories_delivery_address_vendor_accounting_period()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY:
- return tracking_categories_delivery_address_vendor_company()
- if (
- self
- is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD
- ):
- return tracking_categories_delivery_address_vendor_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_VENDOR:
- return tracking_categories_vendor()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD:
- return tracking_categories_vendor_accounting_period()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_VENDOR_COMPANY:
- return tracking_categories_vendor_company()
- if self is PurchaseOrdersListRequestExpand.TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_vendor_company_accounting_period()
- if self is PurchaseOrdersListRequestExpand.VENDOR:
- return vendor()
- if self is PurchaseOrdersListRequestExpand.VENDOR_ACCOUNTING_PERIOD:
- return vendor_accounting_period()
- if self is PurchaseOrdersListRequestExpand.VENDOR_COMPANY:
- return vendor_company()
- if self is PurchaseOrdersListRequestExpand.VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return vendor_company_accounting_period()
+PurchaseOrdersListRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "company",
+ "company,accounting_period",
+ "delivery_address",
+ "delivery_address,accounting_period",
+ "delivery_address,company",
+ "delivery_address,company,accounting_period",
+ "delivery_address,vendor",
+ "delivery_address,vendor,accounting_period",
+ "delivery_address,vendor,company",
+ "delivery_address,vendor,company,accounting_period",
+ "line_items",
+ "line_items,accounting_period",
+ "line_items,company",
+ "line_items,company,accounting_period",
+ "line_items,delivery_address",
+ "line_items,delivery_address,accounting_period",
+ "line_items,delivery_address,company",
+ "line_items,delivery_address,company,accounting_period",
+ "line_items,delivery_address,vendor",
+ "line_items,delivery_address,vendor,accounting_period",
+ "line_items,delivery_address,vendor,company",
+ "line_items,delivery_address,vendor,company,accounting_period",
+ "line_items,tracking_categories",
+ "line_items,tracking_categories,accounting_period",
+ "line_items,tracking_categories,company",
+ "line_items,tracking_categories,company,accounting_period",
+ "line_items,tracking_categories,delivery_address",
+ "line_items,tracking_categories,delivery_address,accounting_period",
+ "line_items,tracking_categories,delivery_address,company",
+ "line_items,tracking_categories,delivery_address,company,accounting_period",
+ "line_items,tracking_categories,delivery_address,vendor",
+ "line_items,tracking_categories,delivery_address,vendor,accounting_period",
+ "line_items,tracking_categories,delivery_address,vendor,company",
+ "line_items,tracking_categories,delivery_address,vendor,company,accounting_period",
+ "line_items,tracking_categories,vendor",
+ "line_items,tracking_categories,vendor,accounting_period",
+ "line_items,tracking_categories,vendor,company",
+ "line_items,tracking_categories,vendor,company,accounting_period",
+ "line_items,vendor",
+ "line_items,vendor,accounting_period",
+ "line_items,vendor,company",
+ "line_items,vendor,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,delivery_address",
+ "tracking_categories,delivery_address,accounting_period",
+ "tracking_categories,delivery_address,company",
+ "tracking_categories,delivery_address,company,accounting_period",
+ "tracking_categories,delivery_address,vendor",
+ "tracking_categories,delivery_address,vendor,accounting_period",
+ "tracking_categories,delivery_address,vendor,company",
+ "tracking_categories,delivery_address,vendor,company,accounting_period",
+ "tracking_categories,vendor",
+ "tracking_categories,vendor,accounting_period",
+ "tracking_categories,vendor,company",
+ "tracking_categories,vendor,company,accounting_period",
+ "vendor",
+ "vendor,accounting_period",
+ "vendor,company",
+ "vendor,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/purchase_orders/types/purchase_orders_retrieve_request_expand.py b/src/merge/resources/accounting/resources/purchase_orders/types/purchase_orders_retrieve_request_expand.py
index dcd517cf..08e90cc1 100644
--- a/src/merge/resources/accounting/resources/purchase_orders/types/purchase_orders_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/purchase_orders/types/purchase_orders_retrieve_request_expand.py
@@ -1,302 +1,72 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PurchaseOrdersRetrieveRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- DELIVERY_ADDRESS = "delivery_address"
- DELIVERY_ADDRESS_ACCOUNTING_PERIOD = "delivery_address,accounting_period"
- DELIVERY_ADDRESS_COMPANY = "delivery_address,company"
- DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD = "delivery_address,company,accounting_period"
- DELIVERY_ADDRESS_VENDOR = "delivery_address,vendor"
- DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD = "delivery_address,vendor,accounting_period"
- DELIVERY_ADDRESS_VENDOR_COMPANY = "delivery_address,vendor,company"
- DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD = "delivery_address,vendor,company,accounting_period"
- LINE_ITEMS = "line_items"
- LINE_ITEMS_ACCOUNTING_PERIOD = "line_items,accounting_period"
- LINE_ITEMS_COMPANY = "line_items,company"
- LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD = "line_items,company,accounting_period"
- LINE_ITEMS_DELIVERY_ADDRESS = "line_items,delivery_address"
- LINE_ITEMS_DELIVERY_ADDRESS_ACCOUNTING_PERIOD = "line_items,delivery_address,accounting_period"
- LINE_ITEMS_DELIVERY_ADDRESS_COMPANY = "line_items,delivery_address,company"
- LINE_ITEMS_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD = "line_items,delivery_address,company,accounting_period"
- LINE_ITEMS_DELIVERY_ADDRESS_VENDOR = "line_items,delivery_address,vendor"
- LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD = "line_items,delivery_address,vendor,accounting_period"
- LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_COMPANY = "line_items,delivery_address,vendor,company"
- LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,delivery_address,vendor,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES = "line_items,tracking_categories"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "line_items,tracking_categories,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY = "line_items,tracking_categories,company"
- LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS = "line_items,tracking_categories,delivery_address"
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,delivery_address,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY = "line_items,tracking_categories,delivery_address,company"
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,delivery_address,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR = "line_items,tracking_categories,delivery_address,vendor"
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,delivery_address,vendor,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY = (
- "line_items,tracking_categories,delivery_address,vendor,company"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,delivery_address,vendor,company,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_VENDOR = "line_items,tracking_categories,vendor"
- LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD = "line_items,tracking_categories,vendor,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_COMPANY = "line_items,tracking_categories,vendor,company"
- LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,vendor,company,accounting_period"
- )
- LINE_ITEMS_VENDOR = "line_items,vendor"
- LINE_ITEMS_VENDOR_ACCOUNTING_PERIOD = "line_items,vendor,accounting_period"
- LINE_ITEMS_VENDOR_COMPANY = "line_items,vendor,company"
- LINE_ITEMS_VENDOR_COMPANY_ACCOUNTING_PERIOD = "line_items,vendor,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS = "tracking_categories,delivery_address"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_ACCOUNTING_PERIOD = "tracking_categories,delivery_address,accounting_period"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY = "tracking_categories,delivery_address,company"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,delivery_address,company,accounting_period"
- )
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR = "tracking_categories,delivery_address,vendor"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD = (
- "tracking_categories,delivery_address,vendor,accounting_period"
- )
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY = "tracking_categories,delivery_address,vendor,company"
- TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "tracking_categories,delivery_address,vendor,company,accounting_period"
- )
- TRACKING_CATEGORIES_VENDOR = "tracking_categories,vendor"
- TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD = "tracking_categories,vendor,accounting_period"
- TRACKING_CATEGORIES_VENDOR_COMPANY = "tracking_categories,vendor,company"
- TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,vendor,company,accounting_period"
- VENDOR = "vendor"
- VENDOR_ACCOUNTING_PERIOD = "vendor,accounting_period"
- VENDOR_COMPANY = "vendor,company"
- VENDOR_COMPANY_ACCOUNTING_PERIOD = "vendor,company,accounting_period"
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- delivery_address: typing.Callable[[], T_Result],
- delivery_address_accounting_period: typing.Callable[[], T_Result],
- delivery_address_company: typing.Callable[[], T_Result],
- delivery_address_company_accounting_period: typing.Callable[[], T_Result],
- delivery_address_vendor: typing.Callable[[], T_Result],
- delivery_address_vendor_accounting_period: typing.Callable[[], T_Result],
- delivery_address_vendor_company: typing.Callable[[], T_Result],
- delivery_address_vendor_company_accounting_period: typing.Callable[[], T_Result],
- line_items: typing.Callable[[], T_Result],
- line_items_accounting_period: typing.Callable[[], T_Result],
- line_items_company: typing.Callable[[], T_Result],
- line_items_company_accounting_period: typing.Callable[[], T_Result],
- line_items_delivery_address: typing.Callable[[], T_Result],
- line_items_delivery_address_accounting_period: typing.Callable[[], T_Result],
- line_items_delivery_address_company: typing.Callable[[], T_Result],
- line_items_delivery_address_company_accounting_period: typing.Callable[[], T_Result],
- line_items_delivery_address_vendor: typing.Callable[[], T_Result],
- line_items_delivery_address_vendor_accounting_period: typing.Callable[[], T_Result],
- line_items_delivery_address_vendor_company: typing.Callable[[], T_Result],
- line_items_delivery_address_vendor_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories: typing.Callable[[], T_Result],
- line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_vendor: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_vendor_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_vendor_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_delivery_address_vendor_company_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_vendor: typing.Callable[[], T_Result],
- line_items_tracking_categories_vendor_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_vendor_company: typing.Callable[[], T_Result],
- line_items_tracking_categories_vendor_company_accounting_period: typing.Callable[[], T_Result],
- line_items_vendor: typing.Callable[[], T_Result],
- line_items_vendor_accounting_period: typing.Callable[[], T_Result],
- line_items_vendor_company: typing.Callable[[], T_Result],
- line_items_vendor_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_delivery_address: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_company: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_vendor: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_vendor_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_vendor_company: typing.Callable[[], T_Result],
- tracking_categories_delivery_address_vendor_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_vendor: typing.Callable[[], T_Result],
- tracking_categories_vendor_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_vendor_company: typing.Callable[[], T_Result],
- tracking_categories_vendor_company_accounting_period: typing.Callable[[], T_Result],
- vendor: typing.Callable[[], T_Result],
- vendor_accounting_period: typing.Callable[[], T_Result],
- vendor_company: typing.Callable[[], T_Result],
- vendor_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PurchaseOrdersRetrieveRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.COMPANY:
- return company()
- if self is PurchaseOrdersRetrieveRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.DELIVERY_ADDRESS:
- return delivery_address()
- if self is PurchaseOrdersRetrieveRequestExpand.DELIVERY_ADDRESS_ACCOUNTING_PERIOD:
- return delivery_address_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.DELIVERY_ADDRESS_COMPANY:
- return delivery_address_company()
- if self is PurchaseOrdersRetrieveRequestExpand.DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD:
- return delivery_address_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.DELIVERY_ADDRESS_VENDOR:
- return delivery_address_vendor()
- if self is PurchaseOrdersRetrieveRequestExpand.DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD:
- return delivery_address_vendor_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.DELIVERY_ADDRESS_VENDOR_COMPANY:
- return delivery_address_vendor_company()
- if self is PurchaseOrdersRetrieveRequestExpand.DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return delivery_address_vendor_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS:
- return line_items()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_ACCOUNTING_PERIOD:
- return line_items_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_COMPANY:
- return line_items_company()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS:
- return line_items_delivery_address()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_ACCOUNTING_PERIOD:
- return line_items_delivery_address_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_COMPANY:
- return line_items_delivery_address_company()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD:
- return line_items_delivery_address_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_VENDOR:
- return line_items_delivery_address_vendor()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD:
- return line_items_delivery_address_vendor_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_COMPANY:
- return line_items_delivery_address_vendor_company()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return line_items_delivery_address_vendor_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES:
- return line_items_tracking_categories()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY:
- return line_items_tracking_categories_company()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS:
- return line_items_tracking_categories_delivery_address()
- if (
- self
- is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_delivery_address_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY:
- return line_items_tracking_categories_delivery_address_company()
- if (
- self
- is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_delivery_address_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR:
- return line_items_tracking_categories_delivery_address_vendor()
- if (
- self
- is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_delivery_address_vendor_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY:
- return line_items_tracking_categories_delivery_address_vendor_company()
- if (
- self
- is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD
- ):
- return line_items_tracking_categories_delivery_address_vendor_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_VENDOR:
- return line_items_tracking_categories_vendor()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_vendor_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_COMPANY:
- return line_items_tracking_categories_vendor_company()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_vendor_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_VENDOR:
- return line_items_vendor()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_VENDOR_ACCOUNTING_PERIOD:
- return line_items_vendor_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_VENDOR_COMPANY:
- return line_items_vendor_company()
- if self is PurchaseOrdersRetrieveRequestExpand.LINE_ITEMS_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return line_items_vendor_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS:
- return tracking_categories_delivery_address()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_ACCOUNTING_PERIOD:
- return tracking_categories_delivery_address_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY:
- return tracking_categories_delivery_address_company()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_delivery_address_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR:
- return tracking_categories_delivery_address_vendor()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_ACCOUNTING_PERIOD:
- return tracking_categories_delivery_address_vendor_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY:
- return tracking_categories_delivery_address_vendor_company()
- if (
- self
- is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_DELIVERY_ADDRESS_VENDOR_COMPANY_ACCOUNTING_PERIOD
- ):
- return tracking_categories_delivery_address_vendor_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_VENDOR:
- return tracking_categories_vendor()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD:
- return tracking_categories_vendor_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_VENDOR_COMPANY:
- return tracking_categories_vendor_company()
- if self is PurchaseOrdersRetrieveRequestExpand.TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_vendor_company_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.VENDOR:
- return vendor()
- if self is PurchaseOrdersRetrieveRequestExpand.VENDOR_ACCOUNTING_PERIOD:
- return vendor_accounting_period()
- if self is PurchaseOrdersRetrieveRequestExpand.VENDOR_COMPANY:
- return vendor_company()
- if self is PurchaseOrdersRetrieveRequestExpand.VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return vendor_company_accounting_period()
+PurchaseOrdersRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "company",
+ "company,accounting_period",
+ "delivery_address",
+ "delivery_address,accounting_period",
+ "delivery_address,company",
+ "delivery_address,company,accounting_period",
+ "delivery_address,vendor",
+ "delivery_address,vendor,accounting_period",
+ "delivery_address,vendor,company",
+ "delivery_address,vendor,company,accounting_period",
+ "line_items",
+ "line_items,accounting_period",
+ "line_items,company",
+ "line_items,company,accounting_period",
+ "line_items,delivery_address",
+ "line_items,delivery_address,accounting_period",
+ "line_items,delivery_address,company",
+ "line_items,delivery_address,company,accounting_period",
+ "line_items,delivery_address,vendor",
+ "line_items,delivery_address,vendor,accounting_period",
+ "line_items,delivery_address,vendor,company",
+ "line_items,delivery_address,vendor,company,accounting_period",
+ "line_items,tracking_categories",
+ "line_items,tracking_categories,accounting_period",
+ "line_items,tracking_categories,company",
+ "line_items,tracking_categories,company,accounting_period",
+ "line_items,tracking_categories,delivery_address",
+ "line_items,tracking_categories,delivery_address,accounting_period",
+ "line_items,tracking_categories,delivery_address,company",
+ "line_items,tracking_categories,delivery_address,company,accounting_period",
+ "line_items,tracking_categories,delivery_address,vendor",
+ "line_items,tracking_categories,delivery_address,vendor,accounting_period",
+ "line_items,tracking_categories,delivery_address,vendor,company",
+ "line_items,tracking_categories,delivery_address,vendor,company,accounting_period",
+ "line_items,tracking_categories,vendor",
+ "line_items,tracking_categories,vendor,accounting_period",
+ "line_items,tracking_categories,vendor,company",
+ "line_items,tracking_categories,vendor,company,accounting_period",
+ "line_items,vendor",
+ "line_items,vendor,accounting_period",
+ "line_items,vendor,company",
+ "line_items,vendor,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,delivery_address",
+ "tracking_categories,delivery_address,accounting_period",
+ "tracking_categories,delivery_address,company",
+ "tracking_categories,delivery_address,company,accounting_period",
+ "tracking_categories,delivery_address,vendor",
+ "tracking_categories,delivery_address,vendor,accounting_period",
+ "tracking_categories,delivery_address,vendor,company",
+ "tracking_categories,delivery_address,vendor,company,accounting_period",
+ "tracking_categories,vendor",
+ "tracking_categories,vendor,accounting_period",
+ "tracking_categories,vendor,company",
+ "tracking_categories,vendor,company,accounting_period",
+ "vendor",
+ "vendor,accounting_period",
+ "vendor,company",
+ "vendor,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/regenerate_key/client.py b/src/merge/resources/accounting/resources/regenerate_key/client.py
index af66f7d1..6165184f 100644
--- a/src/merge/resources/accounting/resources/regenerate_key/client.py
+++ b/src/merge/resources/accounting/resources/regenerate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,13 +49,21 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/regenerate-key",
method="POST",
- json={"name": name},
+ json={
+ "name": name,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,26 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.regenerate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.accounting.regenerate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/regenerate-key",
method="POST",
- json={"name": name},
+ json={
+ "name": name,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/scopes/client.py b/src/merge/resources/accounting/resources/scopes/client.py
index 93018a58..94cb0e65 100644
--- a/src/merge/resources/accounting/resources/scopes/client.py
+++ b/src/merge/resources/accounting/resources/scopes/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.common_model_scope_api import CommonModelScopeApi
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -22,7 +22,7 @@ def default_scopes_retrieve(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> CommonModelScopeApi:
"""
- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+ Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
Parameters
----------
@@ -36,7 +36,7 @@ def default_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -45,11 +45,19 @@ def default_scopes_retrieve(
client.accounting.scopes.default_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/default-scopes", method="GET", request_options=request_options
+ "accounting/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -59,7 +67,7 @@ def linked_account_scopes_retrieve(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> CommonModelScopeApi:
"""
- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+ Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
Parameters
----------
@@ -73,7 +81,7 @@ def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -82,11 +90,19 @@ def linked_account_scopes_retrieve(
client.accounting.scopes.linked_account_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/linked-account-scopes", method="GET", request_options=request_options
+ "accounting/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -96,10 +112,10 @@ def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
+ Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
Parameters
----------
@@ -116,7 +132,7 @@ def linked_account_scopes_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.accounting import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -153,13 +169,21 @@ def linked_account_scopes_create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -174,7 +198,7 @@ async def default_scopes_retrieve(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> CommonModelScopeApi:
"""
- Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+ Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
Parameters
----------
@@ -188,20 +212,36 @@ async def default_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.scopes.default_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.scopes.default_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/default-scopes", method="GET", request_options=request_options
+ "accounting/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -211,7 +251,7 @@ async def linked_account_scopes_retrieve(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> CommonModelScopeApi:
"""
- Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes).
+ Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
Parameters
----------
@@ -225,20 +265,36 @@ async def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.scopes.linked_account_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.accounting.scopes.linked_account_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/linked-account-scopes", method="GET", request_options=request_options
+ "accounting/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -248,10 +304,10 @@ async def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
- Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
+ Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
Parameters
----------
@@ -268,7 +324,9 @@ async def linked_account_scopes_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.accounting import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -278,40 +336,54 @@ async def linked_account_scopes_create(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.scopes.linked_account_scopes_create(
- common_models=[
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Employee",
- model_permissions={
- "READ": ModelPermissionDeserializerRequest(
- is_enabled=True,
- ),
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- ),
- },
- ),
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Benefit",
- model_permissions={
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- )
- },
- ),
- ],
- )
+
+
+ async def main() -> None:
+ await client.accounting.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/sync_status/client.py b/src/merge/resources/accounting/resources/sync_status/client.py
index 939f6209..d7c50a79 100644
--- a/src/merge/resources/accounting/resources/sync_status/client.py
+++ b/src/merge/resources/accounting/resources/sync_status/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_sync_status_list import PaginatedSyncStatusList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class SyncStatusClient:
@@ -19,7 +19,7 @@ def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -42,7 +42,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -53,12 +53,21 @@ def list(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,7 +83,7 @@ async def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -97,23 +106,40 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.sync_status.list()
+
+
+ async def main() -> None:
+ await client.accounting.sync_status.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/tax_rates/client.py b/src/merge/resources/accounting/resources/tax_rates/client.py
index 099d1b4c..6fab4e52 100644
--- a/src/merge/resources/accounting/resources/tax_rates/client.py
+++ b/src/merge/resources/accounting/resources/tax_rates/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_tax_rate_list import PaginatedTaxRateList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.tax_rate import TaxRate
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class TaxRatesClient:
@@ -28,6 +28,7 @@ def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -55,11 +56,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -82,7 +86,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,6 +105,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -108,9 +113,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTaxRateList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTaxRateList,
+ parse_obj_as(
+ type_=PaginatedTaxRateList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -147,7 +158,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,12 +171,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/tax-rates/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TaxRate, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TaxRate,
+ parse_obj_as(
+ type_=TaxRate, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,6 +206,7 @@ async def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -213,11 +234,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -240,13 +264,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.tax_rates.list()
+
+
+ async def main() -> None:
+ await client.accounting.tax_rates.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/tax-rates",
@@ -259,6 +291,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -266,9 +299,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTaxRateList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTaxRateList,
+ parse_obj_as(
+ type_=PaginatedTaxRateList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,25 +344,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.tax_rates.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.tax_rates.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/tax-rates/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TaxRate, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TaxRate,
+ parse_obj_as(
+ type_=TaxRate, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/tracking_categories/client.py b/src/merge/resources/accounting/resources/tracking_categories/client.py
index 6c98fad9..a8c68407 100644
--- a/src/merge/resources/accounting/resources/tracking_categories/client.py
+++ b/src/merge/resources/accounting/resources/tracking_categories/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_tracking_category_list import PaginatedTrackingCategoryList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.tracking_category import TrackingCategory
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class TrackingCategoriesClient:
@@ -28,6 +28,7 @@ def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -57,11 +58,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -90,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -109,6 +113,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -118,9 +123,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTrackingCategoryList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTrackingCategoryList,
+ parse_obj_as(
+ type_=PaginatedTrackingCategoryList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -165,7 +176,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -186,9 +197,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TrackingCategory, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TrackingCategory,
+ parse_obj_as(
+ type_=TrackingCategory, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -209,6 +226,7 @@ async def list(
expand: typing.Optional[typing.Literal["company"]] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -238,11 +256,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -271,13 +292,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.tracking_categories.list()
+
+
+ async def main() -> None:
+ await client.accounting.tracking_categories.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/tracking-categories",
@@ -290,6 +319,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -299,9 +329,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTrackingCategoryList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTrackingCategoryList,
+ parse_obj_as(
+ type_=PaginatedTrackingCategoryList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -346,15 +382,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.tracking_categories.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.tracking_categories.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/tracking-categories/{jsonable_encoder(id)}",
@@ -367,9 +411,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TrackingCategory, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TrackingCategory,
+ parse_obj_as(
+ type_=TrackingCategory, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/transactions/client.py b/src/merge/resources/accounting/resources/transactions/client.py
index 7b1225b2..a72409bd 100644
--- a/src/merge/resources/accounting/resources/transactions/client.py
+++ b/src/merge/resources/accounting/resources/transactions/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.transactions_list_request_expand import TransactionsListRequestExpand
from .....core.request_options import RequestOptions
from ...types.paginated_transaction_list import PaginatedTransactionList
-from ...types.transaction import Transaction
-from .types.transactions_list_request_expand import TransactionsListRequestExpand
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.transactions_retrieve_request_expand import TransactionsRetrieveRequestExpand
+from ...types.transaction import Transaction
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class TransactionsClient:
@@ -30,6 +30,7 @@ def list(
expand: typing.Optional[TransactionsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -59,11 +60,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -92,7 +96,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -111,6 +115,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -124,9 +129,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTransactionList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTransactionList,
+ parse_obj_as(
+ type_=PaginatedTransactionList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -163,7 +174,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -176,12 +187,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/transactions/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Transaction, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Transaction,
+ parse_obj_as(
+ type_=Transaction, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -202,6 +222,7 @@ async def list(
expand: typing.Optional[TransactionsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -231,11 +252,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -264,13 +288,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.transactions.list()
+
+
+ async def main() -> None:
+ await client.accounting.transactions.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/transactions",
@@ -283,6 +315,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -296,9 +329,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTransactionList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTransactionList,
+ parse_obj_as(
+ type_=PaginatedTransactionList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -335,25 +374,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.transactions.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.transactions.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/transactions/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Transaction, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Transaction,
+ parse_obj_as(
+ type_=Transaction, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/transactions/types/transactions_list_request_expand.py b/src/merge/resources/accounting/resources/transactions/types/transactions_list_request_expand.py
index 42abde42..aebf00ca 100644
--- a/src/merge/resources/accounting/resources/transactions/types/transactions_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/transactions/types/transactions_list_request_expand.py
@@ -1,143 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TransactionsListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_ACCOUNTING_PERIOD = "account,accounting_period"
- ACCOUNTING_PERIOD = "accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNT = "contact,account"
- CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "contact,account,accounting_period"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- LINE_ITEMS = "line_items"
- LINE_ITEMS_ACCOUNT = "line_items,account"
- LINE_ITEMS_ACCOUNT_ACCOUNTING_PERIOD = "line_items,account,accounting_period"
- LINE_ITEMS_ACCOUNTING_PERIOD = "line_items,accounting_period"
- LINE_ITEMS_CONTACT = "line_items,contact"
- LINE_ITEMS_CONTACT_ACCOUNT = "line_items,contact,account"
- LINE_ITEMS_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "line_items,contact,account,accounting_period"
- LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "line_items,contact,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES = "line_items,tracking_categories"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNT = "line_items,tracking_categories,account"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,account,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "line_items,tracking_categories,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "line_items,tracking_categories,contact"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNT = "line_items,tracking_categories,contact,account"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,account,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,accounting_period"
- )
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNT = "tracking_categories,account"
- TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,account,accounting_period"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT = "tracking_categories,contact,account"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,contact,account,accounting_period"
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_accounting_period: typing.Callable[[], T_Result],
- accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_account: typing.Callable[[], T_Result],
- contact_account_accounting_period: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- line_items: typing.Callable[[], T_Result],
- line_items_account: typing.Callable[[], T_Result],
- line_items_account_accounting_period: typing.Callable[[], T_Result],
- line_items_accounting_period: typing.Callable[[], T_Result],
- line_items_contact: typing.Callable[[], T_Result],
- line_items_contact_account: typing.Callable[[], T_Result],
- line_items_contact_account_accounting_period: typing.Callable[[], T_Result],
- line_items_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories: typing.Callable[[], T_Result],
- line_items_tracking_categories_account: typing.Callable[[], T_Result],
- line_items_tracking_categories_account_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_account: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_account_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_account: typing.Callable[[], T_Result],
- tracking_categories_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_account: typing.Callable[[], T_Result],
- tracking_categories_contact_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TransactionsListRequestExpand.ACCOUNT:
- return account()
- if self is TransactionsListRequestExpand.ACCOUNT_ACCOUNTING_PERIOD:
- return account_accounting_period()
- if self is TransactionsListRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is TransactionsListRequestExpand.CONTACT:
- return contact()
- if self is TransactionsListRequestExpand.CONTACT_ACCOUNT:
- return contact_account()
- if self is TransactionsListRequestExpand.CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return contact_account_accounting_period()
- if self is TransactionsListRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is TransactionsListRequestExpand.LINE_ITEMS:
- return line_items()
- if self is TransactionsListRequestExpand.LINE_ITEMS_ACCOUNT:
- return line_items_account()
- if self is TransactionsListRequestExpand.LINE_ITEMS_ACCOUNT_ACCOUNTING_PERIOD:
- return line_items_account_accounting_period()
- if self is TransactionsListRequestExpand.LINE_ITEMS_ACCOUNTING_PERIOD:
- return line_items_accounting_period()
- if self is TransactionsListRequestExpand.LINE_ITEMS_CONTACT:
- return line_items_contact()
- if self is TransactionsListRequestExpand.LINE_ITEMS_CONTACT_ACCOUNT:
- return line_items_contact_account()
- if self is TransactionsListRequestExpand.LINE_ITEMS_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return line_items_contact_account_accounting_period()
- if self is TransactionsListRequestExpand.LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_contact_accounting_period()
- if self is TransactionsListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES:
- return line_items_tracking_categories()
- if self is TransactionsListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNT:
- return line_items_tracking_categories_account()
- if self is TransactionsListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_account_accounting_period()
- if self is TransactionsListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_accounting_period()
- if self is TransactionsListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return line_items_tracking_categories_contact()
- if self is TransactionsListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNT:
- return line_items_tracking_categories_contact_account()
- if self is TransactionsListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_account_accounting_period()
- if self is TransactionsListRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_accounting_period()
- if self is TransactionsListRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is TransactionsListRequestExpand.TRACKING_CATEGORIES_ACCOUNT:
- return tracking_categories_account()
- if self is TransactionsListRequestExpand.TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_account_accounting_period()
- if self is TransactionsListRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is TransactionsListRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is TransactionsListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT:
- return tracking_categories_contact_account()
- if self is TransactionsListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_account_accounting_period()
- if self is TransactionsListRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
+TransactionsListRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,accounting_period",
+ "accounting_period",
+ "contact",
+ "contact,account",
+ "contact,account,accounting_period",
+ "contact,accounting_period",
+ "line_items",
+ "line_items,account",
+ "line_items,account,accounting_period",
+ "line_items,accounting_period",
+ "line_items,contact",
+ "line_items,contact,account",
+ "line_items,contact,account,accounting_period",
+ "line_items,contact,accounting_period",
+ "line_items,tracking_categories",
+ "line_items,tracking_categories,account",
+ "line_items,tracking_categories,account,accounting_period",
+ "line_items,tracking_categories,accounting_period",
+ "line_items,tracking_categories,contact",
+ "line_items,tracking_categories,contact,account",
+ "line_items,tracking_categories,contact,account,accounting_period",
+ "line_items,tracking_categories,contact,accounting_period",
+ "tracking_categories",
+ "tracking_categories,account",
+ "tracking_categories,account,accounting_period",
+ "tracking_categories,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,account",
+ "tracking_categories,contact,account,accounting_period",
+ "tracking_categories,contact,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/transactions/types/transactions_retrieve_request_expand.py b/src/merge/resources/accounting/resources/transactions/types/transactions_retrieve_request_expand.py
index 5d6d1ad2..cb2ac679 100644
--- a/src/merge/resources/accounting/resources/transactions/types/transactions_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/transactions/types/transactions_retrieve_request_expand.py
@@ -1,143 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TransactionsRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_ACCOUNTING_PERIOD = "account,accounting_period"
- ACCOUNTING_PERIOD = "accounting_period"
- CONTACT = "contact"
- CONTACT_ACCOUNT = "contact,account"
- CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "contact,account,accounting_period"
- CONTACT_ACCOUNTING_PERIOD = "contact,accounting_period"
- LINE_ITEMS = "line_items"
- LINE_ITEMS_ACCOUNT = "line_items,account"
- LINE_ITEMS_ACCOUNT_ACCOUNTING_PERIOD = "line_items,account,accounting_period"
- LINE_ITEMS_ACCOUNTING_PERIOD = "line_items,accounting_period"
- LINE_ITEMS_CONTACT = "line_items,contact"
- LINE_ITEMS_CONTACT_ACCOUNT = "line_items,contact,account"
- LINE_ITEMS_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "line_items,contact,account,accounting_period"
- LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD = "line_items,contact,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES = "line_items,tracking_categories"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNT = "line_items,tracking_categories,account"
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,account,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "line_items,tracking_categories,accounting_period"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT = "line_items,tracking_categories,contact"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNT = "line_items,tracking_categories,contact,account"
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,account,accounting_period"
- )
- LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = (
- "line_items,tracking_categories,contact,accounting_period"
- )
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNT = "tracking_categories,account"
- TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,account,accounting_period"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_CONTACT = "tracking_categories,contact"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT = "tracking_categories,contact,account"
- TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD = "tracking_categories,contact,account,accounting_period"
- TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD = "tracking_categories,contact,accounting_period"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_accounting_period: typing.Callable[[], T_Result],
- accounting_period: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_account: typing.Callable[[], T_Result],
- contact_account_accounting_period: typing.Callable[[], T_Result],
- contact_accounting_period: typing.Callable[[], T_Result],
- line_items: typing.Callable[[], T_Result],
- line_items_account: typing.Callable[[], T_Result],
- line_items_account_accounting_period: typing.Callable[[], T_Result],
- line_items_accounting_period: typing.Callable[[], T_Result],
- line_items_contact: typing.Callable[[], T_Result],
- line_items_contact_account: typing.Callable[[], T_Result],
- line_items_contact_account_accounting_period: typing.Callable[[], T_Result],
- line_items_contact_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories: typing.Callable[[], T_Result],
- line_items_tracking_categories_account: typing.Callable[[], T_Result],
- line_items_tracking_categories_account_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_account: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_account_accounting_period: typing.Callable[[], T_Result],
- line_items_tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_account: typing.Callable[[], T_Result],
- tracking_categories_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact: typing.Callable[[], T_Result],
- tracking_categories_contact_account: typing.Callable[[], T_Result],
- tracking_categories_contact_account_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_contact_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TransactionsRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is TransactionsRetrieveRequestExpand.ACCOUNT_ACCOUNTING_PERIOD:
- return account_accounting_period()
- if self is TransactionsRetrieveRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is TransactionsRetrieveRequestExpand.CONTACT:
- return contact()
- if self is TransactionsRetrieveRequestExpand.CONTACT_ACCOUNT:
- return contact_account()
- if self is TransactionsRetrieveRequestExpand.CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return contact_account_accounting_period()
- if self is TransactionsRetrieveRequestExpand.CONTACT_ACCOUNTING_PERIOD:
- return contact_accounting_period()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS:
- return line_items()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_ACCOUNT:
- return line_items_account()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_ACCOUNT_ACCOUNTING_PERIOD:
- return line_items_account_accounting_period()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_ACCOUNTING_PERIOD:
- return line_items_accounting_period()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_CONTACT:
- return line_items_contact()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_CONTACT_ACCOUNT:
- return line_items_contact_account()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return line_items_contact_account_accounting_period()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_CONTACT_ACCOUNTING_PERIOD:
- return line_items_contact_accounting_period()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES:
- return line_items_tracking_categories()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNT:
- return line_items_tracking_categories_account()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_account_accounting_period()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_accounting_period()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT:
- return line_items_tracking_categories_contact()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNT:
- return line_items_tracking_categories_contact_account()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_account_accounting_period()
- if self is TransactionsRetrieveRequestExpand.LINE_ITEMS_TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return line_items_tracking_categories_contact_accounting_period()
- if self is TransactionsRetrieveRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is TransactionsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT:
- return tracking_categories_account()
- if self is TransactionsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_account_accounting_period()
- if self is TransactionsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is TransactionsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT:
- return tracking_categories_contact()
- if self is TransactionsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT:
- return tracking_categories_contact_account()
- if self is TransactionsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_account_accounting_period()
- if self is TransactionsRetrieveRequestExpand.TRACKING_CATEGORIES_CONTACT_ACCOUNTING_PERIOD:
- return tracking_categories_contact_accounting_period()
+TransactionsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,accounting_period",
+ "accounting_period",
+ "contact",
+ "contact,account",
+ "contact,account,accounting_period",
+ "contact,accounting_period",
+ "line_items",
+ "line_items,account",
+ "line_items,account,accounting_period",
+ "line_items,accounting_period",
+ "line_items,contact",
+ "line_items,contact,account",
+ "line_items,contact,account,accounting_period",
+ "line_items,contact,accounting_period",
+ "line_items,tracking_categories",
+ "line_items,tracking_categories,account",
+ "line_items,tracking_categories,account,accounting_period",
+ "line_items,tracking_categories,accounting_period",
+ "line_items,tracking_categories,contact",
+ "line_items,tracking_categories,contact,account",
+ "line_items,tracking_categories,contact,account,accounting_period",
+ "line_items,tracking_categories,contact,accounting_period",
+ "tracking_categories",
+ "tracking_categories,account",
+ "tracking_categories,account,accounting_period",
+ "tracking_categories,accounting_period",
+ "tracking_categories,contact",
+ "tracking_categories,contact,account",
+ "tracking_categories,contact,account,accounting_period",
+ "tracking_categories,contact,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/vendor_credits/client.py b/src/merge/resources/accounting/resources/vendor_credits/client.py
index fb507d55..b6a9dd2d 100644
--- a/src/merge/resources/accounting/resources/vendor_credits/client.py
+++ b/src/merge/resources/accounting/resources/vendor_credits/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.vendor_credits_list_request_expand import VendorCreditsListRequestExpand
from .....core.request_options import RequestOptions
from ...types.paginated_vendor_credit_list import PaginatedVendorCreditList
-from ...types.vendor_credit import VendorCredit
-from .types.vendor_credits_list_request_expand import VendorCreditsListRequestExpand
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.vendor_credits_retrieve_request_expand import VendorCreditsRetrieveRequestExpand
+from ...types.vendor_credit import VendorCredit
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class VendorCreditsClient:
@@ -30,6 +30,7 @@ def list(
expand: typing.Optional[VendorCreditsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -59,11 +60,14 @@ def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -92,7 +96,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -111,6 +115,7 @@ def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -124,9 +129,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedVendorCreditList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedVendorCreditList,
+ parse_obj_as(
+ type_=PaginatedVendorCreditList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -163,7 +174,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -176,12 +187,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"accounting/v1/vendor-credits/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(VendorCredit, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ VendorCredit,
+ parse_obj_as(
+ type_=VendorCredit, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -202,6 +222,7 @@ async def list(
expand: typing.Optional[VendorCreditsListRequestExpand] = None,
include_deleted_data: typing.Optional[bool] = None,
include_remote_data: typing.Optional[bool] = None,
+ include_shell_data: typing.Optional[bool] = None,
modified_after: typing.Optional[dt.datetime] = None,
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
@@ -231,11 +252,14 @@ async def list(
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data : typing.Optional[bool]
- Whether to include data that was marked as deleted by third party webhooks.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_data : typing.Optional[bool]
Whether to include the original data Merge fetched from the third-party to produce these models.
+ include_shell_data : typing.Optional[bool]
+ Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+
modified_after : typing.Optional[dt.datetime]
If provided, only objects synced by Merge after this date time will be returned.
@@ -264,13 +288,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.vendor_credits.list()
+
+
+ async def main() -> None:
+ await client.accounting.vendor_credits.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/vendor-credits",
@@ -283,6 +315,7 @@ async def list(
"expand": expand,
"include_deleted_data": include_deleted_data,
"include_remote_data": include_remote_data,
+ "include_shell_data": include_shell_data,
"modified_after": serialize_datetime(modified_after) if modified_after is not None else None,
"modified_before": serialize_datetime(modified_before) if modified_before is not None else None,
"page_size": page_size,
@@ -296,9 +329,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedVendorCreditList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedVendorCreditList,
+ parse_obj_as(
+ type_=PaginatedVendorCreditList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -335,25 +374,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.vendor_credits.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.accounting.vendor_credits.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"accounting/v1/vendor-credits/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(VendorCredit, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ VendorCredit,
+ parse_obj_as(
+ type_=VendorCredit, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/resources/vendor_credits/types/vendor_credits_list_request_expand.py b/src/merge/resources/accounting/resources/vendor_credits/types/vendor_credits_list_request_expand.py
index 675c95e9..ecc94097 100644
--- a/src/merge/resources/accounting/resources/vendor_credits/types/vendor_credits_list_request_expand.py
+++ b/src/merge/resources/accounting/resources/vendor_credits/types/vendor_credits_list_request_expand.py
@@ -1,139 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class VendorCreditsListRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- LINES = "lines"
- LINES_ACCOUNTING_PERIOD = "lines,accounting_period"
- LINES_COMPANY = "lines,company"
- LINES_COMPANY_ACCOUNTING_PERIOD = "lines,company,accounting_period"
- LINES_TRACKING_CATEGORIES = "lines,tracking_categories"
- LINES_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "lines,tracking_categories,accounting_period"
- LINES_TRACKING_CATEGORIES_COMPANY = "lines,tracking_categories,company"
- LINES_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "lines,tracking_categories,company,accounting_period"
- LINES_TRACKING_CATEGORIES_VENDOR = "lines,tracking_categories,vendor"
- LINES_TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD = "lines,tracking_categories,vendor,accounting_period"
- LINES_TRACKING_CATEGORIES_VENDOR_COMPANY = "lines,tracking_categories,vendor,company"
- LINES_TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "lines,tracking_categories,vendor,company,accounting_period"
- )
- LINES_VENDOR = "lines,vendor"
- LINES_VENDOR_ACCOUNTING_PERIOD = "lines,vendor,accounting_period"
- LINES_VENDOR_COMPANY = "lines,vendor,company"
- LINES_VENDOR_COMPANY_ACCOUNTING_PERIOD = "lines,vendor,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_VENDOR = "tracking_categories,vendor"
- TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD = "tracking_categories,vendor,accounting_period"
- TRACKING_CATEGORIES_VENDOR_COMPANY = "tracking_categories,vendor,company"
- TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,vendor,company,accounting_period"
- VENDOR = "vendor"
- VENDOR_ACCOUNTING_PERIOD = "vendor,accounting_period"
- VENDOR_COMPANY = "vendor,company"
- VENDOR_COMPANY_ACCOUNTING_PERIOD = "vendor,company,accounting_period"
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- lines: typing.Callable[[], T_Result],
- lines_accounting_period: typing.Callable[[], T_Result],
- lines_company: typing.Callable[[], T_Result],
- lines_company_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories: typing.Callable[[], T_Result],
- lines_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories_company: typing.Callable[[], T_Result],
- lines_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories_vendor: typing.Callable[[], T_Result],
- lines_tracking_categories_vendor_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories_vendor_company: typing.Callable[[], T_Result],
- lines_tracking_categories_vendor_company_accounting_period: typing.Callable[[], T_Result],
- lines_vendor: typing.Callable[[], T_Result],
- lines_vendor_accounting_period: typing.Callable[[], T_Result],
- lines_vendor_company: typing.Callable[[], T_Result],
- lines_vendor_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_vendor: typing.Callable[[], T_Result],
- tracking_categories_vendor_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_vendor_company: typing.Callable[[], T_Result],
- tracking_categories_vendor_company_accounting_period: typing.Callable[[], T_Result],
- vendor: typing.Callable[[], T_Result],
- vendor_accounting_period: typing.Callable[[], T_Result],
- vendor_company: typing.Callable[[], T_Result],
- vendor_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is VendorCreditsListRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is VendorCreditsListRequestExpand.COMPANY:
- return company()
- if self is VendorCreditsListRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is VendorCreditsListRequestExpand.LINES:
- return lines()
- if self is VendorCreditsListRequestExpand.LINES_ACCOUNTING_PERIOD:
- return lines_accounting_period()
- if self is VendorCreditsListRequestExpand.LINES_COMPANY:
- return lines_company()
- if self is VendorCreditsListRequestExpand.LINES_COMPANY_ACCOUNTING_PERIOD:
- return lines_company_accounting_period()
- if self is VendorCreditsListRequestExpand.LINES_TRACKING_CATEGORIES:
- return lines_tracking_categories()
- if self is VendorCreditsListRequestExpand.LINES_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return lines_tracking_categories_accounting_period()
- if self is VendorCreditsListRequestExpand.LINES_TRACKING_CATEGORIES_COMPANY:
- return lines_tracking_categories_company()
- if self is VendorCreditsListRequestExpand.LINES_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return lines_tracking_categories_company_accounting_period()
- if self is VendorCreditsListRequestExpand.LINES_TRACKING_CATEGORIES_VENDOR:
- return lines_tracking_categories_vendor()
- if self is VendorCreditsListRequestExpand.LINES_TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD:
- return lines_tracking_categories_vendor_accounting_period()
- if self is VendorCreditsListRequestExpand.LINES_TRACKING_CATEGORIES_VENDOR_COMPANY:
- return lines_tracking_categories_vendor_company()
- if self is VendorCreditsListRequestExpand.LINES_TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return lines_tracking_categories_vendor_company_accounting_period()
- if self is VendorCreditsListRequestExpand.LINES_VENDOR:
- return lines_vendor()
- if self is VendorCreditsListRequestExpand.LINES_VENDOR_ACCOUNTING_PERIOD:
- return lines_vendor_accounting_period()
- if self is VendorCreditsListRequestExpand.LINES_VENDOR_COMPANY:
- return lines_vendor_company()
- if self is VendorCreditsListRequestExpand.LINES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return lines_vendor_company_accounting_period()
- if self is VendorCreditsListRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is VendorCreditsListRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is VendorCreditsListRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is VendorCreditsListRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is VendorCreditsListRequestExpand.TRACKING_CATEGORIES_VENDOR:
- return tracking_categories_vendor()
- if self is VendorCreditsListRequestExpand.TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD:
- return tracking_categories_vendor_accounting_period()
- if self is VendorCreditsListRequestExpand.TRACKING_CATEGORIES_VENDOR_COMPANY:
- return tracking_categories_vendor_company()
- if self is VendorCreditsListRequestExpand.TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_vendor_company_accounting_period()
- if self is VendorCreditsListRequestExpand.VENDOR:
- return vendor()
- if self is VendorCreditsListRequestExpand.VENDOR_ACCOUNTING_PERIOD:
- return vendor_accounting_period()
- if self is VendorCreditsListRequestExpand.VENDOR_COMPANY:
- return vendor_company()
- if self is VendorCreditsListRequestExpand.VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return vendor_company_accounting_period()
+VendorCreditsListRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "company",
+ "company,accounting_period",
+ "lines",
+ "lines,accounting_period",
+ "lines,company",
+ "lines,company,accounting_period",
+ "lines,tracking_categories",
+ "lines,tracking_categories,accounting_period",
+ "lines,tracking_categories,company",
+ "lines,tracking_categories,company,accounting_period",
+ "lines,tracking_categories,vendor",
+ "lines,tracking_categories,vendor,accounting_period",
+ "lines,tracking_categories,vendor,company",
+ "lines,tracking_categories,vendor,company,accounting_period",
+ "lines,vendor",
+ "lines,vendor,accounting_period",
+ "lines,vendor,company",
+ "lines,vendor,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,vendor",
+ "tracking_categories,vendor,accounting_period",
+ "tracking_categories,vendor,company",
+ "tracking_categories,vendor,company,accounting_period",
+ "vendor",
+ "vendor,accounting_period",
+ "vendor,company",
+ "vendor,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/vendor_credits/types/vendor_credits_retrieve_request_expand.py b/src/merge/resources/accounting/resources/vendor_credits/types/vendor_credits_retrieve_request_expand.py
index a6288272..5e47c690 100644
--- a/src/merge/resources/accounting/resources/vendor_credits/types/vendor_credits_retrieve_request_expand.py
+++ b/src/merge/resources/accounting/resources/vendor_credits/types/vendor_credits_retrieve_request_expand.py
@@ -1,139 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class VendorCreditsRetrieveRequestExpand(str, enum.Enum):
- ACCOUNTING_PERIOD = "accounting_period"
- COMPANY = "company"
- COMPANY_ACCOUNTING_PERIOD = "company,accounting_period"
- LINES = "lines"
- LINES_ACCOUNTING_PERIOD = "lines,accounting_period"
- LINES_COMPANY = "lines,company"
- LINES_COMPANY_ACCOUNTING_PERIOD = "lines,company,accounting_period"
- LINES_TRACKING_CATEGORIES = "lines,tracking_categories"
- LINES_TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "lines,tracking_categories,accounting_period"
- LINES_TRACKING_CATEGORIES_COMPANY = "lines,tracking_categories,company"
- LINES_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "lines,tracking_categories,company,accounting_period"
- LINES_TRACKING_CATEGORIES_VENDOR = "lines,tracking_categories,vendor"
- LINES_TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD = "lines,tracking_categories,vendor,accounting_period"
- LINES_TRACKING_CATEGORIES_VENDOR_COMPANY = "lines,tracking_categories,vendor,company"
- LINES_TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD = (
- "lines,tracking_categories,vendor,company,accounting_period"
- )
- LINES_VENDOR = "lines,vendor"
- LINES_VENDOR_ACCOUNTING_PERIOD = "lines,vendor,accounting_period"
- LINES_VENDOR_COMPANY = "lines,vendor,company"
- LINES_VENDOR_COMPANY_ACCOUNTING_PERIOD = "lines,vendor,company,accounting_period"
- TRACKING_CATEGORIES = "tracking_categories"
- TRACKING_CATEGORIES_ACCOUNTING_PERIOD = "tracking_categories,accounting_period"
- TRACKING_CATEGORIES_COMPANY = "tracking_categories,company"
- TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,company,accounting_period"
- TRACKING_CATEGORIES_VENDOR = "tracking_categories,vendor"
- TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD = "tracking_categories,vendor,accounting_period"
- TRACKING_CATEGORIES_VENDOR_COMPANY = "tracking_categories,vendor,company"
- TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD = "tracking_categories,vendor,company,accounting_period"
- VENDOR = "vendor"
- VENDOR_ACCOUNTING_PERIOD = "vendor,accounting_period"
- VENDOR_COMPANY = "vendor,company"
- VENDOR_COMPANY_ACCOUNTING_PERIOD = "vendor,company,accounting_period"
-
- def visit(
- self,
- accounting_period: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- company_accounting_period: typing.Callable[[], T_Result],
- lines: typing.Callable[[], T_Result],
- lines_accounting_period: typing.Callable[[], T_Result],
- lines_company: typing.Callable[[], T_Result],
- lines_company_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories: typing.Callable[[], T_Result],
- lines_tracking_categories_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories_company: typing.Callable[[], T_Result],
- lines_tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories_vendor: typing.Callable[[], T_Result],
- lines_tracking_categories_vendor_accounting_period: typing.Callable[[], T_Result],
- lines_tracking_categories_vendor_company: typing.Callable[[], T_Result],
- lines_tracking_categories_vendor_company_accounting_period: typing.Callable[[], T_Result],
- lines_vendor: typing.Callable[[], T_Result],
- lines_vendor_accounting_period: typing.Callable[[], T_Result],
- lines_vendor_company: typing.Callable[[], T_Result],
- lines_vendor_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories: typing.Callable[[], T_Result],
- tracking_categories_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_company: typing.Callable[[], T_Result],
- tracking_categories_company_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_vendor: typing.Callable[[], T_Result],
- tracking_categories_vendor_accounting_period: typing.Callable[[], T_Result],
- tracking_categories_vendor_company: typing.Callable[[], T_Result],
- tracking_categories_vendor_company_accounting_period: typing.Callable[[], T_Result],
- vendor: typing.Callable[[], T_Result],
- vendor_accounting_period: typing.Callable[[], T_Result],
- vendor_company: typing.Callable[[], T_Result],
- vendor_company_accounting_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is VendorCreditsRetrieveRequestExpand.ACCOUNTING_PERIOD:
- return accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.COMPANY:
- return company()
- if self is VendorCreditsRetrieveRequestExpand.COMPANY_ACCOUNTING_PERIOD:
- return company_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.LINES:
- return lines()
- if self is VendorCreditsRetrieveRequestExpand.LINES_ACCOUNTING_PERIOD:
- return lines_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.LINES_COMPANY:
- return lines_company()
- if self is VendorCreditsRetrieveRequestExpand.LINES_COMPANY_ACCOUNTING_PERIOD:
- return lines_company_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.LINES_TRACKING_CATEGORIES:
- return lines_tracking_categories()
- if self is VendorCreditsRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return lines_tracking_categories_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_COMPANY:
- return lines_tracking_categories_company()
- if self is VendorCreditsRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return lines_tracking_categories_company_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_VENDOR:
- return lines_tracking_categories_vendor()
- if self is VendorCreditsRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD:
- return lines_tracking_categories_vendor_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_VENDOR_COMPANY:
- return lines_tracking_categories_vendor_company()
- if self is VendorCreditsRetrieveRequestExpand.LINES_TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return lines_tracking_categories_vendor_company_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.LINES_VENDOR:
- return lines_vendor()
- if self is VendorCreditsRetrieveRequestExpand.LINES_VENDOR_ACCOUNTING_PERIOD:
- return lines_vendor_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.LINES_VENDOR_COMPANY:
- return lines_vendor_company()
- if self is VendorCreditsRetrieveRequestExpand.LINES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return lines_vendor_company_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.TRACKING_CATEGORIES:
- return tracking_categories()
- if self is VendorCreditsRetrieveRequestExpand.TRACKING_CATEGORIES_ACCOUNTING_PERIOD:
- return tracking_categories_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY:
- return tracking_categories_company()
- if self is VendorCreditsRetrieveRequestExpand.TRACKING_CATEGORIES_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_company_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.TRACKING_CATEGORIES_VENDOR:
- return tracking_categories_vendor()
- if self is VendorCreditsRetrieveRequestExpand.TRACKING_CATEGORIES_VENDOR_ACCOUNTING_PERIOD:
- return tracking_categories_vendor_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.TRACKING_CATEGORIES_VENDOR_COMPANY:
- return tracking_categories_vendor_company()
- if self is VendorCreditsRetrieveRequestExpand.TRACKING_CATEGORIES_VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return tracking_categories_vendor_company_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.VENDOR:
- return vendor()
- if self is VendorCreditsRetrieveRequestExpand.VENDOR_ACCOUNTING_PERIOD:
- return vendor_accounting_period()
- if self is VendorCreditsRetrieveRequestExpand.VENDOR_COMPANY:
- return vendor_company()
- if self is VendorCreditsRetrieveRequestExpand.VENDOR_COMPANY_ACCOUNTING_PERIOD:
- return vendor_company_accounting_period()
+VendorCreditsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "accounting_period",
+ "company",
+ "company,accounting_period",
+ "lines",
+ "lines,accounting_period",
+ "lines,company",
+ "lines,company,accounting_period",
+ "lines,tracking_categories",
+ "lines,tracking_categories,accounting_period",
+ "lines,tracking_categories,company",
+ "lines,tracking_categories,company,accounting_period",
+ "lines,tracking_categories,vendor",
+ "lines,tracking_categories,vendor,accounting_period",
+ "lines,tracking_categories,vendor,company",
+ "lines,tracking_categories,vendor,company,accounting_period",
+ "lines,vendor",
+ "lines,vendor,accounting_period",
+ "lines,vendor,company",
+ "lines,vendor,company,accounting_period",
+ "tracking_categories",
+ "tracking_categories,accounting_period",
+ "tracking_categories,company",
+ "tracking_categories,company,accounting_period",
+ "tracking_categories,vendor",
+ "tracking_categories,vendor,accounting_period",
+ "tracking_categories,vendor,company",
+ "tracking_categories,vendor,company,accounting_period",
+ "vendor",
+ "vendor,accounting_period",
+ "vendor,company",
+ "vendor,company,accounting_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/resources/webhook_receivers/client.py b/src/merge/resources/accounting/resources/webhook_receivers/client.py
index 10025f02..1d0d5e86 100644
--- a/src/merge/resources/accounting/resources/webhook_receivers/client.py
+++ b/src/merge/resources/accounting/resources/webhook_receivers/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.webhook_receiver import WebhookReceiver
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -33,7 +33,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -42,11 +42,19 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
client.accounting.webhook_receivers.list()
"""
_response = self._client_wrapper.httpx_client.request(
- "accounting/v1/webhook-receivers", method="GET", request_options=request_options
+ "accounting/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -58,7 +66,7 @@ def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -81,7 +89,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -95,13 +103,23 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"accounting/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -128,20 +146,36 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None)
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.webhook_receivers.list()
+
+
+ async def main() -> None:
+ await client.accounting.webhook_receivers.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "accounting/v1/webhook-receivers", method="GET", request_options=request_options
+ "accounting/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,7 +187,7 @@ async def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -176,27 +210,45 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.accounting.webhook_receivers.create(
- event="event",
- is_active=True,
- )
+
+
+ async def main() -> None:
+ await client.accounting.webhook_receivers.create(
+ event="event",
+ is_active=True,
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"accounting/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/accounting/types/__init__.py b/src/merge/resources/accounting/types/__init__.py
index d1510af9..9a5b2b7b 100644
--- a/src/merge/resources/accounting/types/__init__.py
+++ b/src/merge/resources/accounting/types/__init__.py
@@ -51,6 +51,7 @@
from .common_model_scopes_body_request import CommonModelScopesBodyRequest
from .company_info import CompanyInfo
from .company_info_currency import CompanyInfoCurrency
+from .component_type_enum import ComponentTypeEnum
from .contact import Contact
from .contact_addresses_item import ContactAddressesItem
from .contact_request import ContactRequest
@@ -111,6 +112,7 @@
from .expense_tracking_categories_item import ExpenseTrackingCategoriesItem
from .external_target_field_api import ExternalTargetFieldApi
from .external_target_field_api_response import ExternalTargetFieldApiResponse
+from .field_format_enum import FieldFormatEnum
from .field_mapping_api_instance import FieldMappingApiInstance
from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
from .field_mapping_api_instance_remote_field_remote_endpoint_info import (
@@ -121,6 +123,7 @@
from .field_mapping_instance_response import FieldMappingInstanceResponse
from .field_permission_deserializer import FieldPermissionDeserializer
from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
+from .field_type_enum import FieldTypeEnum
from .income_statement import IncomeStatement
from .income_statement_company import IncomeStatementCompany
from .income_statement_currency import IncomeStatementCurrency
@@ -166,9 +169,14 @@
from .issue_status_enum import IssueStatusEnum
from .item import Item
from .item_company import ItemCompany
+from .item_format_enum import ItemFormatEnum
from .item_purchase_account import ItemPurchaseAccount
+from .item_purchase_tax_rate import ItemPurchaseTaxRate
from .item_sales_account import ItemSalesAccount
+from .item_sales_tax_rate import ItemSalesTaxRate
+from .item_schema import ItemSchema
from .item_status import ItemStatus
+from .item_type_enum import ItemTypeEnum
from .journal_entry import JournalEntry
from .journal_entry_accounting_period import JournalEntryAccountingPeriod
from .journal_entry_applied_payments_item import JournalEntryAppliedPaymentsItem
@@ -194,6 +202,7 @@
from .journal_line_request_tracking_category import JournalLineRequestTrackingCategory
from .journal_line_tracking_categories_item import JournalLineTrackingCategoriesItem
from .journal_line_tracking_category import JournalLineTrackingCategory
+from .language_enum import LanguageEnum
from .link_token import LinkToken
from .linked_account_status import LinkedAccountStatus
from .meta_response import MetaResponse
@@ -221,6 +230,7 @@
from .paginated_journal_entry_list import PaginatedJournalEntryList
from .paginated_payment_list import PaginatedPaymentList
from .paginated_purchase_order_list import PaginatedPurchaseOrderList
+from .paginated_remote_field_class_list import PaginatedRemoteFieldClassList
from .paginated_sync_status_list import PaginatedSyncStatusList
from .paginated_tax_rate_list import PaginatedTaxRateList
from .paginated_tracking_category_list import PaginatedTrackingCategoryList
@@ -283,9 +293,13 @@
from .purchase_order_vendor import PurchaseOrderVendor
from .remote_data import RemoteData
from .remote_endpoint_info import RemoteEndpointInfo
+from .remote_field import RemoteField
from .remote_field_api import RemoteFieldApi
from .remote_field_api_coverage import RemoteFieldApiCoverage
from .remote_field_api_response import RemoteFieldApiResponse
+from .remote_field_class import RemoteFieldClass
+from .remote_field_request import RemoteFieldRequest
+from .remote_field_request_remote_field_class import RemoteFieldRequestRemoteFieldClass
from .remote_key import RemoteKey
from .remote_response import RemoteResponse
from .report_item import ReportItem
@@ -296,8 +310,12 @@
from .status_7_d_1_enum import Status7D1Enum
from .sync_status import SyncStatus
from .sync_status_status_enum import SyncStatusStatusEnum
+from .tax_component import TaxComponent
+from .tax_component_component_type import TaxComponentComponentType
from .tax_rate import TaxRate
from .tax_rate_company import TaxRateCompany
+from .tax_rate_status import TaxRateStatus
+from .tax_rate_tax_components_item import TaxRateTaxComponentsItem
from .tracking_category import TrackingCategory
from .tracking_category_category_type import TrackingCategoryCategoryType
from .tracking_category_company import TrackingCategoryCompany
@@ -375,6 +393,7 @@
"CommonModelScopesBodyRequest",
"CompanyInfo",
"CompanyInfoCurrency",
+ "ComponentTypeEnum",
"Contact",
"ContactAddressesItem",
"ContactRequest",
@@ -435,6 +454,7 @@
"ExpenseTrackingCategoriesItem",
"ExternalTargetFieldApi",
"ExternalTargetFieldApiResponse",
+ "FieldFormatEnum",
"FieldMappingApiInstance",
"FieldMappingApiInstanceRemoteField",
"FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo",
@@ -443,6 +463,7 @@
"FieldMappingInstanceResponse",
"FieldPermissionDeserializer",
"FieldPermissionDeserializerRequest",
+ "FieldTypeEnum",
"IncomeStatement",
"IncomeStatementCompany",
"IncomeStatementCurrency",
@@ -488,9 +509,14 @@
"IssueStatusEnum",
"Item",
"ItemCompany",
+ "ItemFormatEnum",
"ItemPurchaseAccount",
+ "ItemPurchaseTaxRate",
"ItemSalesAccount",
+ "ItemSalesTaxRate",
+ "ItemSchema",
"ItemStatus",
+ "ItemTypeEnum",
"JournalEntry",
"JournalEntryAccountingPeriod",
"JournalEntryAppliedPaymentsItem",
@@ -516,6 +542,7 @@
"JournalLineRequestTrackingCategory",
"JournalLineTrackingCategoriesItem",
"JournalLineTrackingCategory",
+ "LanguageEnum",
"LinkToken",
"LinkedAccountStatus",
"MetaResponse",
@@ -543,6 +570,7 @@
"PaginatedJournalEntryList",
"PaginatedPaymentList",
"PaginatedPurchaseOrderList",
+ "PaginatedRemoteFieldClassList",
"PaginatedSyncStatusList",
"PaginatedTaxRateList",
"PaginatedTrackingCategoryList",
@@ -605,9 +633,13 @@
"PurchaseOrderVendor",
"RemoteData",
"RemoteEndpointInfo",
+ "RemoteField",
"RemoteFieldApi",
"RemoteFieldApiCoverage",
"RemoteFieldApiResponse",
+ "RemoteFieldClass",
+ "RemoteFieldRequest",
+ "RemoteFieldRequestRemoteFieldClass",
"RemoteKey",
"RemoteResponse",
"ReportItem",
@@ -618,8 +650,12 @@
"Status7D1Enum",
"SyncStatus",
"SyncStatusStatusEnum",
+ "TaxComponent",
+ "TaxComponentComponentType",
"TaxRate",
"TaxRateCompany",
+ "TaxRateStatus",
+ "TaxRateTaxComponentsItem",
"TrackingCategory",
"TrackingCategoryCategoryType",
"TrackingCategoryCompany",
diff --git a/src/merge/resources/accounting/types/account.py b/src/merge/resources/accounting/types/account.py
index c983b39b..bb527945 100644
--- a/src/merge/resources/accounting/types/account.py
+++ b/src/merge/resources/accounting/types/account.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .account_classification import AccountClassification
-from .account_currency import AccountCurrency
from .account_status import AccountStatus
+from .account_currency import AccountCurrency
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Account(pydantic_v1.BaseModel):
+class Account(UniversalBaseModel):
"""
# The Account Object
@@ -33,32 +33,32 @@ class Account(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The account's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The account's description.
"""
- classification: typing.Optional[AccountClassification] = pydantic_v1.Field()
+ classification: typing.Optional[AccountClassification] = pydantic.Field()
"""
The account's broadest grouping.
@@ -69,12 +69,12 @@ class Account(pydantic_v1.BaseModel):
- `REVENUE` - REVENUE
"""
- type: typing.Optional[str] = pydantic_v1.Field()
+ type: typing.Optional[str] = pydantic.Field()
"""
The account's type is a narrower and more specific grouping within the account's classification.
"""
- status: typing.Optional[AccountStatus] = pydantic_v1.Field()
+ status: typing.Optional[AccountStatus] = pydantic.Field()
"""
The account's status.
@@ -83,12 +83,12 @@ class Account(pydantic_v1.BaseModel):
- `INACTIVE` - INACTIVE
"""
- current_balance: typing.Optional[float] = pydantic_v1.Field()
+ current_balance: typing.Optional[float] = pydantic.Field()
"""
The account's current balance.
"""
- currency: typing.Optional[AccountCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[AccountCurrency] = pydantic.Field()
"""
The account's currency.
@@ -400,43 +400,34 @@ class Account(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- account_number: typing.Optional[str] = pydantic_v1.Field()
+ account_number: typing.Optional[str] = pydantic.Field()
"""
The account's number.
"""
- parent_account: typing.Optional[str] = pydantic_v1.Field()
+ parent_account: typing.Optional[str] = pydantic.Field()
"""
ID of the parent account.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the account belongs to.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/account_classification.py b/src/merge/resources/accounting/types/account_classification.py
index 9d99b731..50a75990 100644
--- a/src/merge/resources/accounting/types/account_classification.py
+++ b/src/merge/resources/accounting/types/account_classification.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .classification_enum import ClassificationEnum
AccountClassification = typing.Union[ClassificationEnum, str]
diff --git a/src/merge/resources/accounting/types/account_currency.py b/src/merge/resources/accounting/types/account_currency.py
index f8164b58..779c5a8d 100644
--- a/src/merge/resources/accounting/types/account_currency.py
+++ b/src/merge/resources/accounting/types/account_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
AccountCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/account_details.py b/src/merge/resources/accounting/types/account_details.py
index 81f9587b..dc91a6f3 100644
--- a/src/merge/resources/accounting/types/account_details.py
+++ b/src/merge/resources/accounting/types/account_details.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .category_enum import CategoryEnum
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetails(pydantic_v1.BaseModel):
+class AccountDetails(UniversalBaseModel):
id: typing.Optional[str]
integration: typing.Optional[str]
integration_slug: typing.Optional[str]
@@ -18,27 +18,22 @@ class AccountDetails(pydantic_v1.BaseModel):
end_user_email_address: typing.Optional[str]
status: typing.Optional[str]
webhook_listener_url: typing.Optional[str]
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
account_type: typing.Optional[str]
+ completed_at: typing.Optional[dt.datetime] = pydantic.Field()
+ """
+ The time at which account completes the linking flow.
+ """
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/account_details_and_actions.py b/src/merge/resources/accounting/types/account_details_and_actions.py
index 6a1b2874..30e78b61 100644
--- a/src/merge/resources/accounting/types/account_details_and_actions.py
+++ b/src/merge/resources/accounting/types/account_details_and_actions.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
-from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
from .category_enum import CategoryEnum
+from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
+import pydantic
+from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetailsAndActions(pydantic_v1.BaseModel):
+class AccountDetailsAndActions(UniversalBaseModel):
"""
# The LinkedAccount Object
@@ -30,34 +30,26 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
end_user_origin_id: typing.Optional[str]
end_user_organization_name: str
end_user_email_address: str
- subdomain: typing.Optional[str] = pydantic_v1.Field()
+ subdomain: typing.Optional[str] = pydantic.Field()
"""
The tenant or domain the customer has provided access to.
"""
webhook_listener_url: str
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
integration: typing.Optional[AccountDetailsAndActionsIntegration]
account_type: str
+ completed_at: dt.datetime
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/account_details_and_actions_integration.py b/src/merge/resources/accounting/types/account_details_and_actions_integration.py
index 7c300a2b..5779ac5b 100644
--- a/src/merge/resources/accounting/types/account_details_and_actions_integration.py
+++ b/src/merge/resources/accounting/types/account_details_and_actions_integration.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
+class AccountDetailsAndActionsIntegration(UniversalBaseModel):
name: str
categories: typing.List[CategoriesEnum]
image: typing.Optional[str]
@@ -19,20 +18,11 @@ class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/account_details_and_actions_status_enum.py b/src/merge/resources/accounting/types/account_details_and_actions_status_enum.py
index a904e550..38e5d430 100644
--- a/src/merge/resources/accounting/types/account_details_and_actions_status_enum.py
+++ b/src/merge/resources/accounting/types/account_details_and_actions_status_enum.py
@@ -1,31 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountDetailsAndActionsStatusEnum(str, enum.Enum):
- """
- - `COMPLETE` - COMPLETE
- - `INCOMPLETE` - INCOMPLETE
- - `RELINK_NEEDED` - RELINK_NEEDED
- """
-
- COMPLETE = "COMPLETE"
- INCOMPLETE = "INCOMPLETE"
- RELINK_NEEDED = "RELINK_NEEDED"
-
- def visit(
- self,
- complete: typing.Callable[[], T_Result],
- incomplete: typing.Callable[[], T_Result],
- relink_needed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountDetailsAndActionsStatusEnum.COMPLETE:
- return complete()
- if self is AccountDetailsAndActionsStatusEnum.INCOMPLETE:
- return incomplete()
- if self is AccountDetailsAndActionsStatusEnum.RELINK_NEEDED:
- return relink_needed()
+AccountDetailsAndActionsStatusEnum = typing.Union[
+ typing.Literal["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", "IDLE"], typing.Any
+]
diff --git a/src/merge/resources/accounting/types/account_integration.py b/src/merge/resources/accounting/types/account_integration.py
index 57006e35..2d18dedb 100644
--- a/src/merge/resources/accounting/types/account_integration.py
+++ b/src/merge/resources/accounting/types/account_integration.py
@@ -1,69 +1,66 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountIntegration(pydantic_v1.BaseModel):
- name: str = pydantic_v1.Field()
+class AccountIntegration(UniversalBaseModel):
+ name: str = pydantic.Field()
"""
Company name.
"""
- categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic_v1.Field()
+ abbreviated_name: typing.Optional[str] = pydantic.Field()
+ """
+ Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).
Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)
+ """
+
+ categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic.Field()
"""
Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].
"""
- image: typing.Optional[str] = pydantic_v1.Field()
+ image: typing.Optional[str] = pydantic.Field()
"""
- Company logo in rectangular shape. Upload an image with a clear background.
+ Company logo in rectangular shape.
"""
- square_image: typing.Optional[str] = pydantic_v1.Field()
+ square_image: typing.Optional[str] = pydantic.Field()
"""
- Company logo in square shape. Upload an image with a white background.
+ Company logo in square shape.
"""
- color: typing.Optional[str] = pydantic_v1.Field()
+ color: typing.Optional[str] = pydantic.Field()
"""
The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color.
"""
slug: typing.Optional[str]
- api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = (
+ pydantic.Field()
+ )
"""
Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}
"""
- webhook_setup_guide_url: typing.Optional[str] = pydantic_v1.Field()
+ webhook_setup_guide_url: typing.Optional[str] = pydantic.Field()
"""
Setup guide URL for third party webhook creation. Exposed in Merge Docs.
"""
- category_beta_status: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ category_beta_status: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
Category or categories this integration is in beta status for.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/account_request.py b/src/merge/resources/accounting/types/account_request.py
index ad855d9e..0c6e0f15 100644
--- a/src/merge/resources/accounting/types/account_request.py
+++ b/src/merge/resources/accounting/types/account_request.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .account_request_classification import AccountRequestClassification
-from .account_request_currency import AccountRequestCurrency
from .account_request_status import AccountRequestStatus
+from .account_request_currency import AccountRequestCurrency
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountRequest(pydantic_v1.BaseModel):
+class AccountRequest(UniversalBaseModel):
"""
# The Account Object
@@ -31,17 +30,17 @@ class AccountRequest(pydantic_v1.BaseModel):
Fetch from the `LIST Accounts` endpoint and view a company's accounts.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The account's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The account's description.
"""
- classification: typing.Optional[AccountRequestClassification] = pydantic_v1.Field()
+ classification: typing.Optional[AccountRequestClassification] = pydantic.Field()
"""
The account's broadest grouping.
@@ -52,12 +51,12 @@ class AccountRequest(pydantic_v1.BaseModel):
- `REVENUE` - REVENUE
"""
- type: typing.Optional[str] = pydantic_v1.Field()
+ type: typing.Optional[str] = pydantic.Field()
"""
The account's type is a narrower and more specific grouping within the account's classification.
"""
- status: typing.Optional[AccountRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[AccountRequestStatus] = pydantic.Field()
"""
The account's status.
@@ -66,12 +65,12 @@ class AccountRequest(pydantic_v1.BaseModel):
- `INACTIVE` - INACTIVE
"""
- current_balance: typing.Optional[float] = pydantic_v1.Field()
+ current_balance: typing.Optional[float] = pydantic.Field()
"""
The account's current balance.
"""
- currency: typing.Optional[AccountRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[AccountRequestCurrency] = pydantic.Field()
"""
The account's currency.
@@ -383,38 +382,29 @@ class AccountRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- account_number: typing.Optional[str] = pydantic_v1.Field()
+ account_number: typing.Optional[str] = pydantic.Field()
"""
The account's number.
"""
- parent_account: typing.Optional[str] = pydantic_v1.Field()
+ parent_account: typing.Optional[str] = pydantic.Field()
"""
ID of the parent account.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the account belongs to.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/account_request_classification.py b/src/merge/resources/accounting/types/account_request_classification.py
index 4551987b..0dfc7484 100644
--- a/src/merge/resources/accounting/types/account_request_classification.py
+++ b/src/merge/resources/accounting/types/account_request_classification.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .classification_enum import ClassificationEnum
AccountRequestClassification = typing.Union[ClassificationEnum, str]
diff --git a/src/merge/resources/accounting/types/account_request_currency.py b/src/merge/resources/accounting/types/account_request_currency.py
index 1820eaf0..e4c4fe46 100644
--- a/src/merge/resources/accounting/types/account_request_currency.py
+++ b/src/merge/resources/accounting/types/account_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
AccountRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/account_request_status.py b/src/merge/resources/accounting/types/account_request_status.py
index ce7ce2b0..65a3103b 100644
--- a/src/merge/resources/accounting/types/account_request_status.py
+++ b/src/merge/resources/accounting/types/account_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account_status_enum import AccountStatusEnum
AccountRequestStatus = typing.Union[AccountStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/account_response.py b/src/merge/resources/accounting/types/account_response.py
index 187c7db0..f9898c9c 100644
--- a/src/merge/resources/accounting/types/account_response.py
+++ b/src/merge/resources/accounting/types/account_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account import Account
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AccountResponse(pydantic_v1.BaseModel):
+class AccountResponse(UniversalBaseModel):
model: Account
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/account_status.py b/src/merge/resources/accounting/types/account_status.py
index 571bb6ce..0ac03e5f 100644
--- a/src/merge/resources/accounting/types/account_status.py
+++ b/src/merge/resources/accounting/types/account_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account_status_enum import AccountStatusEnum
AccountStatus = typing.Union[AccountStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/account_status_enum.py b/src/merge/resources/accounting/types/account_status_enum.py
index e8163709..1ee88bb1 100644
--- a/src/merge/resources/accounting/types/account_status_enum.py
+++ b/src/merge/resources/accounting/types/account_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountStatusEnum(str, enum.Enum):
- """
- - `ACTIVE` - ACTIVE
- - `PENDING` - PENDING
- - `INACTIVE` - INACTIVE
- """
-
- ACTIVE = "ACTIVE"
- PENDING = "PENDING"
- INACTIVE = "INACTIVE"
-
- def visit(
- self,
- active: typing.Callable[[], T_Result],
- pending: typing.Callable[[], T_Result],
- inactive: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountStatusEnum.ACTIVE:
- return active()
- if self is AccountStatusEnum.PENDING:
- return pending()
- if self is AccountStatusEnum.INACTIVE:
- return inactive()
+AccountStatusEnum = typing.Union[typing.Literal["ACTIVE", "PENDING", "INACTIVE"], typing.Any]
diff --git a/src/merge/resources/accounting/types/account_token.py b/src/merge/resources/accounting/types/account_token.py
index 4794fea3..fa8b76ec 100644
--- a/src/merge/resources/accounting/types/account_token.py
+++ b/src/merge/resources/accounting/types/account_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class AccountToken(pydantic_v1.BaseModel):
+class AccountToken(UniversalBaseModel):
account_token: str
integration: AccountIntegration
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/accounting_attachment.py b/src/merge/resources/accounting/types/accounting_attachment.py
index b184c02c..539b0035 100644
--- a/src/merge/resources/accounting/types/accounting_attachment.py
+++ b/src/merge/resources/accounting/types/accounting_attachment.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountingAttachment(pydantic_v1.BaseModel):
+class AccountingAttachment(UniversalBaseModel):
"""
# The Accounting Attachment Object
@@ -22,58 +22,49 @@ class AccountingAttachment(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The attachment's name.
"""
- file_url: typing.Optional[str] = pydantic_v1.Field()
+ file_url: typing.Optional[str] = pydantic.Field()
"""
The attachment's url.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the accounting attachment belongs to.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/accounting_attachment_request.py b/src/merge/resources/accounting/types/accounting_attachment_request.py
index fdd405d1..9e7f7195 100644
--- a/src/merge/resources/accounting/types/accounting_attachment_request.py
+++ b/src/merge/resources/accounting/types/accounting_attachment_request.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AccountingAttachmentRequest(pydantic_v1.BaseModel):
+class AccountingAttachmentRequest(UniversalBaseModel):
"""
# The Accounting Attachment Object
@@ -20,38 +19,29 @@ class AccountingAttachmentRequest(pydantic_v1.BaseModel):
Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments.
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The attachment's name.
"""
- file_url: typing.Optional[str] = pydantic_v1.Field()
+ file_url: typing.Optional[str] = pydantic.Field()
"""
The attachment's url.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the accounting attachment belongs to.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/accounting_attachment_response.py b/src/merge/resources/accounting/types/accounting_attachment_response.py
index b3863d76..478d43d1 100644
--- a/src/merge/resources/accounting/types/accounting_attachment_response.py
+++ b/src/merge/resources/accounting/types/accounting_attachment_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .accounting_attachment import AccountingAttachment
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AccountingAttachmentResponse(pydantic_v1.BaseModel):
+class AccountingAttachmentResponse(UniversalBaseModel):
model: AccountingAttachment
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/accounting_period.py b/src/merge/resources/accounting/types/accounting_period.py
index 8a203e7e..8981df38 100644
--- a/src/merge/resources/accounting/types/accounting_period.py
+++ b/src/merge/resources/accounting/types/accounting_period.py
@@ -1,14 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .accounting_period_status import AccountingPeriodStatus
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountingPeriod(pydantic_v1.BaseModel):
+class AccountingPeriod(UniversalBaseModel):
"""
# The AccountingPeriod Object
@@ -22,46 +23,45 @@ class AccountingPeriod(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
- The datetime that this object was created by Merge.
+ The third-party API ID of the matching object.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
- The datetime that this object was modified by Merge.
+ The datetime that this object was created by Merge.
"""
- start_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
- Beginning date of the period
+ The datetime that this object was modified by Merge.
"""
- end_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
- End date of the period
+ Name of the accounting period.
"""
status: typing.Optional[AccountingPeriodStatus]
- name: typing.Optional[str] = pydantic_v1.Field()
+ start_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
- Name of the accounting period.
+ Beginning date of the period
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ end_date: typing.Optional[dt.datetime] = pydantic.Field()
+ """
+ End date of the period
+ """
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[RemoteData]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/accounting_period_status.py b/src/merge/resources/accounting/types/accounting_period_status.py
index 77f7c0f3..d37691ec 100644
--- a/src/merge/resources/accounting/types/accounting_period_status.py
+++ b/src/merge/resources/accounting/types/accounting_period_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period_status_enum import AccountingPeriodStatusEnum
AccountingPeriodStatus = typing.Union[AccountingPeriodStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/accounting_period_status_enum.py b/src/merge/resources/accounting/types/accounting_period_status_enum.py
index 496f1ce7..71d02b66 100644
--- a/src/merge/resources/accounting/types/accounting_period_status_enum.py
+++ b/src/merge/resources/accounting/types/accounting_period_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountingPeriodStatusEnum(str, enum.Enum):
- """
- - `ACTIVE` - ACTIVE
- - `INACTIVE` - INACTIVE
- """
-
- ACTIVE = "ACTIVE"
- INACTIVE = "INACTIVE"
-
- def visit(self, active: typing.Callable[[], T_Result], inactive: typing.Callable[[], T_Result]) -> T_Result:
- if self is AccountingPeriodStatusEnum.ACTIVE:
- return active()
- if self is AccountingPeriodStatusEnum.INACTIVE:
- return inactive()
+AccountingPeriodStatusEnum = typing.Union[typing.Literal["ACTIVE", "INACTIVE"], typing.Any]
diff --git a/src/merge/resources/accounting/types/accounting_phone_number.py b/src/merge/resources/accounting/types/accounting_phone_number.py
index 6a84d448..78cdf5fa 100644
--- a/src/merge/resources/accounting/types/accounting_phone_number.py
+++ b/src/merge/resources/accounting/types/accounting_phone_number.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountingPhoneNumber(pydantic_v1.BaseModel):
+class AccountingPhoneNumber(UniversalBaseModel):
"""
# The AccountingPhoneNumber Object
@@ -20,40 +20,31 @@ class AccountingPhoneNumber(pydantic_v1.BaseModel):
Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- number: typing.Optional[str] = pydantic_v1.Field()
+ number: typing.Optional[str] = pydantic.Field()
"""
The phone number.
"""
- type: typing.Optional[str] = pydantic_v1.Field()
+ type: typing.Optional[str] = pydantic.Field()
"""
The phone number's type.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/accounting_phone_number_request.py b/src/merge/resources/accounting/types/accounting_phone_number_request.py
index 64fc4f71..0440c794 100644
--- a/src/merge/resources/accounting/types/accounting_phone_number_request.py
+++ b/src/merge/resources/accounting/types/accounting_phone_number_request.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AccountingPhoneNumberRequest(pydantic_v1.BaseModel):
+class AccountingPhoneNumberRequest(UniversalBaseModel):
"""
# The AccountingPhoneNumber Object
@@ -20,33 +19,24 @@ class AccountingPhoneNumberRequest(pydantic_v1.BaseModel):
Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers.
"""
- number: typing.Optional[str] = pydantic_v1.Field()
+ number: typing.Optional[str] = pydantic.Field()
"""
The phone number.
"""
- type: typing.Optional[str] = pydantic_v1.Field()
+ type: typing.Optional[str] = pydantic.Field()
"""
The phone number's type.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/address.py b/src/merge/resources/accounting/types/address.py
index aae530c6..67675a26 100644
--- a/src/merge/resources/accounting/types/address.py
+++ b/src/merge/resources/accounting/types/address.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .address_country import AddressCountry
+import datetime as dt
+import pydantic
from .address_type import AddressType
+from .address_country import AddressCountry
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Address(pydantic_v1.BaseModel):
+class Address(UniversalBaseModel):
"""
# The Address Object
@@ -22,17 +22,17 @@ class Address(pydantic_v1.BaseModel):
Fetch from the `GET CompanyInfo` endpoint and view the company's addresses.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- type: typing.Optional[AddressType] = pydantic_v1.Field()
+ type: typing.Optional[AddressType] = pydantic.Field()
"""
The address type.
@@ -40,28 +40,28 @@ class Address(pydantic_v1.BaseModel):
- `SHIPPING` - SHIPPING
"""
- street_1: typing.Optional[str] = pydantic_v1.Field()
+ street_1: typing.Optional[str] = pydantic.Field()
"""
Line 1 of the address's street.
"""
- street_2: typing.Optional[str] = pydantic_v1.Field()
+ street_2: typing.Optional[str] = pydantic.Field()
"""
Line 2 of the address's street.
"""
- city: typing.Optional[str] = pydantic_v1.Field()
+ city: typing.Optional[str] = pydantic.Field()
"""
The address's city.
"""
- state: typing.Optional[typing.Any]
- country_subdivision: typing.Optional[str] = pydantic_v1.Field()
+ state: typing.Optional[typing.Optional[typing.Any]]
+ country_subdivision: typing.Optional[str] = pydantic.Field()
"""
The address's state or region.
"""
- country: typing.Optional[AddressCountry] = pydantic_v1.Field()
+ country: typing.Optional[AddressCountry] = pydantic.Field()
"""
The address's country.
@@ -316,25 +316,16 @@ class Address(pydantic_v1.BaseModel):
- `ZW` - Zimbabwe
"""
- zip_code: typing.Optional[str] = pydantic_v1.Field()
+ zip_code: typing.Optional[str] = pydantic.Field()
"""
The address's zip code.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/address_country.py b/src/merge/resources/accounting/types/address_country.py
index b437f311..f8ff10fc 100644
--- a/src/merge/resources/accounting/types/address_country.py
+++ b/src/merge/resources/accounting/types/address_country.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .country_enum import CountryEnum
AddressCountry = typing.Union[CountryEnum, str]
diff --git a/src/merge/resources/accounting/types/address_request.py b/src/merge/resources/accounting/types/address_request.py
index cc69afee..d4c66ef6 100644
--- a/src/merge/resources/accounting/types/address_request.py
+++ b/src/merge/resources/accounting/types/address_request.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .address_request_country import AddressRequestCountry
from .address_request_type import AddressRequestType
+import pydantic
+from .address_request_country import AddressRequestCountry
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AddressRequest(pydantic_v1.BaseModel):
+class AddressRequest(UniversalBaseModel):
"""
# The Address Object
@@ -22,7 +21,7 @@ class AddressRequest(pydantic_v1.BaseModel):
Fetch from the `GET CompanyInfo` endpoint and view the company's addresses.
"""
- type: typing.Optional[AddressRequestType] = pydantic_v1.Field()
+ type: typing.Optional[AddressRequestType] = pydantic.Field()
"""
The address type.
@@ -30,27 +29,27 @@ class AddressRequest(pydantic_v1.BaseModel):
- `SHIPPING` - SHIPPING
"""
- street_1: typing.Optional[str] = pydantic_v1.Field()
+ street_1: typing.Optional[str] = pydantic.Field()
"""
Line 1 of the address's street.
"""
- street_2: typing.Optional[str] = pydantic_v1.Field()
+ street_2: typing.Optional[str] = pydantic.Field()
"""
Line 2 of the address's street.
"""
- city: typing.Optional[str] = pydantic_v1.Field()
+ city: typing.Optional[str] = pydantic.Field()
"""
The address's city.
"""
- country_subdivision: typing.Optional[str] = pydantic_v1.Field()
+ country_subdivision: typing.Optional[str] = pydantic.Field()
"""
The address's state or region.
"""
- country: typing.Optional[AddressRequestCountry] = pydantic_v1.Field()
+ country: typing.Optional[AddressRequestCountry] = pydantic.Field()
"""
The address's country.
@@ -305,28 +304,19 @@ class AddressRequest(pydantic_v1.BaseModel):
- `ZW` - Zimbabwe
"""
- zip_code: typing.Optional[str] = pydantic_v1.Field()
+ zip_code: typing.Optional[str] = pydantic.Field()
"""
The address's zip code.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/address_request_country.py b/src/merge/resources/accounting/types/address_request_country.py
index 02559f8d..28dfd7d3 100644
--- a/src/merge/resources/accounting/types/address_request_country.py
+++ b/src/merge/resources/accounting/types/address_request_country.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .country_enum import CountryEnum
AddressRequestCountry = typing.Union[CountryEnum, str]
diff --git a/src/merge/resources/accounting/types/address_request_type.py b/src/merge/resources/accounting/types/address_request_type.py
index ebe47647..a54b3f0f 100644
--- a/src/merge/resources/accounting/types/address_request_type.py
+++ b/src/merge/resources/accounting/types/address_request_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .address_type_enum import AddressTypeEnum
AddressRequestType = typing.Union[AddressTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/address_type.py b/src/merge/resources/accounting/types/address_type.py
index 1ef6065f..e2d13a5b 100644
--- a/src/merge/resources/accounting/types/address_type.py
+++ b/src/merge/resources/accounting/types/address_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .address_type_enum import AddressTypeEnum
AddressType = typing.Union[AddressTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/address_type_enum.py b/src/merge/resources/accounting/types/address_type_enum.py
index 1483fc30..c81218e8 100644
--- a/src/merge/resources/accounting/types/address_type_enum.py
+++ b/src/merge/resources/accounting/types/address_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AddressTypeEnum(str, enum.Enum):
- """
- - `BILLING` - BILLING
- - `SHIPPING` - SHIPPING
- """
-
- BILLING = "BILLING"
- SHIPPING = "SHIPPING"
-
- def visit(self, billing: typing.Callable[[], T_Result], shipping: typing.Callable[[], T_Result]) -> T_Result:
- if self is AddressTypeEnum.BILLING:
- return billing()
- if self is AddressTypeEnum.SHIPPING:
- return shipping()
+AddressTypeEnum = typing.Union[typing.Literal["BILLING", "SHIPPING"], typing.Any]
diff --git a/src/merge/resources/accounting/types/advanced_metadata.py b/src/merge/resources/accounting/types/advanced_metadata.py
index 2aa7d1d6..6287a842 100644
--- a/src/merge/resources/accounting/types/advanced_metadata.py
+++ b/src/merge/resources/accounting/types/advanced_metadata.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AdvancedMetadata(pydantic_v1.BaseModel):
+class AdvancedMetadata(UniversalBaseModel):
id: str
display_name: typing.Optional[str]
description: typing.Optional[str]
is_required: typing.Optional[bool]
is_custom: typing.Optional[bool]
- field_choices: typing.Optional[typing.List[typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_choices: typing.Optional[typing.List[typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/async_passthrough_reciept.py b/src/merge/resources/accounting/types/async_passthrough_reciept.py
index 2cc33210..43dc5284 100644
--- a/src/merge/resources/accounting/types/async_passthrough_reciept.py
+++ b/src/merge/resources/accounting/types/async_passthrough_reciept.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AsyncPassthroughReciept(pydantic_v1.BaseModel):
+class AsyncPassthroughReciept(UniversalBaseModel):
async_passthrough_receipt_id: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/audit_log_event.py b/src/merge/resources/accounting/types/audit_log_event.py
index 43be24a5..b57101fc 100644
--- a/src/merge/resources/accounting/types/audit_log_event.py
+++ b/src/merge/resources/accounting/types/audit_log_event.py
@@ -1,27 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .audit_log_event_event_type import AuditLogEventEventType
+import pydantic
from .audit_log_event_role import AuditLogEventRole
+from .audit_log_event_event_type import AuditLogEventEventType
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AuditLogEvent(pydantic_v1.BaseModel):
+class AuditLogEvent(UniversalBaseModel):
id: typing.Optional[str]
- user_name: typing.Optional[str] = pydantic_v1.Field()
+ user_name: typing.Optional[str] = pydantic.Field()
"""
The User's full name at the time of this Event occurring.
"""
- user_email: typing.Optional[str] = pydantic_v1.Field()
+ user_email: typing.Optional[str] = pydantic.Field()
"""
The User's email at the time of this Event occurring.
"""
- role: AuditLogEventRole = pydantic_v1.Field()
+ role: AuditLogEventRole = pydantic.Field()
"""
Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.
@@ -34,7 +34,7 @@ class AuditLogEvent(pydantic_v1.BaseModel):
"""
ip_address: str
- event_type: AuditLogEventEventType = pydantic_v1.Field()
+ event_type: AuditLogEventEventType = pydantic.Field()
"""
Designates the type of event that occurred.
@@ -75,25 +75,17 @@ class AuditLogEvent(pydantic_v1.BaseModel):
- `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
- `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
- `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
+ - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
"""
event_description: str
created_at: typing.Optional[dt.datetime]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/audit_log_event_event_type.py b/src/merge/resources/accounting/types/audit_log_event_event_type.py
index f9c9d2b3..f9d43eed 100644
--- a/src/merge/resources/accounting/types/audit_log_event_event_type.py
+++ b/src/merge/resources/accounting/types/audit_log_event_event_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .event_type_enum import EventTypeEnum
AuditLogEventEventType = typing.Union[EventTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/audit_log_event_role.py b/src/merge/resources/accounting/types/audit_log_event_role.py
index fe91ed6f..83ecd93a 100644
--- a/src/merge/resources/accounting/types/audit_log_event_role.py
+++ b/src/merge/resources/accounting/types/audit_log_event_role.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .role_enum import RoleEnum
AuditLogEventRole = typing.Union[RoleEnum, str]
diff --git a/src/merge/resources/accounting/types/available_actions.py b/src/merge/resources/accounting/types/available_actions.py
index bbd94581..5f164db6 100644
--- a/src/merge/resources/accounting/types/available_actions.py
+++ b/src/merge/resources/accounting/types/available_actions.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+import typing
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AvailableActions(pydantic_v1.BaseModel):
+class AvailableActions(UniversalBaseModel):
"""
# The AvailableActions Object
@@ -26,20 +25,11 @@ class AvailableActions(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/balance_sheet.py b/src/merge/resources/accounting/types/balance_sheet.py
index bb0aeffd..c35d04d3 100644
--- a/src/merge/resources/accounting/types/balance_sheet.py
+++ b/src/merge/resources/accounting/types/balance_sheet.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .balance_sheet_company import BalanceSheetCompany
+import pydantic
+import datetime as dt
from .balance_sheet_currency import BalanceSheetCurrency
-from .remote_data import RemoteData
+from .balance_sheet_company import BalanceSheetCompany
from .report_item import ReportItem
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class BalanceSheet(pydantic_v1.BaseModel):
+class BalanceSheet(UniversalBaseModel):
"""
# The BalanceSheet Object
@@ -25,27 +25,27 @@ class BalanceSheet(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The balance sheet's name.
"""
- currency: typing.Optional[BalanceSheetCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[BalanceSheetCurrency] = pydantic.Field()
"""
The balance sheet's currency.
@@ -357,17 +357,17 @@ class BalanceSheet(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- company: typing.Optional[BalanceSheetCompany] = pydantic_v1.Field()
+ company: typing.Optional[BalanceSheetCompany] = pydantic.Field()
"""
`Company` object for the given `BalanceSheet` object.
"""
- date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The balance sheet's date. The balance sheet data will reflect the company's financial position this point in time.
"""
- net_assets: typing.Optional[float] = pydantic_v1.Field()
+ net_assets: typing.Optional[float] = pydantic.Field()
"""
The balance sheet's net assets.
"""
@@ -375,33 +375,24 @@ class BalanceSheet(pydantic_v1.BaseModel):
assets: typing.Optional[typing.List[ReportItem]]
liabilities: typing.Optional[typing.List[ReportItem]]
equity: typing.Optional[typing.List[ReportItem]]
- remote_generated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_generated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time that balance sheet was generated by the accounting system.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/balance_sheet_company.py b/src/merge/resources/accounting/types/balance_sheet_company.py
index 6d16af9e..c0ad93f5 100644
--- a/src/merge/resources/accounting/types/balance_sheet_company.py
+++ b/src/merge/resources/accounting/types/balance_sheet_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
BalanceSheetCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/balance_sheet_currency.py b/src/merge/resources/accounting/types/balance_sheet_currency.py
index dcbd4f58..cb65b038 100644
--- a/src/merge/resources/accounting/types/balance_sheet_currency.py
+++ b/src/merge/resources/accounting/types/balance_sheet_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
BalanceSheetCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/cash_flow_statement.py b/src/merge/resources/accounting/types/cash_flow_statement.py
index b47bbfaf..ba039347 100644
--- a/src/merge/resources/accounting/types/cash_flow_statement.py
+++ b/src/merge/resources/accounting/types/cash_flow_statement.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .cash_flow_statement_company import CashFlowStatementCompany
+import pydantic
+import datetime as dt
from .cash_flow_statement_currency import CashFlowStatementCurrency
-from .remote_data import RemoteData
+from .cash_flow_statement_company import CashFlowStatementCompany
from .report_item import ReportItem
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CashFlowStatement(pydantic_v1.BaseModel):
+class CashFlowStatement(UniversalBaseModel):
"""
# The CashFlowStatement Object
@@ -25,27 +25,27 @@ class CashFlowStatement(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The cash flow statement's name.
"""
- currency: typing.Optional[CashFlowStatementCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[CashFlowStatementCurrency] = pydantic.Field()
"""
The cash flow statement's currency.
@@ -357,27 +357,27 @@ class CashFlowStatement(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- company: typing.Optional[CashFlowStatementCompany] = pydantic_v1.Field()
+ company: typing.Optional[CashFlowStatementCompany] = pydantic.Field()
"""
The company the cash flow statement belongs to.
"""
- start_period: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_period: typing.Optional[dt.datetime] = pydantic.Field()
"""
The cash flow statement's start period.
"""
- end_period: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_period: typing.Optional[dt.datetime] = pydantic.Field()
"""
The cash flow statement's end period.
"""
- cash_at_beginning_of_period: typing.Optional[float] = pydantic_v1.Field()
+ cash_at_beginning_of_period: typing.Optional[float] = pydantic.Field()
"""
Cash and cash equivalents at the beginning of the cash flow statement's period.
"""
- cash_at_end_of_period: typing.Optional[float] = pydantic_v1.Field()
+ cash_at_end_of_period: typing.Optional[float] = pydantic.Field()
"""
Cash and cash equivalents at the beginning of the cash flow statement's period.
"""
@@ -385,33 +385,24 @@ class CashFlowStatement(pydantic_v1.BaseModel):
operating_activities: typing.Optional[typing.List[ReportItem]]
investing_activities: typing.Optional[typing.List[ReportItem]]
financing_activities: typing.Optional[typing.List[ReportItem]]
- remote_generated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_generated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time that cash flow statement was generated by the accounting system.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/cash_flow_statement_company.py b/src/merge/resources/accounting/types/cash_flow_statement_company.py
index 43b1fd82..8db442ce 100644
--- a/src/merge/resources/accounting/types/cash_flow_statement_company.py
+++ b/src/merge/resources/accounting/types/cash_flow_statement_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
CashFlowStatementCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/cash_flow_statement_currency.py b/src/merge/resources/accounting/types/cash_flow_statement_currency.py
index 8a850b7e..421760f0 100644
--- a/src/merge/resources/accounting/types/cash_flow_statement_currency.py
+++ b/src/merge/resources/accounting/types/cash_flow_statement_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
CashFlowStatementCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/categories_enum.py b/src/merge/resources/accounting/types/categories_enum.py
index ee5cac33..14d064dd 100644
--- a/src/merge/resources/accounting/types/categories_enum.py
+++ b/src/merge/resources/accounting/types/categories_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoriesEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoriesEnum.HRIS:
- return hris()
- if self is CategoriesEnum.ATS:
- return ats()
- if self is CategoriesEnum.ACCOUNTING:
- return accounting()
- if self is CategoriesEnum.TICKETING:
- return ticketing()
- if self is CategoriesEnum.CRM:
- return crm()
- if self is CategoriesEnum.MKTG:
- return mktg()
- if self is CategoriesEnum.FILESTORAGE:
- return filestorage()
+CategoriesEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/accounting/types/category_enum.py b/src/merge/resources/accounting/types/category_enum.py
index ad5a0688..597342a8 100644
--- a/src/merge/resources/accounting/types/category_enum.py
+++ b/src/merge/resources/accounting/types/category_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoryEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoryEnum.HRIS:
- return hris()
- if self is CategoryEnum.ATS:
- return ats()
- if self is CategoryEnum.ACCOUNTING:
- return accounting()
- if self is CategoryEnum.TICKETING:
- return ticketing()
- if self is CategoryEnum.CRM:
- return crm()
- if self is CategoryEnum.MKTG:
- return mktg()
- if self is CategoryEnum.FILESTORAGE:
- return filestorage()
+CategoryEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/accounting/types/category_type_enum.py b/src/merge/resources/accounting/types/category_type_enum.py
index 03bd7e4d..a53aaa0e 100644
--- a/src/merge/resources/accounting/types/category_type_enum.py
+++ b/src/merge/resources/accounting/types/category_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoryTypeEnum(str, enum.Enum):
- """
- - `CLASS` - CLASS
- - `DEPARTMENT` - DEPARTMENT
- """
-
- CLASS = "CLASS"
- DEPARTMENT = "DEPARTMENT"
-
- def visit(self, class_: typing.Callable[[], T_Result], department: typing.Callable[[], T_Result]) -> T_Result:
- if self is CategoryTypeEnum.CLASS:
- return class_()
- if self is CategoryTypeEnum.DEPARTMENT:
- return department()
+CategoryTypeEnum = typing.Union[typing.Literal["CLASS", "DEPARTMENT"], typing.Any]
diff --git a/src/merge/resources/accounting/types/classification_enum.py b/src/merge/resources/accounting/types/classification_enum.py
index 26499ae6..896a51cc 100644
--- a/src/merge/resources/accounting/types/classification_enum.py
+++ b/src/merge/resources/accounting/types/classification_enum.py
@@ -1,41 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ClassificationEnum(str, enum.Enum):
- """
- - `ASSET` - ASSET
- - `EQUITY` - EQUITY
- - `EXPENSE` - EXPENSE
- - `LIABILITY` - LIABILITY
- - `REVENUE` - REVENUE
- """
-
- ASSET = "ASSET"
- EQUITY = "EQUITY"
- EXPENSE = "EXPENSE"
- LIABILITY = "LIABILITY"
- REVENUE = "REVENUE"
-
- def visit(
- self,
- asset: typing.Callable[[], T_Result],
- equity: typing.Callable[[], T_Result],
- expense: typing.Callable[[], T_Result],
- liability: typing.Callable[[], T_Result],
- revenue: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ClassificationEnum.ASSET:
- return asset()
- if self is ClassificationEnum.EQUITY:
- return equity()
- if self is ClassificationEnum.EXPENSE:
- return expense()
- if self is ClassificationEnum.LIABILITY:
- return liability()
- if self is ClassificationEnum.REVENUE:
- return revenue()
+ClassificationEnum = typing.Union[typing.Literal["ASSET", "EQUITY", "EXPENSE", "LIABILITY", "REVENUE"], typing.Any]
diff --git a/src/merge/resources/accounting/types/common_model_scope_api.py b/src/merge/resources/accounting/types/common_model_scope_api.py
index d6fdec56..c6a178b1 100644
--- a/src/merge/resources/accounting/types/common_model_scope_api.py
+++ b/src/merge/resources/accounting/types/common_model_scope_api.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .individual_common_model_scope_deserializer import IndividualCommonModelScopeDeserializer
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CommonModelScopeApi(pydantic_v1.BaseModel):
- common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic_v1.Field()
+class CommonModelScopeApi(UniversalBaseModel):
+ common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic.Field()
"""
The common models you want to update the scopes for
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/common_model_scopes_body_request.py b/src/merge/resources/accounting/types/common_model_scopes_body_request.py
index e956cbdc..305ab44c 100644
--- a/src/merge/resources/accounting/types/common_model_scopes_body_request.py
+++ b/src/merge/resources/accounting/types/common_model_scopes_body_request.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .enabled_actions_enum import EnabledActionsEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CommonModelScopesBodyRequest(pydantic_v1.BaseModel):
+class CommonModelScopesBodyRequest(UniversalBaseModel):
model_id: str
enabled_actions: typing.List[EnabledActionsEnum]
disabled_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/company_info.py b/src/merge/resources/accounting/types/company_info.py
index 2eb8cd16..a3a8c3ed 100644
--- a/src/merge/resources/accounting/types/company_info.py
+++ b/src/merge/resources/accounting/types/company_info.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .accounting_phone_number import AccountingPhoneNumber
-from .address import Address
+import pydantic
+import datetime as dt
from .company_info_currency import CompanyInfoCurrency
+from .address import Address
+from .accounting_phone_number import AccountingPhoneNumber
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CompanyInfo(pydantic_v1.BaseModel):
+class CompanyInfo(UniversalBaseModel):
"""
# The CompanyInfo Object
@@ -25,47 +25,47 @@ class CompanyInfo(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The company's name.
"""
- legal_name: typing.Optional[str] = pydantic_v1.Field()
+ legal_name: typing.Optional[str] = pydantic.Field()
"""
The company's legal name.
"""
- tax_number: typing.Optional[str] = pydantic_v1.Field()
+ tax_number: typing.Optional[str] = pydantic.Field()
"""
The company's tax number.
"""
- fiscal_year_end_month: typing.Optional[int] = pydantic_v1.Field()
+ fiscal_year_end_month: typing.Optional[int] = pydantic.Field()
"""
The company's fiscal year end month.
"""
- fiscal_year_end_day: typing.Optional[int] = pydantic_v1.Field()
+ fiscal_year_end_day: typing.Optional[int] = pydantic.Field()
"""
The company's fiscal year end day.
"""
- currency: typing.Optional[CompanyInfoCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[CompanyInfoCurrency] = pydantic.Field()
"""
The currency set in the company's accounting platform.
@@ -377,40 +377,31 @@ class CompanyInfo(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's company was created.
"""
- urls: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ urls: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The company's urls.
"""
addresses: typing.Optional[typing.List[Address]]
phone_numbers: typing.Optional[typing.List[AccountingPhoneNumber]]
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/company_info_currency.py b/src/merge/resources/accounting/types/company_info_currency.py
index e081c8c4..b1baa050 100644
--- a/src/merge/resources/accounting/types/company_info_currency.py
+++ b/src/merge/resources/accounting/types/company_info_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
CompanyInfoCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/component_type_enum.py b/src/merge/resources/accounting/types/component_type_enum.py
new file mode 100644
index 00000000..1b4a7e37
--- /dev/null
+++ b/src/merge/resources/accounting/types/component_type_enum.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+ComponentTypeEnum = typing.Union[typing.Literal["SALES", "PURCHASE"], typing.Any]
diff --git a/src/merge/resources/accounting/types/contact.py b/src/merge/resources/accounting/types/contact.py
index 0515a732..31c9c2fd 100644
--- a/src/merge/resources/accounting/types/contact.py
+++ b/src/merge/resources/accounting/types/contact.py
@@ -1,17 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .accounting_phone_number import AccountingPhoneNumber
-from .contact_addresses_item import ContactAddressesItem
+import pydantic
+import datetime as dt
from .contact_status import ContactStatus
+from .contact_addresses_item import ContactAddressesItem
+from .accounting_phone_number import AccountingPhoneNumber
from .remote_data import RemoteData
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Contact(pydantic_v1.BaseModel):
+class Contact(UniversalBaseModel):
"""
# The Contact Object
@@ -28,47 +29,47 @@ class Contact(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The contact's name.
"""
- is_supplier: typing.Optional[bool] = pydantic_v1.Field()
+ is_supplier: typing.Optional[bool] = pydantic.Field()
"""
Whether the contact is a supplier.
"""
- is_customer: typing.Optional[bool] = pydantic_v1.Field()
+ is_customer: typing.Optional[bool] = pydantic.Field()
"""
Whether the contact is a customer.
"""
- email_address: typing.Optional[str] = pydantic_v1.Field()
+ email_address: typing.Optional[str] = pydantic.Field()
"""
The contact's email address.
"""
- tax_number: typing.Optional[str] = pydantic_v1.Field()
+ tax_number: typing.Optional[str] = pydantic.Field()
"""
The contact's tax number.
"""
- status: typing.Optional[ContactStatus] = pydantic_v1.Field()
+ status: typing.Optional[ContactStatus] = pydantic.Field()
"""
The contact's status
@@ -76,53 +77,45 @@ class Contact(pydantic_v1.BaseModel):
- `ARCHIVED` - ARCHIVED
"""
- currency: typing.Optional[str] = pydantic_v1.Field()
+ currency: typing.Optional[str] = pydantic.Field()
"""
The currency the contact's transactions are in.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's contact was updated.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the contact belongs to.
"""
- addresses: typing.Optional[typing.List[typing.Optional[ContactAddressesItem]]] = pydantic_v1.Field()
+ addresses: typing.Optional[typing.List[typing.Optional[ContactAddressesItem]]] = pydantic.Field()
"""
`Address` object IDs for the given `Contacts` object.
"""
- phone_numbers: typing.Optional[typing.List[AccountingPhoneNumber]] = pydantic_v1.Field()
+ phone_numbers: typing.Optional[typing.List[AccountingPhoneNumber]] = pydantic.Field()
"""
`AccountingPhoneNumber` object for the given `Contacts` object.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/contact_addresses_item.py b/src/merge/resources/accounting/types/contact_addresses_item.py
index 9c305f5f..d0de8d39 100644
--- a/src/merge/resources/accounting/types/contact_addresses_item.py
+++ b/src/merge/resources/accounting/types/contact_addresses_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .address import Address
ContactAddressesItem = typing.Union[str, Address]
diff --git a/src/merge/resources/accounting/types/contact_request.py b/src/merge/resources/accounting/types/contact_request.py
index 5248e5b3..b1a3ebd4 100644
--- a/src/merge/resources/accounting/types/contact_request.py
+++ b/src/merge/resources/accounting/types/contact_request.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .accounting_phone_number_request import AccountingPhoneNumberRequest
-from .contact_request_addresses_item import ContactRequestAddressesItem
+import pydantic
from .contact_request_status import ContactRequestStatus
+from .contact_request_addresses_item import ContactRequestAddressesItem
+from .accounting_phone_number_request import AccountingPhoneNumberRequest
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ContactRequest(pydantic_v1.BaseModel):
+class ContactRequest(UniversalBaseModel):
"""
# The Contact Object
@@ -26,32 +26,32 @@ class ContactRequest(pydantic_v1.BaseModel):
Fetch from the `LIST Contacts` endpoint and view a company's contacts.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The contact's name.
"""
- is_supplier: typing.Optional[bool] = pydantic_v1.Field()
+ is_supplier: typing.Optional[bool] = pydantic.Field()
"""
Whether the contact is a supplier.
"""
- is_customer: typing.Optional[bool] = pydantic_v1.Field()
+ is_customer: typing.Optional[bool] = pydantic.Field()
"""
Whether the contact is a customer.
"""
- email_address: typing.Optional[str] = pydantic_v1.Field()
+ email_address: typing.Optional[str] = pydantic.Field()
"""
The contact's email address.
"""
- tax_number: typing.Optional[str] = pydantic_v1.Field()
+ tax_number: typing.Optional[str] = pydantic.Field()
"""
The contact's tax number.
"""
- status: typing.Optional[ContactRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[ContactRequestStatus] = pydantic.Field()
"""
The contact's status
@@ -59,43 +59,35 @@ class ContactRequest(pydantic_v1.BaseModel):
- `ARCHIVED` - ARCHIVED
"""
- currency: typing.Optional[str] = pydantic_v1.Field()
+ currency: typing.Optional[str] = pydantic.Field()
"""
The currency the contact's transactions are in.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the contact belongs to.
"""
- addresses: typing.Optional[typing.List[typing.Optional[ContactRequestAddressesItem]]] = pydantic_v1.Field()
+ addresses: typing.Optional[typing.List[typing.Optional[ContactRequestAddressesItem]]] = pydantic.Field()
"""
`Address` object IDs for the given `Contacts` object.
"""
- phone_numbers: typing.Optional[typing.List[AccountingPhoneNumberRequest]] = pydantic_v1.Field()
+ phone_numbers: typing.Optional[typing.List[AccountingPhoneNumberRequest]] = pydantic.Field()
"""
`AccountingPhoneNumber` object for the given `Contacts` object.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/contact_request_addresses_item.py b/src/merge/resources/accounting/types/contact_request_addresses_item.py
index e6ea9c20..7f826b42 100644
--- a/src/merge/resources/accounting/types/contact_request_addresses_item.py
+++ b/src/merge/resources/accounting/types/contact_request_addresses_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .address import Address
ContactRequestAddressesItem = typing.Union[str, Address]
diff --git a/src/merge/resources/accounting/types/contact_request_status.py b/src/merge/resources/accounting/types/contact_request_status.py
index b12e4d58..f0155f42 100644
--- a/src/merge/resources/accounting/types/contact_request_status.py
+++ b/src/merge/resources/accounting/types/contact_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .status_7_d_1_enum import Status7D1Enum
ContactRequestStatus = typing.Union[Status7D1Enum, str]
diff --git a/src/merge/resources/accounting/types/contact_response.py b/src/merge/resources/accounting/types/contact_response.py
index 86e9ae26..e6b04c7b 100644
--- a/src/merge/resources/accounting/types/contact_response.py
+++ b/src/merge/resources/accounting/types/contact_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .contact import Contact
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ContactResponse(pydantic_v1.BaseModel):
+class ContactResponse(UniversalBaseModel):
model: Contact
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/contact_status.py b/src/merge/resources/accounting/types/contact_status.py
index fc5b2d28..5724cc2b 100644
--- a/src/merge/resources/accounting/types/contact_status.py
+++ b/src/merge/resources/accounting/types/contact_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .status_7_d_1_enum import Status7D1Enum
ContactStatus = typing.Union[Status7D1Enum, str]
diff --git a/src/merge/resources/accounting/types/country_enum.py b/src/merge/resources/accounting/types/country_enum.py
index 7e6b7a0e..3aab022f 100644
--- a/src/merge/resources/accounting/types/country_enum.py
+++ b/src/merge/resources/accounting/types/country_enum.py
@@ -1,1261 +1,258 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CountryEnum(str, enum.Enum):
- """
- - `AF` - Afghanistan
- - `AX` - Γ
land Islands
- - `AL` - Albania
- - `DZ` - Algeria
- - `AS` - American Samoa
- - `AD` - Andorra
- - `AO` - Angola
- - `AI` - Anguilla
- - `AQ` - Antarctica
- - `AG` - Antigua and Barbuda
- - `AR` - Argentina
- - `AM` - Armenia
- - `AW` - Aruba
- - `AU` - Australia
- - `AT` - Austria
- - `AZ` - Azerbaijan
- - `BS` - Bahamas
- - `BH` - Bahrain
- - `BD` - Bangladesh
- - `BB` - Barbados
- - `BY` - Belarus
- - `BE` - Belgium
- - `BZ` - Belize
- - `BJ` - Benin
- - `BM` - Bermuda
- - `BT` - Bhutan
- - `BO` - Bolivia
- - `BQ` - Bonaire, Sint Eustatius and Saba
- - `BA` - Bosnia and Herzegovina
- - `BW` - Botswana
- - `BV` - Bouvet Island
- - `BR` - Brazil
- - `IO` - British Indian Ocean Territory
- - `BN` - Brunei
- - `BG` - Bulgaria
- - `BF` - Burkina Faso
- - `BI` - Burundi
- - `CV` - Cabo Verde
- - `KH` - Cambodia
- - `CM` - Cameroon
- - `CA` - Canada
- - `KY` - Cayman Islands
- - `CF` - Central African Republic
- - `TD` - Chad
- - `CL` - Chile
- - `CN` - China
- - `CX` - Christmas Island
- - `CC` - Cocos (Keeling) Islands
- - `CO` - Colombia
- - `KM` - Comoros
- - `CG` - Congo
- - `CD` - Congo (the Democratic Republic of the)
- - `CK` - Cook Islands
- - `CR` - Costa Rica
- - `CI` - CΓ΄te d'Ivoire
- - `HR` - Croatia
- - `CU` - Cuba
- - `CW` - CuraΓ§ao
- - `CY` - Cyprus
- - `CZ` - Czechia
- - `DK` - Denmark
- - `DJ` - Djibouti
- - `DM` - Dominica
- - `DO` - Dominican Republic
- - `EC` - Ecuador
- - `EG` - Egypt
- - `SV` - El Salvador
- - `GQ` - Equatorial Guinea
- - `ER` - Eritrea
- - `EE` - Estonia
- - `SZ` - Eswatini
- - `ET` - Ethiopia
- - `FK` - Falkland Islands (Malvinas)
- - `FO` - Faroe Islands
- - `FJ` - Fiji
- - `FI` - Finland
- - `FR` - France
- - `GF` - French Guiana
- - `PF` - French Polynesia
- - `TF` - French Southern Territories
- - `GA` - Gabon
- - `GM` - Gambia
- - `GE` - Georgia
- - `DE` - Germany
- - `GH` - Ghana
- - `GI` - Gibraltar
- - `GR` - Greece
- - `GL` - Greenland
- - `GD` - Grenada
- - `GP` - Guadeloupe
- - `GU` - Guam
- - `GT` - Guatemala
- - `GG` - Guernsey
- - `GN` - Guinea
- - `GW` - Guinea-Bissau
- - `GY` - Guyana
- - `HT` - Haiti
- - `HM` - Heard Island and McDonald Islands
- - `VA` - Holy See
- - `HN` - Honduras
- - `HK` - Hong Kong
- - `HU` - Hungary
- - `IS` - Iceland
- - `IN` - India
- - `ID` - Indonesia
- - `IR` - Iran
- - `IQ` - Iraq
- - `IE` - Ireland
- - `IM` - Isle of Man
- - `IL` - Israel
- - `IT` - Italy
- - `JM` - Jamaica
- - `JP` - Japan
- - `JE` - Jersey
- - `JO` - Jordan
- - `KZ` - Kazakhstan
- - `KE` - Kenya
- - `KI` - Kiribati
- - `KW` - Kuwait
- - `KG` - Kyrgyzstan
- - `LA` - Laos
- - `LV` - Latvia
- - `LB` - Lebanon
- - `LS` - Lesotho
- - `LR` - Liberia
- - `LY` - Libya
- - `LI` - Liechtenstein
- - `LT` - Lithuania
- - `LU` - Luxembourg
- - `MO` - Macao
- - `MG` - Madagascar
- - `MW` - Malawi
- - `MY` - Malaysia
- - `MV` - Maldives
- - `ML` - Mali
- - `MT` - Malta
- - `MH` - Marshall Islands
- - `MQ` - Martinique
- - `MR` - Mauritania
- - `MU` - Mauritius
- - `YT` - Mayotte
- - `MX` - Mexico
- - `FM` - Micronesia (Federated States of)
- - `MD` - Moldova
- - `MC` - Monaco
- - `MN` - Mongolia
- - `ME` - Montenegro
- - `MS` - Montserrat
- - `MA` - Morocco
- - `MZ` - Mozambique
- - `MM` - Myanmar
- - `NA` - Namibia
- - `NR` - Nauru
- - `NP` - Nepal
- - `NL` - Netherlands
- - `NC` - New Caledonia
- - `NZ` - New Zealand
- - `NI` - Nicaragua
- - `NE` - Niger
- - `NG` - Nigeria
- - `NU` - Niue
- - `NF` - Norfolk Island
- - `KP` - North Korea
- - `MK` - North Macedonia
- - `MP` - Northern Mariana Islands
- - `NO` - Norway
- - `OM` - Oman
- - `PK` - Pakistan
- - `PW` - Palau
- - `PS` - Palestine, State of
- - `PA` - Panama
- - `PG` - Papua New Guinea
- - `PY` - Paraguay
- - `PE` - Peru
- - `PH` - Philippines
- - `PN` - Pitcairn
- - `PL` - Poland
- - `PT` - Portugal
- - `PR` - Puerto Rico
- - `QA` - Qatar
- - `RE` - RΓ©union
- - `RO` - Romania
- - `RU` - Russia
- - `RW` - Rwanda
- - `BL` - Saint BarthΓ©lemy
- - `SH` - Saint Helena, Ascension and Tristan da Cunha
- - `KN` - Saint Kitts and Nevis
- - `LC` - Saint Lucia
- - `MF` - Saint Martin (French part)
- - `PM` - Saint Pierre and Miquelon
- - `VC` - Saint Vincent and the Grenadines
- - `WS` - Samoa
- - `SM` - San Marino
- - `ST` - Sao Tome and Principe
- - `SA` - Saudi Arabia
- - `SN` - Senegal
- - `RS` - Serbia
- - `SC` - Seychelles
- - `SL` - Sierra Leone
- - `SG` - Singapore
- - `SX` - Sint Maarten (Dutch part)
- - `SK` - Slovakia
- - `SI` - Slovenia
- - `SB` - Solomon Islands
- - `SO` - Somalia
- - `ZA` - South Africa
- - `GS` - South Georgia and the South Sandwich Islands
- - `KR` - South Korea
- - `SS` - South Sudan
- - `ES` - Spain
- - `LK` - Sri Lanka
- - `SD` - Sudan
- - `SR` - Suriname
- - `SJ` - Svalbard and Jan Mayen
- - `SE` - Sweden
- - `CH` - Switzerland
- - `SY` - Syria
- - `TW` - Taiwan
- - `TJ` - Tajikistan
- - `TZ` - Tanzania
- - `TH` - Thailand
- - `TL` - Timor-Leste
- - `TG` - Togo
- - `TK` - Tokelau
- - `TO` - Tonga
- - `TT` - Trinidad and Tobago
- - `TN` - Tunisia
- - `TR` - Turkey
- - `TM` - Turkmenistan
- - `TC` - Turks and Caicos Islands
- - `TV` - Tuvalu
- - `UG` - Uganda
- - `UA` - Ukraine
- - `AE` - United Arab Emirates
- - `GB` - United Kingdom
- - `UM` - United States Minor Outlying Islands
- - `US` - United States of America
- - `UY` - Uruguay
- - `UZ` - Uzbekistan
- - `VU` - Vanuatu
- - `VE` - Venezuela
- - `VN` - Vietnam
- - `VG` - Virgin Islands (British)
- - `VI` - Virgin Islands (U.S.)
- - `WF` - Wallis and Futuna
- - `EH` - Western Sahara
- - `YE` - Yemen
- - `ZM` - Zambia
- - `ZW` - Zimbabwe
- """
-
- AF = "AF"
- AX = "AX"
- AL = "AL"
- DZ = "DZ"
- AS = "AS"
- AD = "AD"
- AO = "AO"
- AI = "AI"
- AQ = "AQ"
- AG = "AG"
- AR = "AR"
- AM = "AM"
- AW = "AW"
- AU = "AU"
- AT = "AT"
- AZ = "AZ"
- BS = "BS"
- BH = "BH"
- BD = "BD"
- BB = "BB"
- BY = "BY"
- BE = "BE"
- BZ = "BZ"
- BJ = "BJ"
- BM = "BM"
- BT = "BT"
- BO = "BO"
- BQ = "BQ"
- BA = "BA"
- BW = "BW"
- BV = "BV"
- BR = "BR"
- IO = "IO"
- BN = "BN"
- BG = "BG"
- BF = "BF"
- BI = "BI"
- CV = "CV"
- KH = "KH"
- CM = "CM"
- CA = "CA"
- KY = "KY"
- CF = "CF"
- TD = "TD"
- CL = "CL"
- CN = "CN"
- CX = "CX"
- CC = "CC"
- CO = "CO"
- KM = "KM"
- CG = "CG"
- CD = "CD"
- CK = "CK"
- CR = "CR"
- CI = "CI"
- HR = "HR"
- CU = "CU"
- CW = "CW"
- CY = "CY"
- CZ = "CZ"
- DK = "DK"
- DJ = "DJ"
- DM = "DM"
- DO = "DO"
- EC = "EC"
- EG = "EG"
- SV = "SV"
- GQ = "GQ"
- ER = "ER"
- EE = "EE"
- SZ = "SZ"
- ET = "ET"
- FK = "FK"
- FO = "FO"
- FJ = "FJ"
- FI = "FI"
- FR = "FR"
- GF = "GF"
- PF = "PF"
- TF = "TF"
- GA = "GA"
- GM = "GM"
- GE = "GE"
- DE = "DE"
- GH = "GH"
- GI = "GI"
- GR = "GR"
- GL = "GL"
- GD = "GD"
- GP = "GP"
- GU = "GU"
- GT = "GT"
- GG = "GG"
- GN = "GN"
- GW = "GW"
- GY = "GY"
- HT = "HT"
- HM = "HM"
- VA = "VA"
- HN = "HN"
- HK = "HK"
- HU = "HU"
- IS = "IS"
- IN = "IN"
- ID = "ID"
- IR = "IR"
- IQ = "IQ"
- IE = "IE"
- IM = "IM"
- IL = "IL"
- IT = "IT"
- JM = "JM"
- JP = "JP"
- JE = "JE"
- JO = "JO"
- KZ = "KZ"
- KE = "KE"
- KI = "KI"
- KW = "KW"
- KG = "KG"
- LA = "LA"
- LV = "LV"
- LB = "LB"
- LS = "LS"
- LR = "LR"
- LY = "LY"
- LI = "LI"
- LT = "LT"
- LU = "LU"
- MO = "MO"
- MG = "MG"
- MW = "MW"
- MY = "MY"
- MV = "MV"
- ML = "ML"
- MT = "MT"
- MH = "MH"
- MQ = "MQ"
- MR = "MR"
- MU = "MU"
- YT = "YT"
- MX = "MX"
- FM = "FM"
- MD = "MD"
- MC = "MC"
- MN = "MN"
- ME = "ME"
- MS = "MS"
- MA = "MA"
- MZ = "MZ"
- MM = "MM"
- NA = "NA"
- NR = "NR"
- NP = "NP"
- NL = "NL"
- NC = "NC"
- NZ = "NZ"
- NI = "NI"
- NE = "NE"
- NG = "NG"
- NU = "NU"
- NF = "NF"
- KP = "KP"
- MK = "MK"
- MP = "MP"
- NO = "NO"
- OM = "OM"
- PK = "PK"
- PW = "PW"
- PS = "PS"
- PA = "PA"
- PG = "PG"
- PY = "PY"
- PE = "PE"
- PH = "PH"
- PN = "PN"
- PL = "PL"
- PT = "PT"
- PR = "PR"
- QA = "QA"
- RE = "RE"
- RO = "RO"
- RU = "RU"
- RW = "RW"
- BL = "BL"
- SH = "SH"
- KN = "KN"
- LC = "LC"
- MF = "MF"
- PM = "PM"
- VC = "VC"
- WS = "WS"
- SM = "SM"
- ST = "ST"
- SA = "SA"
- SN = "SN"
- RS = "RS"
- SC = "SC"
- SL = "SL"
- SG = "SG"
- SX = "SX"
- SK = "SK"
- SI = "SI"
- SB = "SB"
- SO = "SO"
- ZA = "ZA"
- GS = "GS"
- KR = "KR"
- SS = "SS"
- ES = "ES"
- LK = "LK"
- SD = "SD"
- SR = "SR"
- SJ = "SJ"
- SE = "SE"
- CH = "CH"
- SY = "SY"
- TW = "TW"
- TJ = "TJ"
- TZ = "TZ"
- TH = "TH"
- TL = "TL"
- TG = "TG"
- TK = "TK"
- TO = "TO"
- TT = "TT"
- TN = "TN"
- TR = "TR"
- TM = "TM"
- TC = "TC"
- TV = "TV"
- UG = "UG"
- UA = "UA"
- AE = "AE"
- GB = "GB"
- UM = "UM"
- US = "US"
- UY = "UY"
- UZ = "UZ"
- VU = "VU"
- VE = "VE"
- VN = "VN"
- VG = "VG"
- VI = "VI"
- WF = "WF"
- EH = "EH"
- YE = "YE"
- ZM = "ZM"
- ZW = "ZW"
-
- def visit(
- self,
- af: typing.Callable[[], T_Result],
- ax: typing.Callable[[], T_Result],
- al: typing.Callable[[], T_Result],
- dz: typing.Callable[[], T_Result],
- as_: typing.Callable[[], T_Result],
- ad: typing.Callable[[], T_Result],
- ao: typing.Callable[[], T_Result],
- ai: typing.Callable[[], T_Result],
- aq: typing.Callable[[], T_Result],
- ag: typing.Callable[[], T_Result],
- ar: typing.Callable[[], T_Result],
- am: typing.Callable[[], T_Result],
- aw: typing.Callable[[], T_Result],
- au: typing.Callable[[], T_Result],
- at: typing.Callable[[], T_Result],
- az: typing.Callable[[], T_Result],
- bs: typing.Callable[[], T_Result],
- bh: typing.Callable[[], T_Result],
- bd: typing.Callable[[], T_Result],
- bb: typing.Callable[[], T_Result],
- by: typing.Callable[[], T_Result],
- be: typing.Callable[[], T_Result],
- bz: typing.Callable[[], T_Result],
- bj: typing.Callable[[], T_Result],
- bm: typing.Callable[[], T_Result],
- bt: typing.Callable[[], T_Result],
- bo: typing.Callable[[], T_Result],
- bq: typing.Callable[[], T_Result],
- ba: typing.Callable[[], T_Result],
- bw: typing.Callable[[], T_Result],
- bv: typing.Callable[[], T_Result],
- br: typing.Callable[[], T_Result],
- io: typing.Callable[[], T_Result],
- bn: typing.Callable[[], T_Result],
- bg: typing.Callable[[], T_Result],
- bf: typing.Callable[[], T_Result],
- bi: typing.Callable[[], T_Result],
- cv: typing.Callable[[], T_Result],
- kh: typing.Callable[[], T_Result],
- cm: typing.Callable[[], T_Result],
- ca: typing.Callable[[], T_Result],
- ky: typing.Callable[[], T_Result],
- cf: typing.Callable[[], T_Result],
- td: typing.Callable[[], T_Result],
- cl: typing.Callable[[], T_Result],
- cn: typing.Callable[[], T_Result],
- cx: typing.Callable[[], T_Result],
- cc: typing.Callable[[], T_Result],
- co: typing.Callable[[], T_Result],
- km: typing.Callable[[], T_Result],
- cg: typing.Callable[[], T_Result],
- cd: typing.Callable[[], T_Result],
- ck: typing.Callable[[], T_Result],
- cr: typing.Callable[[], T_Result],
- ci: typing.Callable[[], T_Result],
- hr: typing.Callable[[], T_Result],
- cu: typing.Callable[[], T_Result],
- cw: typing.Callable[[], T_Result],
- cy: typing.Callable[[], T_Result],
- cz: typing.Callable[[], T_Result],
- dk: typing.Callable[[], T_Result],
- dj: typing.Callable[[], T_Result],
- dm: typing.Callable[[], T_Result],
- do: typing.Callable[[], T_Result],
- ec: typing.Callable[[], T_Result],
- eg: typing.Callable[[], T_Result],
- sv: typing.Callable[[], T_Result],
- gq: typing.Callable[[], T_Result],
- er: typing.Callable[[], T_Result],
- ee: typing.Callable[[], T_Result],
- sz: typing.Callable[[], T_Result],
- et: typing.Callable[[], T_Result],
- fk: typing.Callable[[], T_Result],
- fo: typing.Callable[[], T_Result],
- fj: typing.Callable[[], T_Result],
- fi: typing.Callable[[], T_Result],
- fr: typing.Callable[[], T_Result],
- gf: typing.Callable[[], T_Result],
- pf: typing.Callable[[], T_Result],
- tf: typing.Callable[[], T_Result],
- ga: typing.Callable[[], T_Result],
- gm: typing.Callable[[], T_Result],
- ge: typing.Callable[[], T_Result],
- de: typing.Callable[[], T_Result],
- gh: typing.Callable[[], T_Result],
- gi: typing.Callable[[], T_Result],
- gr: typing.Callable[[], T_Result],
- gl: typing.Callable[[], T_Result],
- gd: typing.Callable[[], T_Result],
- gp: typing.Callable[[], T_Result],
- gu: typing.Callable[[], T_Result],
- gt: typing.Callable[[], T_Result],
- gg: typing.Callable[[], T_Result],
- gn: typing.Callable[[], T_Result],
- gw: typing.Callable[[], T_Result],
- gy: typing.Callable[[], T_Result],
- ht: typing.Callable[[], T_Result],
- hm: typing.Callable[[], T_Result],
- va: typing.Callable[[], T_Result],
- hn: typing.Callable[[], T_Result],
- hk: typing.Callable[[], T_Result],
- hu: typing.Callable[[], T_Result],
- is_: typing.Callable[[], T_Result],
- in_: typing.Callable[[], T_Result],
- id: typing.Callable[[], T_Result],
- ir: typing.Callable[[], T_Result],
- iq: typing.Callable[[], T_Result],
- ie: typing.Callable[[], T_Result],
- im: typing.Callable[[], T_Result],
- il: typing.Callable[[], T_Result],
- it: typing.Callable[[], T_Result],
- jm: typing.Callable[[], T_Result],
- jp: typing.Callable[[], T_Result],
- je: typing.Callable[[], T_Result],
- jo: typing.Callable[[], T_Result],
- kz: typing.Callable[[], T_Result],
- ke: typing.Callable[[], T_Result],
- ki: typing.Callable[[], T_Result],
- kw: typing.Callable[[], T_Result],
- kg: typing.Callable[[], T_Result],
- la: typing.Callable[[], T_Result],
- lv: typing.Callable[[], T_Result],
- lb: typing.Callable[[], T_Result],
- ls: typing.Callable[[], T_Result],
- lr: typing.Callable[[], T_Result],
- ly: typing.Callable[[], T_Result],
- li: typing.Callable[[], T_Result],
- lt: typing.Callable[[], T_Result],
- lu: typing.Callable[[], T_Result],
- mo: typing.Callable[[], T_Result],
- mg: typing.Callable[[], T_Result],
- mw: typing.Callable[[], T_Result],
- my: typing.Callable[[], T_Result],
- mv: typing.Callable[[], T_Result],
- ml: typing.Callable[[], T_Result],
- mt: typing.Callable[[], T_Result],
- mh: typing.Callable[[], T_Result],
- mq: typing.Callable[[], T_Result],
- mr: typing.Callable[[], T_Result],
- mu: typing.Callable[[], T_Result],
- yt: typing.Callable[[], T_Result],
- mx: typing.Callable[[], T_Result],
- fm: typing.Callable[[], T_Result],
- md: typing.Callable[[], T_Result],
- mc: typing.Callable[[], T_Result],
- mn: typing.Callable[[], T_Result],
- me: typing.Callable[[], T_Result],
- ms: typing.Callable[[], T_Result],
- ma: typing.Callable[[], T_Result],
- mz: typing.Callable[[], T_Result],
- mm: typing.Callable[[], T_Result],
- na: typing.Callable[[], T_Result],
- nr: typing.Callable[[], T_Result],
- np: typing.Callable[[], T_Result],
- nl: typing.Callable[[], T_Result],
- nc: typing.Callable[[], T_Result],
- nz: typing.Callable[[], T_Result],
- ni: typing.Callable[[], T_Result],
- ne: typing.Callable[[], T_Result],
- ng: typing.Callable[[], T_Result],
- nu: typing.Callable[[], T_Result],
- nf: typing.Callable[[], T_Result],
- kp: typing.Callable[[], T_Result],
- mk: typing.Callable[[], T_Result],
- mp: typing.Callable[[], T_Result],
- no: typing.Callable[[], T_Result],
- om: typing.Callable[[], T_Result],
- pk: typing.Callable[[], T_Result],
- pw: typing.Callable[[], T_Result],
- ps: typing.Callable[[], T_Result],
- pa: typing.Callable[[], T_Result],
- pg: typing.Callable[[], T_Result],
- py: typing.Callable[[], T_Result],
- pe: typing.Callable[[], T_Result],
- ph: typing.Callable[[], T_Result],
- pn: typing.Callable[[], T_Result],
- pl: typing.Callable[[], T_Result],
- pt: typing.Callable[[], T_Result],
- pr: typing.Callable[[], T_Result],
- qa: typing.Callable[[], T_Result],
- re: typing.Callable[[], T_Result],
- ro: typing.Callable[[], T_Result],
- ru: typing.Callable[[], T_Result],
- rw: typing.Callable[[], T_Result],
- bl: typing.Callable[[], T_Result],
- sh: typing.Callable[[], T_Result],
- kn: typing.Callable[[], T_Result],
- lc: typing.Callable[[], T_Result],
- mf: typing.Callable[[], T_Result],
- pm: typing.Callable[[], T_Result],
- vc: typing.Callable[[], T_Result],
- ws: typing.Callable[[], T_Result],
- sm: typing.Callable[[], T_Result],
- st: typing.Callable[[], T_Result],
- sa: typing.Callable[[], T_Result],
- sn: typing.Callable[[], T_Result],
- rs: typing.Callable[[], T_Result],
- sc: typing.Callable[[], T_Result],
- sl: typing.Callable[[], T_Result],
- sg: typing.Callable[[], T_Result],
- sx: typing.Callable[[], T_Result],
- sk: typing.Callable[[], T_Result],
- si: typing.Callable[[], T_Result],
- sb: typing.Callable[[], T_Result],
- so: typing.Callable[[], T_Result],
- za: typing.Callable[[], T_Result],
- gs: typing.Callable[[], T_Result],
- kr: typing.Callable[[], T_Result],
- ss: typing.Callable[[], T_Result],
- es: typing.Callable[[], T_Result],
- lk: typing.Callable[[], T_Result],
- sd: typing.Callable[[], T_Result],
- sr: typing.Callable[[], T_Result],
- sj: typing.Callable[[], T_Result],
- se: typing.Callable[[], T_Result],
- ch: typing.Callable[[], T_Result],
- sy: typing.Callable[[], T_Result],
- tw: typing.Callable[[], T_Result],
- tj: typing.Callable[[], T_Result],
- tz: typing.Callable[[], T_Result],
- th: typing.Callable[[], T_Result],
- tl: typing.Callable[[], T_Result],
- tg: typing.Callable[[], T_Result],
- tk: typing.Callable[[], T_Result],
- to: typing.Callable[[], T_Result],
- tt: typing.Callable[[], T_Result],
- tn: typing.Callable[[], T_Result],
- tr: typing.Callable[[], T_Result],
- tm: typing.Callable[[], T_Result],
- tc: typing.Callable[[], T_Result],
- tv: typing.Callable[[], T_Result],
- ug: typing.Callable[[], T_Result],
- ua: typing.Callable[[], T_Result],
- ae: typing.Callable[[], T_Result],
- gb: typing.Callable[[], T_Result],
- um: typing.Callable[[], T_Result],
- us: typing.Callable[[], T_Result],
- uy: typing.Callable[[], T_Result],
- uz: typing.Callable[[], T_Result],
- vu: typing.Callable[[], T_Result],
- ve: typing.Callable[[], T_Result],
- vn: typing.Callable[[], T_Result],
- vg: typing.Callable[[], T_Result],
- vi: typing.Callable[[], T_Result],
- wf: typing.Callable[[], T_Result],
- eh: typing.Callable[[], T_Result],
- ye: typing.Callable[[], T_Result],
- zm: typing.Callable[[], T_Result],
- zw: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CountryEnum.AF:
- return af()
- if self is CountryEnum.AX:
- return ax()
- if self is CountryEnum.AL:
- return al()
- if self is CountryEnum.DZ:
- return dz()
- if self is CountryEnum.AS:
- return as_()
- if self is CountryEnum.AD:
- return ad()
- if self is CountryEnum.AO:
- return ao()
- if self is CountryEnum.AI:
- return ai()
- if self is CountryEnum.AQ:
- return aq()
- if self is CountryEnum.AG:
- return ag()
- if self is CountryEnum.AR:
- return ar()
- if self is CountryEnum.AM:
- return am()
- if self is CountryEnum.AW:
- return aw()
- if self is CountryEnum.AU:
- return au()
- if self is CountryEnum.AT:
- return at()
- if self is CountryEnum.AZ:
- return az()
- if self is CountryEnum.BS:
- return bs()
- if self is CountryEnum.BH:
- return bh()
- if self is CountryEnum.BD:
- return bd()
- if self is CountryEnum.BB:
- return bb()
- if self is CountryEnum.BY:
- return by()
- if self is CountryEnum.BE:
- return be()
- if self is CountryEnum.BZ:
- return bz()
- if self is CountryEnum.BJ:
- return bj()
- if self is CountryEnum.BM:
- return bm()
- if self is CountryEnum.BT:
- return bt()
- if self is CountryEnum.BO:
- return bo()
- if self is CountryEnum.BQ:
- return bq()
- if self is CountryEnum.BA:
- return ba()
- if self is CountryEnum.BW:
- return bw()
- if self is CountryEnum.BV:
- return bv()
- if self is CountryEnum.BR:
- return br()
- if self is CountryEnum.IO:
- return io()
- if self is CountryEnum.BN:
- return bn()
- if self is CountryEnum.BG:
- return bg()
- if self is CountryEnum.BF:
- return bf()
- if self is CountryEnum.BI:
- return bi()
- if self is CountryEnum.CV:
- return cv()
- if self is CountryEnum.KH:
- return kh()
- if self is CountryEnum.CM:
- return cm()
- if self is CountryEnum.CA:
- return ca()
- if self is CountryEnum.KY:
- return ky()
- if self is CountryEnum.CF:
- return cf()
- if self is CountryEnum.TD:
- return td()
- if self is CountryEnum.CL:
- return cl()
- if self is CountryEnum.CN:
- return cn()
- if self is CountryEnum.CX:
- return cx()
- if self is CountryEnum.CC:
- return cc()
- if self is CountryEnum.CO:
- return co()
- if self is CountryEnum.KM:
- return km()
- if self is CountryEnum.CG:
- return cg()
- if self is CountryEnum.CD:
- return cd()
- if self is CountryEnum.CK:
- return ck()
- if self is CountryEnum.CR:
- return cr()
- if self is CountryEnum.CI:
- return ci()
- if self is CountryEnum.HR:
- return hr()
- if self is CountryEnum.CU:
- return cu()
- if self is CountryEnum.CW:
- return cw()
- if self is CountryEnum.CY:
- return cy()
- if self is CountryEnum.CZ:
- return cz()
- if self is CountryEnum.DK:
- return dk()
- if self is CountryEnum.DJ:
- return dj()
- if self is CountryEnum.DM:
- return dm()
- if self is CountryEnum.DO:
- return do()
- if self is CountryEnum.EC:
- return ec()
- if self is CountryEnum.EG:
- return eg()
- if self is CountryEnum.SV:
- return sv()
- if self is CountryEnum.GQ:
- return gq()
- if self is CountryEnum.ER:
- return er()
- if self is CountryEnum.EE:
- return ee()
- if self is CountryEnum.SZ:
- return sz()
- if self is CountryEnum.ET:
- return et()
- if self is CountryEnum.FK:
- return fk()
- if self is CountryEnum.FO:
- return fo()
- if self is CountryEnum.FJ:
- return fj()
- if self is CountryEnum.FI:
- return fi()
- if self is CountryEnum.FR:
- return fr()
- if self is CountryEnum.GF:
- return gf()
- if self is CountryEnum.PF:
- return pf()
- if self is CountryEnum.TF:
- return tf()
- if self is CountryEnum.GA:
- return ga()
- if self is CountryEnum.GM:
- return gm()
- if self is CountryEnum.GE:
- return ge()
- if self is CountryEnum.DE:
- return de()
- if self is CountryEnum.GH:
- return gh()
- if self is CountryEnum.GI:
- return gi()
- if self is CountryEnum.GR:
- return gr()
- if self is CountryEnum.GL:
- return gl()
- if self is CountryEnum.GD:
- return gd()
- if self is CountryEnum.GP:
- return gp()
- if self is CountryEnum.GU:
- return gu()
- if self is CountryEnum.GT:
- return gt()
- if self is CountryEnum.GG:
- return gg()
- if self is CountryEnum.GN:
- return gn()
- if self is CountryEnum.GW:
- return gw()
- if self is CountryEnum.GY:
- return gy()
- if self is CountryEnum.HT:
- return ht()
- if self is CountryEnum.HM:
- return hm()
- if self is CountryEnum.VA:
- return va()
- if self is CountryEnum.HN:
- return hn()
- if self is CountryEnum.HK:
- return hk()
- if self is CountryEnum.HU:
- return hu()
- if self is CountryEnum.IS:
- return is_()
- if self is CountryEnum.IN:
- return in_()
- if self is CountryEnum.ID:
- return id()
- if self is CountryEnum.IR:
- return ir()
- if self is CountryEnum.IQ:
- return iq()
- if self is CountryEnum.IE:
- return ie()
- if self is CountryEnum.IM:
- return im()
- if self is CountryEnum.IL:
- return il()
- if self is CountryEnum.IT:
- return it()
- if self is CountryEnum.JM:
- return jm()
- if self is CountryEnum.JP:
- return jp()
- if self is CountryEnum.JE:
- return je()
- if self is CountryEnum.JO:
- return jo()
- if self is CountryEnum.KZ:
- return kz()
- if self is CountryEnum.KE:
- return ke()
- if self is CountryEnum.KI:
- return ki()
- if self is CountryEnum.KW:
- return kw()
- if self is CountryEnum.KG:
- return kg()
- if self is CountryEnum.LA:
- return la()
- if self is CountryEnum.LV:
- return lv()
- if self is CountryEnum.LB:
- return lb()
- if self is CountryEnum.LS:
- return ls()
- if self is CountryEnum.LR:
- return lr()
- if self is CountryEnum.LY:
- return ly()
- if self is CountryEnum.LI:
- return li()
- if self is CountryEnum.LT:
- return lt()
- if self is CountryEnum.LU:
- return lu()
- if self is CountryEnum.MO:
- return mo()
- if self is CountryEnum.MG:
- return mg()
- if self is CountryEnum.MW:
- return mw()
- if self is CountryEnum.MY:
- return my()
- if self is CountryEnum.MV:
- return mv()
- if self is CountryEnum.ML:
- return ml()
- if self is CountryEnum.MT:
- return mt()
- if self is CountryEnum.MH:
- return mh()
- if self is CountryEnum.MQ:
- return mq()
- if self is CountryEnum.MR:
- return mr()
- if self is CountryEnum.MU:
- return mu()
- if self is CountryEnum.YT:
- return yt()
- if self is CountryEnum.MX:
- return mx()
- if self is CountryEnum.FM:
- return fm()
- if self is CountryEnum.MD:
- return md()
- if self is CountryEnum.MC:
- return mc()
- if self is CountryEnum.MN:
- return mn()
- if self is CountryEnum.ME:
- return me()
- if self is CountryEnum.MS:
- return ms()
- if self is CountryEnum.MA:
- return ma()
- if self is CountryEnum.MZ:
- return mz()
- if self is CountryEnum.MM:
- return mm()
- if self is CountryEnum.NA:
- return na()
- if self is CountryEnum.NR:
- return nr()
- if self is CountryEnum.NP:
- return np()
- if self is CountryEnum.NL:
- return nl()
- if self is CountryEnum.NC:
- return nc()
- if self is CountryEnum.NZ:
- return nz()
- if self is CountryEnum.NI:
- return ni()
- if self is CountryEnum.NE:
- return ne()
- if self is CountryEnum.NG:
- return ng()
- if self is CountryEnum.NU:
- return nu()
- if self is CountryEnum.NF:
- return nf()
- if self is CountryEnum.KP:
- return kp()
- if self is CountryEnum.MK:
- return mk()
- if self is CountryEnum.MP:
- return mp()
- if self is CountryEnum.NO:
- return no()
- if self is CountryEnum.OM:
- return om()
- if self is CountryEnum.PK:
- return pk()
- if self is CountryEnum.PW:
- return pw()
- if self is CountryEnum.PS:
- return ps()
- if self is CountryEnum.PA:
- return pa()
- if self is CountryEnum.PG:
- return pg()
- if self is CountryEnum.PY:
- return py()
- if self is CountryEnum.PE:
- return pe()
- if self is CountryEnum.PH:
- return ph()
- if self is CountryEnum.PN:
- return pn()
- if self is CountryEnum.PL:
- return pl()
- if self is CountryEnum.PT:
- return pt()
- if self is CountryEnum.PR:
- return pr()
- if self is CountryEnum.QA:
- return qa()
- if self is CountryEnum.RE:
- return re()
- if self is CountryEnum.RO:
- return ro()
- if self is CountryEnum.RU:
- return ru()
- if self is CountryEnum.RW:
- return rw()
- if self is CountryEnum.BL:
- return bl()
- if self is CountryEnum.SH:
- return sh()
- if self is CountryEnum.KN:
- return kn()
- if self is CountryEnum.LC:
- return lc()
- if self is CountryEnum.MF:
- return mf()
- if self is CountryEnum.PM:
- return pm()
- if self is CountryEnum.VC:
- return vc()
- if self is CountryEnum.WS:
- return ws()
- if self is CountryEnum.SM:
- return sm()
- if self is CountryEnum.ST:
- return st()
- if self is CountryEnum.SA:
- return sa()
- if self is CountryEnum.SN:
- return sn()
- if self is CountryEnum.RS:
- return rs()
- if self is CountryEnum.SC:
- return sc()
- if self is CountryEnum.SL:
- return sl()
- if self is CountryEnum.SG:
- return sg()
- if self is CountryEnum.SX:
- return sx()
- if self is CountryEnum.SK:
- return sk()
- if self is CountryEnum.SI:
- return si()
- if self is CountryEnum.SB:
- return sb()
- if self is CountryEnum.SO:
- return so()
- if self is CountryEnum.ZA:
- return za()
- if self is CountryEnum.GS:
- return gs()
- if self is CountryEnum.KR:
- return kr()
- if self is CountryEnum.SS:
- return ss()
- if self is CountryEnum.ES:
- return es()
- if self is CountryEnum.LK:
- return lk()
- if self is CountryEnum.SD:
- return sd()
- if self is CountryEnum.SR:
- return sr()
- if self is CountryEnum.SJ:
- return sj()
- if self is CountryEnum.SE:
- return se()
- if self is CountryEnum.CH:
- return ch()
- if self is CountryEnum.SY:
- return sy()
- if self is CountryEnum.TW:
- return tw()
- if self is CountryEnum.TJ:
- return tj()
- if self is CountryEnum.TZ:
- return tz()
- if self is CountryEnum.TH:
- return th()
- if self is CountryEnum.TL:
- return tl()
- if self is CountryEnum.TG:
- return tg()
- if self is CountryEnum.TK:
- return tk()
- if self is CountryEnum.TO:
- return to()
- if self is CountryEnum.TT:
- return tt()
- if self is CountryEnum.TN:
- return tn()
- if self is CountryEnum.TR:
- return tr()
- if self is CountryEnum.TM:
- return tm()
- if self is CountryEnum.TC:
- return tc()
- if self is CountryEnum.TV:
- return tv()
- if self is CountryEnum.UG:
- return ug()
- if self is CountryEnum.UA:
- return ua()
- if self is CountryEnum.AE:
- return ae()
- if self is CountryEnum.GB:
- return gb()
- if self is CountryEnum.UM:
- return um()
- if self is CountryEnum.US:
- return us()
- if self is CountryEnum.UY:
- return uy()
- if self is CountryEnum.UZ:
- return uz()
- if self is CountryEnum.VU:
- return vu()
- if self is CountryEnum.VE:
- return ve()
- if self is CountryEnum.VN:
- return vn()
- if self is CountryEnum.VG:
- return vg()
- if self is CountryEnum.VI:
- return vi()
- if self is CountryEnum.WF:
- return wf()
- if self is CountryEnum.EH:
- return eh()
- if self is CountryEnum.YE:
- return ye()
- if self is CountryEnum.ZM:
- return zm()
- if self is CountryEnum.ZW:
- return zw()
+CountryEnum = typing.Union[
+ typing.Literal[
+ "AF",
+ "AX",
+ "AL",
+ "DZ",
+ "AS",
+ "AD",
+ "AO",
+ "AI",
+ "AQ",
+ "AG",
+ "AR",
+ "AM",
+ "AW",
+ "AU",
+ "AT",
+ "AZ",
+ "BS",
+ "BH",
+ "BD",
+ "BB",
+ "BY",
+ "BE",
+ "BZ",
+ "BJ",
+ "BM",
+ "BT",
+ "BO",
+ "BQ",
+ "BA",
+ "BW",
+ "BV",
+ "BR",
+ "IO",
+ "BN",
+ "BG",
+ "BF",
+ "BI",
+ "CV",
+ "KH",
+ "CM",
+ "CA",
+ "KY",
+ "CF",
+ "TD",
+ "CL",
+ "CN",
+ "CX",
+ "CC",
+ "CO",
+ "KM",
+ "CG",
+ "CD",
+ "CK",
+ "CR",
+ "CI",
+ "HR",
+ "CU",
+ "CW",
+ "CY",
+ "CZ",
+ "DK",
+ "DJ",
+ "DM",
+ "DO",
+ "EC",
+ "EG",
+ "SV",
+ "GQ",
+ "ER",
+ "EE",
+ "SZ",
+ "ET",
+ "FK",
+ "FO",
+ "FJ",
+ "FI",
+ "FR",
+ "GF",
+ "PF",
+ "TF",
+ "GA",
+ "GM",
+ "GE",
+ "DE",
+ "GH",
+ "GI",
+ "GR",
+ "GL",
+ "GD",
+ "GP",
+ "GU",
+ "GT",
+ "GG",
+ "GN",
+ "GW",
+ "GY",
+ "HT",
+ "HM",
+ "VA",
+ "HN",
+ "HK",
+ "HU",
+ "IS",
+ "IN",
+ "ID",
+ "IR",
+ "IQ",
+ "IE",
+ "IM",
+ "IL",
+ "IT",
+ "JM",
+ "JP",
+ "JE",
+ "JO",
+ "KZ",
+ "KE",
+ "KI",
+ "KW",
+ "KG",
+ "LA",
+ "LV",
+ "LB",
+ "LS",
+ "LR",
+ "LY",
+ "LI",
+ "LT",
+ "LU",
+ "MO",
+ "MG",
+ "MW",
+ "MY",
+ "MV",
+ "ML",
+ "MT",
+ "MH",
+ "MQ",
+ "MR",
+ "MU",
+ "YT",
+ "MX",
+ "FM",
+ "MD",
+ "MC",
+ "MN",
+ "ME",
+ "MS",
+ "MA",
+ "MZ",
+ "MM",
+ "NA",
+ "NR",
+ "NP",
+ "NL",
+ "NC",
+ "NZ",
+ "NI",
+ "NE",
+ "NG",
+ "NU",
+ "NF",
+ "KP",
+ "MK",
+ "MP",
+ "NO",
+ "OM",
+ "PK",
+ "PW",
+ "PS",
+ "PA",
+ "PG",
+ "PY",
+ "PE",
+ "PH",
+ "PN",
+ "PL",
+ "PT",
+ "PR",
+ "QA",
+ "RE",
+ "RO",
+ "RU",
+ "RW",
+ "BL",
+ "SH",
+ "KN",
+ "LC",
+ "MF",
+ "PM",
+ "VC",
+ "WS",
+ "SM",
+ "ST",
+ "SA",
+ "SN",
+ "RS",
+ "SC",
+ "SL",
+ "SG",
+ "SX",
+ "SK",
+ "SI",
+ "SB",
+ "SO",
+ "ZA",
+ "GS",
+ "KR",
+ "SS",
+ "ES",
+ "LK",
+ "SD",
+ "SR",
+ "SJ",
+ "SE",
+ "CH",
+ "SY",
+ "TW",
+ "TJ",
+ "TZ",
+ "TH",
+ "TL",
+ "TG",
+ "TK",
+ "TO",
+ "TT",
+ "TN",
+ "TR",
+ "TM",
+ "TC",
+ "TV",
+ "UG",
+ "UA",
+ "AE",
+ "GB",
+ "UM",
+ "US",
+ "UY",
+ "UZ",
+ "VU",
+ "VE",
+ "VN",
+ "VG",
+ "VI",
+ "WF",
+ "EH",
+ "YE",
+ "ZM",
+ "ZW",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/types/credit_note.py b/src/merge/resources/accounting/types/credit_note.py
index 63e68183..bd46401b 100644
--- a/src/merge/resources/accounting/types/credit_note.py
+++ b/src/merge/resources/accounting/types/credit_note.py
@@ -1,23 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .credit_note_accounting_period import CreditNoteAccountingPeriod
-from .credit_note_applied_payments_item import CreditNoteAppliedPaymentsItem
-from .credit_note_company import CreditNoteCompany
+import pydantic
+import datetime as dt
+from .credit_note_status import CreditNoteStatus
from .credit_note_contact import CreditNoteContact
-from .credit_note_currency import CreditNoteCurrency
+from .credit_note_company import CreditNoteCompany
from .credit_note_line_item import CreditNoteLineItem
-from .credit_note_payments_item import CreditNotePaymentsItem
-from .credit_note_status import CreditNoteStatus
from .credit_note_tracking_categories_item import CreditNoteTrackingCategoriesItem
+from .credit_note_currency import CreditNoteCurrency
+from .credit_note_payments_item import CreditNotePaymentsItem
+from .credit_note_applied_payments_item import CreditNoteAppliedPaymentsItem
+from .credit_note_accounting_period import CreditNoteAccountingPeriod
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CreditNote(pydantic_v1.BaseModel):
+class CreditNote(UniversalBaseModel):
"""
# The CreditNote Object
@@ -31,27 +31,27 @@ class CreditNote(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The credit note's transaction date.
"""
- status: typing.Optional[CreditNoteStatus] = pydantic_v1.Field()
+ status: typing.Optional[CreditNoteStatus] = pydantic.Field()
"""
The credit note's status.
@@ -60,39 +60,44 @@ class CreditNote(pydantic_v1.BaseModel):
- `PAID` - PAID
"""
- number: typing.Optional[str] = pydantic_v1.Field()
+ number: typing.Optional[str] = pydantic.Field()
"""
The credit note's number.
"""
- contact: typing.Optional[CreditNoteContact] = pydantic_v1.Field()
+ contact: typing.Optional[CreditNoteContact] = pydantic.Field()
"""
The credit note's contact.
"""
- company: typing.Optional[CreditNoteCompany] = pydantic_v1.Field()
+ company: typing.Optional[CreditNoteCompany] = pydantic.Field()
"""
The company the credit note belongs to.
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The credit note's exchange rate.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The credit note's total amount.
"""
- remaining_credit: typing.Optional[float] = pydantic_v1.Field()
+ remaining_credit: typing.Optional[float] = pydantic.Field()
"""
The amount of value remaining in the credit note that the customer can use.
"""
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
line_items: typing.Optional[typing.List[CreditNoteLineItem]]
tracking_categories: typing.Optional[typing.List[typing.Optional[CreditNoteTrackingCategoriesItem]]]
- currency: typing.Optional[CreditNoteCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[CreditNoteCurrency] = pydantic.Field()
"""
The credit note's currency.
@@ -404,53 +409,44 @@ class CreditNote(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's credit note was created.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's credit note was updated.
"""
- payments: typing.Optional[typing.List[typing.Optional[CreditNotePaymentsItem]]] = pydantic_v1.Field()
+ payments: typing.Optional[typing.List[typing.Optional[CreditNotePaymentsItem]]] = pydantic.Field()
"""
Array of `Payment` object IDs
"""
- applied_payments: typing.Optional[typing.List[typing.Optional[CreditNoteAppliedPaymentsItem]]] = pydantic_v1.Field()
+ applied_payments: typing.Optional[typing.List[typing.Optional[CreditNoteAppliedPaymentsItem]]] = pydantic.Field()
"""
A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- accounting_period: typing.Optional[CreditNoteAccountingPeriod] = pydantic_v1.Field()
+ accounting_period: typing.Optional[CreditNoteAccountingPeriod] = pydantic.Field()
"""
The accounting period that the CreditNote was generated in.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/credit_note_accounting_period.py b/src/merge/resources/accounting/types/credit_note_accounting_period.py
index 77c885ce..5f50c051 100644
--- a/src/merge/resources/accounting/types/credit_note_accounting_period.py
+++ b/src/merge/resources/accounting/types/credit_note_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
CreditNoteAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/credit_note_applied_payments_item.py b/src/merge/resources/accounting/types/credit_note_applied_payments_item.py
index 8efbe1cb..b59fd182 100644
--- a/src/merge/resources/accounting/types/credit_note_applied_payments_item.py
+++ b/src/merge/resources/accounting/types/credit_note_applied_payments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_line_item import PaymentLineItem
CreditNoteAppliedPaymentsItem = typing.Union[str, PaymentLineItem]
diff --git a/src/merge/resources/accounting/types/credit_note_company.py b/src/merge/resources/accounting/types/credit_note_company.py
index 1241eff2..4f7554c6 100644
--- a/src/merge/resources/accounting/types/credit_note_company.py
+++ b/src/merge/resources/accounting/types/credit_note_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
CreditNoteCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/credit_note_contact.py b/src/merge/resources/accounting/types/credit_note_contact.py
index 58479d5e..bdb550da 100644
--- a/src/merge/resources/accounting/types/credit_note_contact.py
+++ b/src/merge/resources/accounting/types/credit_note_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
CreditNoteContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/credit_note_currency.py b/src/merge/resources/accounting/types/credit_note_currency.py
index 2c4331cc..af20c4c8 100644
--- a/src/merge/resources/accounting/types/credit_note_currency.py
+++ b/src/merge/resources/accounting/types/credit_note_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
CreditNoteCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/credit_note_line_item.py b/src/merge/resources/accounting/types/credit_note_line_item.py
index 85ff29d2..216581c6 100644
--- a/src/merge/resources/accounting/types/credit_note_line_item.py
+++ b/src/merge/resources/accounting/types/credit_note_line_item.py
@@ -1,101 +1,97 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .credit_note_line_item_company import CreditNoteLineItemCompany
+import pydantic
+import datetime as dt
from .credit_note_line_item_item import CreditNoteLineItemItem
+from .credit_note_line_item_company import CreditNoteLineItemCompany
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CreditNoteLineItem(pydantic_v1.BaseModel):
+class CreditNoteLineItem(UniversalBaseModel):
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
item: typing.Optional[CreditNoteLineItemItem]
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The credit note line item's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The description of the item that is owed.
"""
- quantity: typing.Optional[str] = pydantic_v1.Field()
+ quantity: typing.Optional[str] = pydantic.Field()
"""
The credit note line item's quantity.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
The credit note line item's memo.
"""
- unit_price: typing.Optional[str] = pydantic_v1.Field()
+ unit_price: typing.Optional[str] = pydantic.Field()
"""
The credit note line item's unit price.
"""
- total_line_amount: typing.Optional[str] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rate that applies to this line item.
+ """
+
+ total_line_amount: typing.Optional[str] = pydantic.Field()
"""
The credit note line item's total.
"""
- tracking_category: typing.Optional[str] = pydantic_v1.Field()
+ tracking_category: typing.Optional[str] = pydantic.Field()
"""
The credit note line item's associated tracking category.
"""
- tracking_categories: typing.List[str] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The credit note line item's associated tracking categories.
"""
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The credit note line item's account.
"""
- company: typing.Optional[CreditNoteLineItemCompany] = pydantic_v1.Field()
+ company: typing.Optional[CreditNoteLineItemCompany] = pydantic.Field()
"""
The company the credit note belongs to.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/credit_note_line_item_company.py b/src/merge/resources/accounting/types/credit_note_line_item_company.py
index 87e55a57..c7aa8773 100644
--- a/src/merge/resources/accounting/types/credit_note_line_item_company.py
+++ b/src/merge/resources/accounting/types/credit_note_line_item_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
CreditNoteLineItemCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/credit_note_line_item_item.py b/src/merge/resources/accounting/types/credit_note_line_item_item.py
index 87bf291e..f95f4fb0 100644
--- a/src/merge/resources/accounting/types/credit_note_line_item_item.py
+++ b/src/merge/resources/accounting/types/credit_note_line_item_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .item import Item
CreditNoteLineItemItem = typing.Union[str, Item]
diff --git a/src/merge/resources/accounting/types/credit_note_payments_item.py b/src/merge/resources/accounting/types/credit_note_payments_item.py
index eb5a2c36..ddc66a85 100644
--- a/src/merge/resources/accounting/types/credit_note_payments_item.py
+++ b/src/merge/resources/accounting/types/credit_note_payments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment import Payment
CreditNotePaymentsItem = typing.Union[str, Payment]
diff --git a/src/merge/resources/accounting/types/credit_note_status.py b/src/merge/resources/accounting/types/credit_note_status.py
index c4bccb8b..6872cb01 100644
--- a/src/merge/resources/accounting/types/credit_note_status.py
+++ b/src/merge/resources/accounting/types/credit_note_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .credit_note_status_enum import CreditNoteStatusEnum
CreditNoteStatus = typing.Union[CreditNoteStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/credit_note_status_enum.py b/src/merge/resources/accounting/types/credit_note_status_enum.py
index 6782fcc5..3084d518 100644
--- a/src/merge/resources/accounting/types/credit_note_status_enum.py
+++ b/src/merge/resources/accounting/types/credit_note_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CreditNoteStatusEnum(str, enum.Enum):
- """
- - `SUBMITTED` - SUBMITTED
- - `AUTHORIZED` - AUTHORIZED
- - `PAID` - PAID
- """
-
- SUBMITTED = "SUBMITTED"
- AUTHORIZED = "AUTHORIZED"
- PAID = "PAID"
-
- def visit(
- self,
- submitted: typing.Callable[[], T_Result],
- authorized: typing.Callable[[], T_Result],
- paid: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CreditNoteStatusEnum.SUBMITTED:
- return submitted()
- if self is CreditNoteStatusEnum.AUTHORIZED:
- return authorized()
- if self is CreditNoteStatusEnum.PAID:
- return paid()
+CreditNoteStatusEnum = typing.Union[typing.Literal["SUBMITTED", "AUTHORIZED", "PAID"], typing.Any]
diff --git a/src/merge/resources/accounting/types/credit_note_tracking_categories_item.py b/src/merge/resources/accounting/types/credit_note_tracking_categories_item.py
index 8d0758d3..96069936 100644
--- a/src/merge/resources/accounting/types/credit_note_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/credit_note_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
CreditNoteTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/currency_enum.py b/src/merge/resources/accounting/types/currency_enum.py
index b9cf3426..6d7acc72 100644
--- a/src/merge/resources/accounting/types/currency_enum.py
+++ b/src/merge/resources/accounting/types/currency_enum.py
@@ -1,1546 +1,315 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CurrencyEnum(str, enum.Enum):
- """
- - `XUA` - ADB Unit of Account
- - `AFN` - Afghan Afghani
- - `AFA` - Afghan Afghani (1927β2002)
- - `ALL` - Albanian Lek
- - `ALK` - Albanian Lek (1946β1965)
- - `DZD` - Algerian Dinar
- - `ADP` - Andorran Peseta
- - `AOA` - Angolan Kwanza
- - `AOK` - Angolan Kwanza (1977β1991)
- - `AON` - Angolan New Kwanza (1990β2000)
- - `AOR` - Angolan Readjusted Kwanza (1995β1999)
- - `ARA` - Argentine Austral
- - `ARS` - Argentine Peso
- - `ARM` - Argentine Peso (1881β1970)
- - `ARP` - Argentine Peso (1983β1985)
- - `ARL` - Argentine Peso Ley (1970β1983)
- - `AMD` - Armenian Dram
- - `AWG` - Aruban Florin
- - `AUD` - Australian Dollar
- - `ATS` - Austrian Schilling
- - `AZN` - Azerbaijani Manat
- - `AZM` - Azerbaijani Manat (1993β2006)
- - `BSD` - Bahamian Dollar
- - `BHD` - Bahraini Dinar
- - `BDT` - Bangladeshi Taka
- - `BBD` - Barbadian Dollar
- - `BYN` - Belarusian Ruble
- - `BYB` - Belarusian Ruble (1994β1999)
- - `BYR` - Belarusian Ruble (2000β2016)
- - `BEF` - Belgian Franc
- - `BEC` - Belgian Franc (convertible)
- - `BEL` - Belgian Franc (financial)
- - `BZD` - Belize Dollar
- - `BMD` - Bermudan Dollar
- - `BTN` - Bhutanese Ngultrum
- - `BOB` - Bolivian Boliviano
- - `BOL` - Bolivian Boliviano (1863β1963)
- - `BOV` - Bolivian Mvdol
- - `BOP` - Bolivian Peso
- - `BAM` - Bosnia-Herzegovina Convertible Mark
- - `BAD` - Bosnia-Herzegovina Dinar (1992β1994)
- - `BAN` - Bosnia-Herzegovina New Dinar (1994β1997)
- - `BWP` - Botswanan Pula
- - `BRC` - Brazilian Cruzado (1986β1989)
- - `BRZ` - Brazilian Cruzeiro (1942β1967)
- - `BRE` - Brazilian Cruzeiro (1990β1993)
- - `BRR` - Brazilian Cruzeiro (1993β1994)
- - `BRN` - Brazilian New Cruzado (1989β1990)
- - `BRB` - Brazilian New Cruzeiro (1967β1986)
- - `BRL` - Brazilian Real
- - `GBP` - British Pound
- - `BND` - Brunei Dollar
- - `BGL` - Bulgarian Hard Lev
- - `BGN` - Bulgarian Lev
- - `BGO` - Bulgarian Lev (1879β1952)
- - `BGM` - Bulgarian Socialist Lev
- - `BUK` - Burmese Kyat
- - `BIF` - Burundian Franc
- - `XPF` - CFP Franc
- - `KHR` - Cambodian Riel
- - `CAD` - Canadian Dollar
- - `CVE` - Cape Verdean Escudo
- - `KYD` - Cayman Islands Dollar
- - `XAF` - Central African CFA Franc
- - `CLE` - Chilean Escudo
- - `CLP` - Chilean Peso
- - `CLF` - Chilean Unit of Account (UF)
- - `CNX` - Chinese Peopleβs Bank Dollar
- - `CNY` - Chinese Yuan
- - `CNH` - Chinese Yuan (offshore)
- - `COP` - Colombian Peso
- - `COU` - Colombian Real Value Unit
- - `KMF` - Comorian Franc
- - `CDF` - Congolese Franc
- - `CRC` - Costa Rican ColΓ³n
- - `HRD` - Croatian Dinar
- - `HRK` - Croatian Kuna
- - `CUC` - Cuban Convertible Peso
- - `CUP` - Cuban Peso
- - `CYP` - Cypriot Pound
- - `CZK` - Czech Koruna
- - `CSK` - Czechoslovak Hard Koruna
- - `DKK` - Danish Krone
- - `DJF` - Djiboutian Franc
- - `DOP` - Dominican Peso
- - `NLG` - Dutch Guilder
- - `XCD` - East Caribbean Dollar
- - `DDM` - East German Mark
- - `ECS` - Ecuadorian Sucre
- - `ECV` - Ecuadorian Unit of Constant Value
- - `EGP` - Egyptian Pound
- - `GQE` - Equatorial Guinean Ekwele
- - `ERN` - Eritrean Nakfa
- - `EEK` - Estonian Kroon
- - `ETB` - Ethiopian Birr
- - `EUR` - Euro
- - `XBA` - European Composite Unit
- - `XEU` - European Currency Unit
- - `XBB` - European Monetary Unit
- - `XBC` - European Unit of Account (XBC)
- - `XBD` - European Unit of Account (XBD)
- - `FKP` - Falkland Islands Pound
- - `FJD` - Fijian Dollar
- - `FIM` - Finnish Markka
- - `FRF` - French Franc
- - `XFO` - French Gold Franc
- - `XFU` - French UIC-Franc
- - `GMD` - Gambian Dalasi
- - `GEK` - Georgian Kupon Larit
- - `GEL` - Georgian Lari
- - `DEM` - German Mark
- - `GHS` - Ghanaian Cedi
- - `GHC` - Ghanaian Cedi (1979β2007)
- - `GIP` - Gibraltar Pound
- - `XAU` - Gold
- - `GRD` - Greek Drachma
- - `GTQ` - Guatemalan Quetzal
- - `GWP` - Guinea-Bissau Peso
- - `GNF` - Guinean Franc
- - `GNS` - Guinean Syli
- - `GYD` - Guyanaese Dollar
- - `HTG` - Haitian Gourde
- - `HNL` - Honduran Lempira
- - `HKD` - Hong Kong Dollar
- - `HUF` - Hungarian Forint
- - `IMP` - IMP
- - `ISK` - Icelandic KrΓ³na
- - `ISJ` - Icelandic KrΓ³na (1918β1981)
- - `INR` - Indian Rupee
- - `IDR` - Indonesian Rupiah
- - `IRR` - Iranian Rial
- - `IQD` - Iraqi Dinar
- - `IEP` - Irish Pound
- - `ILS` - Israeli New Shekel
- - `ILP` - Israeli Pound
- - `ILR` - Israeli Shekel (1980β1985)
- - `ITL` - Italian Lira
- - `JMD` - Jamaican Dollar
- - `JPY` - Japanese Yen
- - `JOD` - Jordanian Dinar
- - `KZT` - Kazakhstani Tenge
- - `KES` - Kenyan Shilling
- - `KWD` - Kuwaiti Dinar
- - `KGS` - Kyrgystani Som
- - `LAK` - Laotian Kip
- - `LVL` - Latvian Lats
- - `LVR` - Latvian Ruble
- - `LBP` - Lebanese Pound
- - `LSL` - Lesotho Loti
- - `LRD` - Liberian Dollar
- - `LYD` - Libyan Dinar
- - `LTL` - Lithuanian Litas
- - `LTT` - Lithuanian Talonas
- - `LUL` - Luxembourg Financial Franc
- - `LUC` - Luxembourgian Convertible Franc
- - `LUF` - Luxembourgian Franc
- - `MOP` - Macanese Pataca
- - `MKD` - Macedonian Denar
- - `MKN` - Macedonian Denar (1992β1993)
- - `MGA` - Malagasy Ariary
- - `MGF` - Malagasy Franc
- - `MWK` - Malawian Kwacha
- - `MYR` - Malaysian Ringgit
- - `MVR` - Maldivian Rufiyaa
- - `MVP` - Maldivian Rupee (1947β1981)
- - `MLF` - Malian Franc
- - `MTL` - Maltese Lira
- - `MTP` - Maltese Pound
- - `MRU` - Mauritanian Ouguiya
- - `MRO` - Mauritanian Ouguiya (1973β2017)
- - `MUR` - Mauritian Rupee
- - `MXV` - Mexican Investment Unit
- - `MXN` - Mexican Peso
- - `MXP` - Mexican Silver Peso (1861β1992)
- - `MDC` - Moldovan Cupon
- - `MDL` - Moldovan Leu
- - `MCF` - Monegasque Franc
- - `MNT` - Mongolian Tugrik
- - `MAD` - Moroccan Dirham
- - `MAF` - Moroccan Franc
- - `MZE` - Mozambican Escudo
- - `MZN` - Mozambican Metical
- - `MZM` - Mozambican Metical (1980β2006)
- - `MMK` - Myanmar Kyat
- - `NAD` - Namibian Dollar
- - `NPR` - Nepalese Rupee
- - `ANG` - Netherlands Antillean Guilder
- - `TWD` - New Taiwan Dollar
- - `NZD` - New Zealand Dollar
- - `NIO` - Nicaraguan CΓ³rdoba
- - `NIC` - Nicaraguan CΓ³rdoba (1988β1991)
- - `NGN` - Nigerian Naira
- - `KPW` - North Korean Won
- - `NOK` - Norwegian Krone
- - `OMR` - Omani Rial
- - `PKR` - Pakistani Rupee
- - `XPD` - Palladium
- - `PAB` - Panamanian Balboa
- - `PGK` - Papua New Guinean Kina
- - `PYG` - Paraguayan Guarani
- - `PEI` - Peruvian Inti
- - `PEN` - Peruvian Sol
- - `PES` - Peruvian Sol (1863β1965)
- - `PHP` - Philippine Peso
- - `XPT` - Platinum
- - `PLN` - Polish Zloty
- - `PLZ` - Polish Zloty (1950β1995)
- - `PTE` - Portuguese Escudo
- - `GWE` - Portuguese Guinea Escudo
- - `QAR` - Qatari Rial
- - `XRE` - RINET Funds
- - `RHD` - Rhodesian Dollar
- - `RON` - Romanian Leu
- - `ROL` - Romanian Leu (1952β2006)
- - `RUB` - Russian Ruble
- - `RUR` - Russian Ruble (1991β1998)
- - `RWF` - Rwandan Franc
- - `SVC` - Salvadoran ColΓ³n
- - `WST` - Samoan Tala
- - `SAR` - Saudi Riyal
- - `RSD` - Serbian Dinar
- - `CSD` - Serbian Dinar (2002β2006)
- - `SCR` - Seychellois Rupee
- - `SLL` - Sierra Leonean Leone
- - `XAG` - Silver
- - `SGD` - Singapore Dollar
- - `SKK` - Slovak Koruna
- - `SIT` - Slovenian Tolar
- - `SBD` - Solomon Islands Dollar
- - `SOS` - Somali Shilling
- - `ZAR` - South African Rand
- - `ZAL` - South African Rand (financial)
- - `KRH` - South Korean Hwan (1953β1962)
- - `KRW` - South Korean Won
- - `KRO` - South Korean Won (1945β1953)
- - `SSP` - South Sudanese Pound
- - `SUR` - Soviet Rouble
- - `ESP` - Spanish Peseta
- - `ESA` - Spanish Peseta (A account)
- - `ESB` - Spanish Peseta (convertible account)
- - `XDR` - Special Drawing Rights
- - `LKR` - Sri Lankan Rupee
- - `SHP` - St. Helena Pound
- - `XSU` - Sucre
- - `SDD` - Sudanese Dinar (1992β2007)
- - `SDG` - Sudanese Pound
- - `SDP` - Sudanese Pound (1957β1998)
- - `SRD` - Surinamese Dollar
- - `SRG` - Surinamese Guilder
- - `SZL` - Swazi Lilangeni
- - `SEK` - Swedish Krona
- - `CHF` - Swiss Franc
- - `SYP` - Syrian Pound
- - `STN` - SΓ£o TomΓ© & PrΓncipe Dobra
- - `STD` - SΓ£o TomΓ© & PrΓncipe Dobra (1977β2017)
- - `TVD` - TVD
- - `TJR` - Tajikistani Ruble
- - `TJS` - Tajikistani Somoni
- - `TZS` - Tanzanian Shilling
- - `XTS` - Testing Currency Code
- - `THB` - Thai Baht
- - `XXX` - The codes assigned for transactions where no currency is involved
- - `TPE` - Timorese Escudo
- - `TOP` - Tongan PaΚ»anga
- - `TTD` - Trinidad & Tobago Dollar
- - `TND` - Tunisian Dinar
- - `TRY` - Turkish Lira
- - `TRL` - Turkish Lira (1922β2005)
- - `TMT` - Turkmenistani Manat
- - `TMM` - Turkmenistani Manat (1993β2009)
- - `USD` - US Dollar
- - `USN` - US Dollar (Next day)
- - `USS` - US Dollar (Same day)
- - `UGX` - Ugandan Shilling
- - `UGS` - Ugandan Shilling (1966β1987)
- - `UAH` - Ukrainian Hryvnia
- - `UAK` - Ukrainian Karbovanets
- - `AED` - United Arab Emirates Dirham
- - `UYW` - Uruguayan Nominal Wage Index Unit
- - `UYU` - Uruguayan Peso
- - `UYP` - Uruguayan Peso (1975β1993)
- - `UYI` - Uruguayan Peso (Indexed Units)
- - `UZS` - Uzbekistani Som
- - `VUV` - Vanuatu Vatu
- - `VES` - Venezuelan BolΓvar
- - `VEB` - Venezuelan BolΓvar (1871β2008)
- - `VEF` - Venezuelan BolΓvar (2008β2018)
- - `VND` - Vietnamese Dong
- - `VNN` - Vietnamese Dong (1978β1985)
- - `CHE` - WIR Euro
- - `CHW` - WIR Franc
- - `XOF` - West African CFA Franc
- - `YDD` - Yemeni Dinar
- - `YER` - Yemeni Rial
- - `YUN` - Yugoslavian Convertible Dinar (1990β1992)
- - `YUD` - Yugoslavian Hard Dinar (1966β1990)
- - `YUM` - Yugoslavian New Dinar (1994β2002)
- - `YUR` - Yugoslavian Reformed Dinar (1992β1993)
- - `ZWN` - ZWN
- - `ZRN` - Zairean New Zaire (1993β1998)
- - `ZRZ` - Zairean Zaire (1971β1993)
- - `ZMW` - Zambian Kwacha
- - `ZMK` - Zambian Kwacha (1968β2012)
- - `ZWD` - Zimbabwean Dollar (1980β2008)
- - `ZWR` - Zimbabwean Dollar (2008)
- - `ZWL` - Zimbabwean Dollar (2009)
- """
-
- XUA = "XUA"
- AFN = "AFN"
- AFA = "AFA"
- ALL = "ALL"
- ALK = "ALK"
- DZD = "DZD"
- ADP = "ADP"
- AOA = "AOA"
- AOK = "AOK"
- AON = "AON"
- AOR = "AOR"
- ARA = "ARA"
- ARS = "ARS"
- ARM = "ARM"
- ARP = "ARP"
- ARL = "ARL"
- AMD = "AMD"
- AWG = "AWG"
- AUD = "AUD"
- ATS = "ATS"
- AZN = "AZN"
- AZM = "AZM"
- BSD = "BSD"
- BHD = "BHD"
- BDT = "BDT"
- BBD = "BBD"
- BYN = "BYN"
- BYB = "BYB"
- BYR = "BYR"
- BEF = "BEF"
- BEC = "BEC"
- BEL = "BEL"
- BZD = "BZD"
- BMD = "BMD"
- BTN = "BTN"
- BOB = "BOB"
- BOL = "BOL"
- BOV = "BOV"
- BOP = "BOP"
- BAM = "BAM"
- BAD = "BAD"
- BAN = "BAN"
- BWP = "BWP"
- BRC = "BRC"
- BRZ = "BRZ"
- BRE = "BRE"
- BRR = "BRR"
- BRN = "BRN"
- BRB = "BRB"
- BRL = "BRL"
- GBP = "GBP"
- BND = "BND"
- BGL = "BGL"
- BGN = "BGN"
- BGO = "BGO"
- BGM = "BGM"
- BUK = "BUK"
- BIF = "BIF"
- XPF = "XPF"
- KHR = "KHR"
- CAD = "CAD"
- CVE = "CVE"
- KYD = "KYD"
- XAF = "XAF"
- CLE = "CLE"
- CLP = "CLP"
- CLF = "CLF"
- CNX = "CNX"
- CNY = "CNY"
- CNH = "CNH"
- COP = "COP"
- COU = "COU"
- KMF = "KMF"
- CDF = "CDF"
- CRC = "CRC"
- HRD = "HRD"
- HRK = "HRK"
- CUC = "CUC"
- CUP = "CUP"
- CYP = "CYP"
- CZK = "CZK"
- CSK = "CSK"
- DKK = "DKK"
- DJF = "DJF"
- DOP = "DOP"
- NLG = "NLG"
- XCD = "XCD"
- DDM = "DDM"
- ECS = "ECS"
- ECV = "ECV"
- EGP = "EGP"
- GQE = "GQE"
- ERN = "ERN"
- EEK = "EEK"
- ETB = "ETB"
- EUR = "EUR"
- XBA = "XBA"
- XEU = "XEU"
- XBB = "XBB"
- XBC = "XBC"
- XBD = "XBD"
- FKP = "FKP"
- FJD = "FJD"
- FIM = "FIM"
- FRF = "FRF"
- XFO = "XFO"
- XFU = "XFU"
- GMD = "GMD"
- GEK = "GEK"
- GEL = "GEL"
- DEM = "DEM"
- GHS = "GHS"
- GHC = "GHC"
- GIP = "GIP"
- XAU = "XAU"
- GRD = "GRD"
- GTQ = "GTQ"
- GWP = "GWP"
- GNF = "GNF"
- GNS = "GNS"
- GYD = "GYD"
- HTG = "HTG"
- HNL = "HNL"
- HKD = "HKD"
- HUF = "HUF"
- IMP = "IMP"
- ISK = "ISK"
- ISJ = "ISJ"
- INR = "INR"
- IDR = "IDR"
- IRR = "IRR"
- IQD = "IQD"
- IEP = "IEP"
- ILS = "ILS"
- ILP = "ILP"
- ILR = "ILR"
- ITL = "ITL"
- JMD = "JMD"
- JPY = "JPY"
- JOD = "JOD"
- KZT = "KZT"
- KES = "KES"
- KWD = "KWD"
- KGS = "KGS"
- LAK = "LAK"
- LVL = "LVL"
- LVR = "LVR"
- LBP = "LBP"
- LSL = "LSL"
- LRD = "LRD"
- LYD = "LYD"
- LTL = "LTL"
- LTT = "LTT"
- LUL = "LUL"
- LUC = "LUC"
- LUF = "LUF"
- MOP = "MOP"
- MKD = "MKD"
- MKN = "MKN"
- MGA = "MGA"
- MGF = "MGF"
- MWK = "MWK"
- MYR = "MYR"
- MVR = "MVR"
- MVP = "MVP"
- MLF = "MLF"
- MTL = "MTL"
- MTP = "MTP"
- MRU = "MRU"
- MRO = "MRO"
- MUR = "MUR"
- MXV = "MXV"
- MXN = "MXN"
- MXP = "MXP"
- MDC = "MDC"
- MDL = "MDL"
- MCF = "MCF"
- MNT = "MNT"
- MAD = "MAD"
- MAF = "MAF"
- MZE = "MZE"
- MZN = "MZN"
- MZM = "MZM"
- MMK = "MMK"
- NAD = "NAD"
- NPR = "NPR"
- ANG = "ANG"
- TWD = "TWD"
- NZD = "NZD"
- NIO = "NIO"
- NIC = "NIC"
- NGN = "NGN"
- KPW = "KPW"
- NOK = "NOK"
- OMR = "OMR"
- PKR = "PKR"
- XPD = "XPD"
- PAB = "PAB"
- PGK = "PGK"
- PYG = "PYG"
- PEI = "PEI"
- PEN = "PEN"
- PES = "PES"
- PHP = "PHP"
- XPT = "XPT"
- PLN = "PLN"
- PLZ = "PLZ"
- PTE = "PTE"
- GWE = "GWE"
- QAR = "QAR"
- XRE = "XRE"
- RHD = "RHD"
- RON = "RON"
- ROL = "ROL"
- RUB = "RUB"
- RUR = "RUR"
- RWF = "RWF"
- SVC = "SVC"
- WST = "WST"
- SAR = "SAR"
- RSD = "RSD"
- CSD = "CSD"
- SCR = "SCR"
- SLL = "SLL"
- XAG = "XAG"
- SGD = "SGD"
- SKK = "SKK"
- SIT = "SIT"
- SBD = "SBD"
- SOS = "SOS"
- ZAR = "ZAR"
- ZAL = "ZAL"
- KRH = "KRH"
- KRW = "KRW"
- KRO = "KRO"
- SSP = "SSP"
- SUR = "SUR"
- ESP = "ESP"
- ESA = "ESA"
- ESB = "ESB"
- XDR = "XDR"
- LKR = "LKR"
- SHP = "SHP"
- XSU = "XSU"
- SDD = "SDD"
- SDG = "SDG"
- SDP = "SDP"
- SRD = "SRD"
- SRG = "SRG"
- SZL = "SZL"
- SEK = "SEK"
- CHF = "CHF"
- SYP = "SYP"
- STN = "STN"
- STD = "STD"
- TVD = "TVD"
- TJR = "TJR"
- TJS = "TJS"
- TZS = "TZS"
- XTS = "XTS"
- THB = "THB"
- XXX = "XXX"
- TPE = "TPE"
- TOP = "TOP"
- TTD = "TTD"
- TND = "TND"
- TRY = "TRY"
- TRL = "TRL"
- TMT = "TMT"
- TMM = "TMM"
- USD = "USD"
- USN = "USN"
- USS = "USS"
- UGX = "UGX"
- UGS = "UGS"
- UAH = "UAH"
- UAK = "UAK"
- AED = "AED"
- UYW = "UYW"
- UYU = "UYU"
- UYP = "UYP"
- UYI = "UYI"
- UZS = "UZS"
- VUV = "VUV"
- VES = "VES"
- VEB = "VEB"
- VEF = "VEF"
- VND = "VND"
- VNN = "VNN"
- CHE = "CHE"
- CHW = "CHW"
- XOF = "XOF"
- YDD = "YDD"
- YER = "YER"
- YUN = "YUN"
- YUD = "YUD"
- YUM = "YUM"
- YUR = "YUR"
- ZWN = "ZWN"
- ZRN = "ZRN"
- ZRZ = "ZRZ"
- ZMW = "ZMW"
- ZMK = "ZMK"
- ZWD = "ZWD"
- ZWR = "ZWR"
- ZWL = "ZWL"
-
- def visit(
- self,
- xua: typing.Callable[[], T_Result],
- afn: typing.Callable[[], T_Result],
- afa: typing.Callable[[], T_Result],
- all_: typing.Callable[[], T_Result],
- alk: typing.Callable[[], T_Result],
- dzd: typing.Callable[[], T_Result],
- adp: typing.Callable[[], T_Result],
- aoa: typing.Callable[[], T_Result],
- aok: typing.Callable[[], T_Result],
- aon: typing.Callable[[], T_Result],
- aor: typing.Callable[[], T_Result],
- ara: typing.Callable[[], T_Result],
- ars: typing.Callable[[], T_Result],
- arm: typing.Callable[[], T_Result],
- arp: typing.Callable[[], T_Result],
- arl: typing.Callable[[], T_Result],
- amd: typing.Callable[[], T_Result],
- awg: typing.Callable[[], T_Result],
- aud: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- azn: typing.Callable[[], T_Result],
- azm: typing.Callable[[], T_Result],
- bsd: typing.Callable[[], T_Result],
- bhd: typing.Callable[[], T_Result],
- bdt: typing.Callable[[], T_Result],
- bbd: typing.Callable[[], T_Result],
- byn: typing.Callable[[], T_Result],
- byb: typing.Callable[[], T_Result],
- byr: typing.Callable[[], T_Result],
- bef: typing.Callable[[], T_Result],
- bec: typing.Callable[[], T_Result],
- bel: typing.Callable[[], T_Result],
- bzd: typing.Callable[[], T_Result],
- bmd: typing.Callable[[], T_Result],
- btn: typing.Callable[[], T_Result],
- bob: typing.Callable[[], T_Result],
- bol: typing.Callable[[], T_Result],
- bov: typing.Callable[[], T_Result],
- bop: typing.Callable[[], T_Result],
- bam: typing.Callable[[], T_Result],
- bad: typing.Callable[[], T_Result],
- ban: typing.Callable[[], T_Result],
- bwp: typing.Callable[[], T_Result],
- brc: typing.Callable[[], T_Result],
- brz: typing.Callable[[], T_Result],
- bre: typing.Callable[[], T_Result],
- brr: typing.Callable[[], T_Result],
- brn: typing.Callable[[], T_Result],
- brb: typing.Callable[[], T_Result],
- brl: typing.Callable[[], T_Result],
- gbp: typing.Callable[[], T_Result],
- bnd: typing.Callable[[], T_Result],
- bgl: typing.Callable[[], T_Result],
- bgn: typing.Callable[[], T_Result],
- bgo: typing.Callable[[], T_Result],
- bgm: typing.Callable[[], T_Result],
- buk: typing.Callable[[], T_Result],
- bif: typing.Callable[[], T_Result],
- xpf: typing.Callable[[], T_Result],
- khr: typing.Callable[[], T_Result],
- cad: typing.Callable[[], T_Result],
- cve: typing.Callable[[], T_Result],
- kyd: typing.Callable[[], T_Result],
- xaf: typing.Callable[[], T_Result],
- cle: typing.Callable[[], T_Result],
- clp: typing.Callable[[], T_Result],
- clf: typing.Callable[[], T_Result],
- cnx: typing.Callable[[], T_Result],
- cny: typing.Callable[[], T_Result],
- cnh: typing.Callable[[], T_Result],
- cop: typing.Callable[[], T_Result],
- cou: typing.Callable[[], T_Result],
- kmf: typing.Callable[[], T_Result],
- cdf: typing.Callable[[], T_Result],
- crc: typing.Callable[[], T_Result],
- hrd: typing.Callable[[], T_Result],
- hrk: typing.Callable[[], T_Result],
- cuc: typing.Callable[[], T_Result],
- cup: typing.Callable[[], T_Result],
- cyp: typing.Callable[[], T_Result],
- czk: typing.Callable[[], T_Result],
- csk: typing.Callable[[], T_Result],
- dkk: typing.Callable[[], T_Result],
- djf: typing.Callable[[], T_Result],
- dop: typing.Callable[[], T_Result],
- nlg: typing.Callable[[], T_Result],
- xcd: typing.Callable[[], T_Result],
- ddm: typing.Callable[[], T_Result],
- ecs: typing.Callable[[], T_Result],
- ecv: typing.Callable[[], T_Result],
- egp: typing.Callable[[], T_Result],
- gqe: typing.Callable[[], T_Result],
- ern: typing.Callable[[], T_Result],
- eek: typing.Callable[[], T_Result],
- etb: typing.Callable[[], T_Result],
- eur: typing.Callable[[], T_Result],
- xba: typing.Callable[[], T_Result],
- xeu: typing.Callable[[], T_Result],
- xbb: typing.Callable[[], T_Result],
- xbc: typing.Callable[[], T_Result],
- xbd: typing.Callable[[], T_Result],
- fkp: typing.Callable[[], T_Result],
- fjd: typing.Callable[[], T_Result],
- fim: typing.Callable[[], T_Result],
- frf: typing.Callable[[], T_Result],
- xfo: typing.Callable[[], T_Result],
- xfu: typing.Callable[[], T_Result],
- gmd: typing.Callable[[], T_Result],
- gek: typing.Callable[[], T_Result],
- gel: typing.Callable[[], T_Result],
- dem: typing.Callable[[], T_Result],
- ghs: typing.Callable[[], T_Result],
- ghc: typing.Callable[[], T_Result],
- gip: typing.Callable[[], T_Result],
- xau: typing.Callable[[], T_Result],
- grd: typing.Callable[[], T_Result],
- gtq: typing.Callable[[], T_Result],
- gwp: typing.Callable[[], T_Result],
- gnf: typing.Callable[[], T_Result],
- gns: typing.Callable[[], T_Result],
- gyd: typing.Callable[[], T_Result],
- htg: typing.Callable[[], T_Result],
- hnl: typing.Callable[[], T_Result],
- hkd: typing.Callable[[], T_Result],
- huf: typing.Callable[[], T_Result],
- imp: typing.Callable[[], T_Result],
- isk: typing.Callable[[], T_Result],
- isj: typing.Callable[[], T_Result],
- inr: typing.Callable[[], T_Result],
- idr: typing.Callable[[], T_Result],
- irr: typing.Callable[[], T_Result],
- iqd: typing.Callable[[], T_Result],
- iep: typing.Callable[[], T_Result],
- ils: typing.Callable[[], T_Result],
- ilp: typing.Callable[[], T_Result],
- ilr: typing.Callable[[], T_Result],
- itl: typing.Callable[[], T_Result],
- jmd: typing.Callable[[], T_Result],
- jpy: typing.Callable[[], T_Result],
- jod: typing.Callable[[], T_Result],
- kzt: typing.Callable[[], T_Result],
- kes: typing.Callable[[], T_Result],
- kwd: typing.Callable[[], T_Result],
- kgs: typing.Callable[[], T_Result],
- lak: typing.Callable[[], T_Result],
- lvl: typing.Callable[[], T_Result],
- lvr: typing.Callable[[], T_Result],
- lbp: typing.Callable[[], T_Result],
- lsl: typing.Callable[[], T_Result],
- lrd: typing.Callable[[], T_Result],
- lyd: typing.Callable[[], T_Result],
- ltl: typing.Callable[[], T_Result],
- ltt: typing.Callable[[], T_Result],
- lul: typing.Callable[[], T_Result],
- luc: typing.Callable[[], T_Result],
- luf: typing.Callable[[], T_Result],
- mop: typing.Callable[[], T_Result],
- mkd: typing.Callable[[], T_Result],
- mkn: typing.Callable[[], T_Result],
- mga: typing.Callable[[], T_Result],
- mgf: typing.Callable[[], T_Result],
- mwk: typing.Callable[[], T_Result],
- myr: typing.Callable[[], T_Result],
- mvr: typing.Callable[[], T_Result],
- mvp: typing.Callable[[], T_Result],
- mlf: typing.Callable[[], T_Result],
- mtl: typing.Callable[[], T_Result],
- mtp: typing.Callable[[], T_Result],
- mru: typing.Callable[[], T_Result],
- mro: typing.Callable[[], T_Result],
- mur: typing.Callable[[], T_Result],
- mxv: typing.Callable[[], T_Result],
- mxn: typing.Callable[[], T_Result],
- mxp: typing.Callable[[], T_Result],
- mdc: typing.Callable[[], T_Result],
- mdl: typing.Callable[[], T_Result],
- mcf: typing.Callable[[], T_Result],
- mnt: typing.Callable[[], T_Result],
- mad: typing.Callable[[], T_Result],
- maf: typing.Callable[[], T_Result],
- mze: typing.Callable[[], T_Result],
- mzn: typing.Callable[[], T_Result],
- mzm: typing.Callable[[], T_Result],
- mmk: typing.Callable[[], T_Result],
- nad: typing.Callable[[], T_Result],
- npr: typing.Callable[[], T_Result],
- ang: typing.Callable[[], T_Result],
- twd: typing.Callable[[], T_Result],
- nzd: typing.Callable[[], T_Result],
- nio: typing.Callable[[], T_Result],
- nic: typing.Callable[[], T_Result],
- ngn: typing.Callable[[], T_Result],
- kpw: typing.Callable[[], T_Result],
- nok: typing.Callable[[], T_Result],
- omr: typing.Callable[[], T_Result],
- pkr: typing.Callable[[], T_Result],
- xpd: typing.Callable[[], T_Result],
- pab: typing.Callable[[], T_Result],
- pgk: typing.Callable[[], T_Result],
- pyg: typing.Callable[[], T_Result],
- pei: typing.Callable[[], T_Result],
- pen: typing.Callable[[], T_Result],
- pes: typing.Callable[[], T_Result],
- php: typing.Callable[[], T_Result],
- xpt: typing.Callable[[], T_Result],
- pln: typing.Callable[[], T_Result],
- plz: typing.Callable[[], T_Result],
- pte: typing.Callable[[], T_Result],
- gwe: typing.Callable[[], T_Result],
- qar: typing.Callable[[], T_Result],
- xre: typing.Callable[[], T_Result],
- rhd: typing.Callable[[], T_Result],
- ron: typing.Callable[[], T_Result],
- rol: typing.Callable[[], T_Result],
- rub: typing.Callable[[], T_Result],
- rur: typing.Callable[[], T_Result],
- rwf: typing.Callable[[], T_Result],
- svc: typing.Callable[[], T_Result],
- wst: typing.Callable[[], T_Result],
- sar: typing.Callable[[], T_Result],
- rsd: typing.Callable[[], T_Result],
- csd: typing.Callable[[], T_Result],
- scr: typing.Callable[[], T_Result],
- sll: typing.Callable[[], T_Result],
- xag: typing.Callable[[], T_Result],
- sgd: typing.Callable[[], T_Result],
- skk: typing.Callable[[], T_Result],
- sit: typing.Callable[[], T_Result],
- sbd: typing.Callable[[], T_Result],
- sos: typing.Callable[[], T_Result],
- zar: typing.Callable[[], T_Result],
- zal: typing.Callable[[], T_Result],
- krh: typing.Callable[[], T_Result],
- krw: typing.Callable[[], T_Result],
- kro: typing.Callable[[], T_Result],
- ssp: typing.Callable[[], T_Result],
- sur: typing.Callable[[], T_Result],
- esp: typing.Callable[[], T_Result],
- esa: typing.Callable[[], T_Result],
- esb: typing.Callable[[], T_Result],
- xdr: typing.Callable[[], T_Result],
- lkr: typing.Callable[[], T_Result],
- shp: typing.Callable[[], T_Result],
- xsu: typing.Callable[[], T_Result],
- sdd: typing.Callable[[], T_Result],
- sdg: typing.Callable[[], T_Result],
- sdp: typing.Callable[[], T_Result],
- srd: typing.Callable[[], T_Result],
- srg: typing.Callable[[], T_Result],
- szl: typing.Callable[[], T_Result],
- sek: typing.Callable[[], T_Result],
- chf: typing.Callable[[], T_Result],
- syp: typing.Callable[[], T_Result],
- stn: typing.Callable[[], T_Result],
- std: typing.Callable[[], T_Result],
- tvd: typing.Callable[[], T_Result],
- tjr: typing.Callable[[], T_Result],
- tjs: typing.Callable[[], T_Result],
- tzs: typing.Callable[[], T_Result],
- xts: typing.Callable[[], T_Result],
- thb: typing.Callable[[], T_Result],
- xxx: typing.Callable[[], T_Result],
- tpe: typing.Callable[[], T_Result],
- top: typing.Callable[[], T_Result],
- ttd: typing.Callable[[], T_Result],
- tnd: typing.Callable[[], T_Result],
- try_: typing.Callable[[], T_Result],
- trl: typing.Callable[[], T_Result],
- tmt: typing.Callable[[], T_Result],
- tmm: typing.Callable[[], T_Result],
- usd: typing.Callable[[], T_Result],
- usn: typing.Callable[[], T_Result],
- uss: typing.Callable[[], T_Result],
- ugx: typing.Callable[[], T_Result],
- ugs: typing.Callable[[], T_Result],
- uah: typing.Callable[[], T_Result],
- uak: typing.Callable[[], T_Result],
- aed: typing.Callable[[], T_Result],
- uyw: typing.Callable[[], T_Result],
- uyu: typing.Callable[[], T_Result],
- uyp: typing.Callable[[], T_Result],
- uyi: typing.Callable[[], T_Result],
- uzs: typing.Callable[[], T_Result],
- vuv: typing.Callable[[], T_Result],
- ves: typing.Callable[[], T_Result],
- veb: typing.Callable[[], T_Result],
- vef: typing.Callable[[], T_Result],
- vnd: typing.Callable[[], T_Result],
- vnn: typing.Callable[[], T_Result],
- che: typing.Callable[[], T_Result],
- chw: typing.Callable[[], T_Result],
- xof: typing.Callable[[], T_Result],
- ydd: typing.Callable[[], T_Result],
- yer: typing.Callable[[], T_Result],
- yun: typing.Callable[[], T_Result],
- yud: typing.Callable[[], T_Result],
- yum: typing.Callable[[], T_Result],
- yur: typing.Callable[[], T_Result],
- zwn: typing.Callable[[], T_Result],
- zrn: typing.Callable[[], T_Result],
- zrz: typing.Callable[[], T_Result],
- zmw: typing.Callable[[], T_Result],
- zmk: typing.Callable[[], T_Result],
- zwd: typing.Callable[[], T_Result],
- zwr: typing.Callable[[], T_Result],
- zwl: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CurrencyEnum.XUA:
- return xua()
- if self is CurrencyEnum.AFN:
- return afn()
- if self is CurrencyEnum.AFA:
- return afa()
- if self is CurrencyEnum.ALL:
- return all_()
- if self is CurrencyEnum.ALK:
- return alk()
- if self is CurrencyEnum.DZD:
- return dzd()
- if self is CurrencyEnum.ADP:
- return adp()
- if self is CurrencyEnum.AOA:
- return aoa()
- if self is CurrencyEnum.AOK:
- return aok()
- if self is CurrencyEnum.AON:
- return aon()
- if self is CurrencyEnum.AOR:
- return aor()
- if self is CurrencyEnum.ARA:
- return ara()
- if self is CurrencyEnum.ARS:
- return ars()
- if self is CurrencyEnum.ARM:
- return arm()
- if self is CurrencyEnum.ARP:
- return arp()
- if self is CurrencyEnum.ARL:
- return arl()
- if self is CurrencyEnum.AMD:
- return amd()
- if self is CurrencyEnum.AWG:
- return awg()
- if self is CurrencyEnum.AUD:
- return aud()
- if self is CurrencyEnum.ATS:
- return ats()
- if self is CurrencyEnum.AZN:
- return azn()
- if self is CurrencyEnum.AZM:
- return azm()
- if self is CurrencyEnum.BSD:
- return bsd()
- if self is CurrencyEnum.BHD:
- return bhd()
- if self is CurrencyEnum.BDT:
- return bdt()
- if self is CurrencyEnum.BBD:
- return bbd()
- if self is CurrencyEnum.BYN:
- return byn()
- if self is CurrencyEnum.BYB:
- return byb()
- if self is CurrencyEnum.BYR:
- return byr()
- if self is CurrencyEnum.BEF:
- return bef()
- if self is CurrencyEnum.BEC:
- return bec()
- if self is CurrencyEnum.BEL:
- return bel()
- if self is CurrencyEnum.BZD:
- return bzd()
- if self is CurrencyEnum.BMD:
- return bmd()
- if self is CurrencyEnum.BTN:
- return btn()
- if self is CurrencyEnum.BOB:
- return bob()
- if self is CurrencyEnum.BOL:
- return bol()
- if self is CurrencyEnum.BOV:
- return bov()
- if self is CurrencyEnum.BOP:
- return bop()
- if self is CurrencyEnum.BAM:
- return bam()
- if self is CurrencyEnum.BAD:
- return bad()
- if self is CurrencyEnum.BAN:
- return ban()
- if self is CurrencyEnum.BWP:
- return bwp()
- if self is CurrencyEnum.BRC:
- return brc()
- if self is CurrencyEnum.BRZ:
- return brz()
- if self is CurrencyEnum.BRE:
- return bre()
- if self is CurrencyEnum.BRR:
- return brr()
- if self is CurrencyEnum.BRN:
- return brn()
- if self is CurrencyEnum.BRB:
- return brb()
- if self is CurrencyEnum.BRL:
- return brl()
- if self is CurrencyEnum.GBP:
- return gbp()
- if self is CurrencyEnum.BND:
- return bnd()
- if self is CurrencyEnum.BGL:
- return bgl()
- if self is CurrencyEnum.BGN:
- return bgn()
- if self is CurrencyEnum.BGO:
- return bgo()
- if self is CurrencyEnum.BGM:
- return bgm()
- if self is CurrencyEnum.BUK:
- return buk()
- if self is CurrencyEnum.BIF:
- return bif()
- if self is CurrencyEnum.XPF:
- return xpf()
- if self is CurrencyEnum.KHR:
- return khr()
- if self is CurrencyEnum.CAD:
- return cad()
- if self is CurrencyEnum.CVE:
- return cve()
- if self is CurrencyEnum.KYD:
- return kyd()
- if self is CurrencyEnum.XAF:
- return xaf()
- if self is CurrencyEnum.CLE:
- return cle()
- if self is CurrencyEnum.CLP:
- return clp()
- if self is CurrencyEnum.CLF:
- return clf()
- if self is CurrencyEnum.CNX:
- return cnx()
- if self is CurrencyEnum.CNY:
- return cny()
- if self is CurrencyEnum.CNH:
- return cnh()
- if self is CurrencyEnum.COP:
- return cop()
- if self is CurrencyEnum.COU:
- return cou()
- if self is CurrencyEnum.KMF:
- return kmf()
- if self is CurrencyEnum.CDF:
- return cdf()
- if self is CurrencyEnum.CRC:
- return crc()
- if self is CurrencyEnum.HRD:
- return hrd()
- if self is CurrencyEnum.HRK:
- return hrk()
- if self is CurrencyEnum.CUC:
- return cuc()
- if self is CurrencyEnum.CUP:
- return cup()
- if self is CurrencyEnum.CYP:
- return cyp()
- if self is CurrencyEnum.CZK:
- return czk()
- if self is CurrencyEnum.CSK:
- return csk()
- if self is CurrencyEnum.DKK:
- return dkk()
- if self is CurrencyEnum.DJF:
- return djf()
- if self is CurrencyEnum.DOP:
- return dop()
- if self is CurrencyEnum.NLG:
- return nlg()
- if self is CurrencyEnum.XCD:
- return xcd()
- if self is CurrencyEnum.DDM:
- return ddm()
- if self is CurrencyEnum.ECS:
- return ecs()
- if self is CurrencyEnum.ECV:
- return ecv()
- if self is CurrencyEnum.EGP:
- return egp()
- if self is CurrencyEnum.GQE:
- return gqe()
- if self is CurrencyEnum.ERN:
- return ern()
- if self is CurrencyEnum.EEK:
- return eek()
- if self is CurrencyEnum.ETB:
- return etb()
- if self is CurrencyEnum.EUR:
- return eur()
- if self is CurrencyEnum.XBA:
- return xba()
- if self is CurrencyEnum.XEU:
- return xeu()
- if self is CurrencyEnum.XBB:
- return xbb()
- if self is CurrencyEnum.XBC:
- return xbc()
- if self is CurrencyEnum.XBD:
- return xbd()
- if self is CurrencyEnum.FKP:
- return fkp()
- if self is CurrencyEnum.FJD:
- return fjd()
- if self is CurrencyEnum.FIM:
- return fim()
- if self is CurrencyEnum.FRF:
- return frf()
- if self is CurrencyEnum.XFO:
- return xfo()
- if self is CurrencyEnum.XFU:
- return xfu()
- if self is CurrencyEnum.GMD:
- return gmd()
- if self is CurrencyEnum.GEK:
- return gek()
- if self is CurrencyEnum.GEL:
- return gel()
- if self is CurrencyEnum.DEM:
- return dem()
- if self is CurrencyEnum.GHS:
- return ghs()
- if self is CurrencyEnum.GHC:
- return ghc()
- if self is CurrencyEnum.GIP:
- return gip()
- if self is CurrencyEnum.XAU:
- return xau()
- if self is CurrencyEnum.GRD:
- return grd()
- if self is CurrencyEnum.GTQ:
- return gtq()
- if self is CurrencyEnum.GWP:
- return gwp()
- if self is CurrencyEnum.GNF:
- return gnf()
- if self is CurrencyEnum.GNS:
- return gns()
- if self is CurrencyEnum.GYD:
- return gyd()
- if self is CurrencyEnum.HTG:
- return htg()
- if self is CurrencyEnum.HNL:
- return hnl()
- if self is CurrencyEnum.HKD:
- return hkd()
- if self is CurrencyEnum.HUF:
- return huf()
- if self is CurrencyEnum.IMP:
- return imp()
- if self is CurrencyEnum.ISK:
- return isk()
- if self is CurrencyEnum.ISJ:
- return isj()
- if self is CurrencyEnum.INR:
- return inr()
- if self is CurrencyEnum.IDR:
- return idr()
- if self is CurrencyEnum.IRR:
- return irr()
- if self is CurrencyEnum.IQD:
- return iqd()
- if self is CurrencyEnum.IEP:
- return iep()
- if self is CurrencyEnum.ILS:
- return ils()
- if self is CurrencyEnum.ILP:
- return ilp()
- if self is CurrencyEnum.ILR:
- return ilr()
- if self is CurrencyEnum.ITL:
- return itl()
- if self is CurrencyEnum.JMD:
- return jmd()
- if self is CurrencyEnum.JPY:
- return jpy()
- if self is CurrencyEnum.JOD:
- return jod()
- if self is CurrencyEnum.KZT:
- return kzt()
- if self is CurrencyEnum.KES:
- return kes()
- if self is CurrencyEnum.KWD:
- return kwd()
- if self is CurrencyEnum.KGS:
- return kgs()
- if self is CurrencyEnum.LAK:
- return lak()
- if self is CurrencyEnum.LVL:
- return lvl()
- if self is CurrencyEnum.LVR:
- return lvr()
- if self is CurrencyEnum.LBP:
- return lbp()
- if self is CurrencyEnum.LSL:
- return lsl()
- if self is CurrencyEnum.LRD:
- return lrd()
- if self is CurrencyEnum.LYD:
- return lyd()
- if self is CurrencyEnum.LTL:
- return ltl()
- if self is CurrencyEnum.LTT:
- return ltt()
- if self is CurrencyEnum.LUL:
- return lul()
- if self is CurrencyEnum.LUC:
- return luc()
- if self is CurrencyEnum.LUF:
- return luf()
- if self is CurrencyEnum.MOP:
- return mop()
- if self is CurrencyEnum.MKD:
- return mkd()
- if self is CurrencyEnum.MKN:
- return mkn()
- if self is CurrencyEnum.MGA:
- return mga()
- if self is CurrencyEnum.MGF:
- return mgf()
- if self is CurrencyEnum.MWK:
- return mwk()
- if self is CurrencyEnum.MYR:
- return myr()
- if self is CurrencyEnum.MVR:
- return mvr()
- if self is CurrencyEnum.MVP:
- return mvp()
- if self is CurrencyEnum.MLF:
- return mlf()
- if self is CurrencyEnum.MTL:
- return mtl()
- if self is CurrencyEnum.MTP:
- return mtp()
- if self is CurrencyEnum.MRU:
- return mru()
- if self is CurrencyEnum.MRO:
- return mro()
- if self is CurrencyEnum.MUR:
- return mur()
- if self is CurrencyEnum.MXV:
- return mxv()
- if self is CurrencyEnum.MXN:
- return mxn()
- if self is CurrencyEnum.MXP:
- return mxp()
- if self is CurrencyEnum.MDC:
- return mdc()
- if self is CurrencyEnum.MDL:
- return mdl()
- if self is CurrencyEnum.MCF:
- return mcf()
- if self is CurrencyEnum.MNT:
- return mnt()
- if self is CurrencyEnum.MAD:
- return mad()
- if self is CurrencyEnum.MAF:
- return maf()
- if self is CurrencyEnum.MZE:
- return mze()
- if self is CurrencyEnum.MZN:
- return mzn()
- if self is CurrencyEnum.MZM:
- return mzm()
- if self is CurrencyEnum.MMK:
- return mmk()
- if self is CurrencyEnum.NAD:
- return nad()
- if self is CurrencyEnum.NPR:
- return npr()
- if self is CurrencyEnum.ANG:
- return ang()
- if self is CurrencyEnum.TWD:
- return twd()
- if self is CurrencyEnum.NZD:
- return nzd()
- if self is CurrencyEnum.NIO:
- return nio()
- if self is CurrencyEnum.NIC:
- return nic()
- if self is CurrencyEnum.NGN:
- return ngn()
- if self is CurrencyEnum.KPW:
- return kpw()
- if self is CurrencyEnum.NOK:
- return nok()
- if self is CurrencyEnum.OMR:
- return omr()
- if self is CurrencyEnum.PKR:
- return pkr()
- if self is CurrencyEnum.XPD:
- return xpd()
- if self is CurrencyEnum.PAB:
- return pab()
- if self is CurrencyEnum.PGK:
- return pgk()
- if self is CurrencyEnum.PYG:
- return pyg()
- if self is CurrencyEnum.PEI:
- return pei()
- if self is CurrencyEnum.PEN:
- return pen()
- if self is CurrencyEnum.PES:
- return pes()
- if self is CurrencyEnum.PHP:
- return php()
- if self is CurrencyEnum.XPT:
- return xpt()
- if self is CurrencyEnum.PLN:
- return pln()
- if self is CurrencyEnum.PLZ:
- return plz()
- if self is CurrencyEnum.PTE:
- return pte()
- if self is CurrencyEnum.GWE:
- return gwe()
- if self is CurrencyEnum.QAR:
- return qar()
- if self is CurrencyEnum.XRE:
- return xre()
- if self is CurrencyEnum.RHD:
- return rhd()
- if self is CurrencyEnum.RON:
- return ron()
- if self is CurrencyEnum.ROL:
- return rol()
- if self is CurrencyEnum.RUB:
- return rub()
- if self is CurrencyEnum.RUR:
- return rur()
- if self is CurrencyEnum.RWF:
- return rwf()
- if self is CurrencyEnum.SVC:
- return svc()
- if self is CurrencyEnum.WST:
- return wst()
- if self is CurrencyEnum.SAR:
- return sar()
- if self is CurrencyEnum.RSD:
- return rsd()
- if self is CurrencyEnum.CSD:
- return csd()
- if self is CurrencyEnum.SCR:
- return scr()
- if self is CurrencyEnum.SLL:
- return sll()
- if self is CurrencyEnum.XAG:
- return xag()
- if self is CurrencyEnum.SGD:
- return sgd()
- if self is CurrencyEnum.SKK:
- return skk()
- if self is CurrencyEnum.SIT:
- return sit()
- if self is CurrencyEnum.SBD:
- return sbd()
- if self is CurrencyEnum.SOS:
- return sos()
- if self is CurrencyEnum.ZAR:
- return zar()
- if self is CurrencyEnum.ZAL:
- return zal()
- if self is CurrencyEnum.KRH:
- return krh()
- if self is CurrencyEnum.KRW:
- return krw()
- if self is CurrencyEnum.KRO:
- return kro()
- if self is CurrencyEnum.SSP:
- return ssp()
- if self is CurrencyEnum.SUR:
- return sur()
- if self is CurrencyEnum.ESP:
- return esp()
- if self is CurrencyEnum.ESA:
- return esa()
- if self is CurrencyEnum.ESB:
- return esb()
- if self is CurrencyEnum.XDR:
- return xdr()
- if self is CurrencyEnum.LKR:
- return lkr()
- if self is CurrencyEnum.SHP:
- return shp()
- if self is CurrencyEnum.XSU:
- return xsu()
- if self is CurrencyEnum.SDD:
- return sdd()
- if self is CurrencyEnum.SDG:
- return sdg()
- if self is CurrencyEnum.SDP:
- return sdp()
- if self is CurrencyEnum.SRD:
- return srd()
- if self is CurrencyEnum.SRG:
- return srg()
- if self is CurrencyEnum.SZL:
- return szl()
- if self is CurrencyEnum.SEK:
- return sek()
- if self is CurrencyEnum.CHF:
- return chf()
- if self is CurrencyEnum.SYP:
- return syp()
- if self is CurrencyEnum.STN:
- return stn()
- if self is CurrencyEnum.STD:
- return std()
- if self is CurrencyEnum.TVD:
- return tvd()
- if self is CurrencyEnum.TJR:
- return tjr()
- if self is CurrencyEnum.TJS:
- return tjs()
- if self is CurrencyEnum.TZS:
- return tzs()
- if self is CurrencyEnum.XTS:
- return xts()
- if self is CurrencyEnum.THB:
- return thb()
- if self is CurrencyEnum.XXX:
- return xxx()
- if self is CurrencyEnum.TPE:
- return tpe()
- if self is CurrencyEnum.TOP:
- return top()
- if self is CurrencyEnum.TTD:
- return ttd()
- if self is CurrencyEnum.TND:
- return tnd()
- if self is CurrencyEnum.TRY:
- return try_()
- if self is CurrencyEnum.TRL:
- return trl()
- if self is CurrencyEnum.TMT:
- return tmt()
- if self is CurrencyEnum.TMM:
- return tmm()
- if self is CurrencyEnum.USD:
- return usd()
- if self is CurrencyEnum.USN:
- return usn()
- if self is CurrencyEnum.USS:
- return uss()
- if self is CurrencyEnum.UGX:
- return ugx()
- if self is CurrencyEnum.UGS:
- return ugs()
- if self is CurrencyEnum.UAH:
- return uah()
- if self is CurrencyEnum.UAK:
- return uak()
- if self is CurrencyEnum.AED:
- return aed()
- if self is CurrencyEnum.UYW:
- return uyw()
- if self is CurrencyEnum.UYU:
- return uyu()
- if self is CurrencyEnum.UYP:
- return uyp()
- if self is CurrencyEnum.UYI:
- return uyi()
- if self is CurrencyEnum.UZS:
- return uzs()
- if self is CurrencyEnum.VUV:
- return vuv()
- if self is CurrencyEnum.VES:
- return ves()
- if self is CurrencyEnum.VEB:
- return veb()
- if self is CurrencyEnum.VEF:
- return vef()
- if self is CurrencyEnum.VND:
- return vnd()
- if self is CurrencyEnum.VNN:
- return vnn()
- if self is CurrencyEnum.CHE:
- return che()
- if self is CurrencyEnum.CHW:
- return chw()
- if self is CurrencyEnum.XOF:
- return xof()
- if self is CurrencyEnum.YDD:
- return ydd()
- if self is CurrencyEnum.YER:
- return yer()
- if self is CurrencyEnum.YUN:
- return yun()
- if self is CurrencyEnum.YUD:
- return yud()
- if self is CurrencyEnum.YUM:
- return yum()
- if self is CurrencyEnum.YUR:
- return yur()
- if self is CurrencyEnum.ZWN:
- return zwn()
- if self is CurrencyEnum.ZRN:
- return zrn()
- if self is CurrencyEnum.ZRZ:
- return zrz()
- if self is CurrencyEnum.ZMW:
- return zmw()
- if self is CurrencyEnum.ZMK:
- return zmk()
- if self is CurrencyEnum.ZWD:
- return zwd()
- if self is CurrencyEnum.ZWR:
- return zwr()
- if self is CurrencyEnum.ZWL:
- return zwl()
+CurrencyEnum = typing.Union[
+ typing.Literal[
+ "XUA",
+ "AFN",
+ "AFA",
+ "ALL",
+ "ALK",
+ "DZD",
+ "ADP",
+ "AOA",
+ "AOK",
+ "AON",
+ "AOR",
+ "ARA",
+ "ARS",
+ "ARM",
+ "ARP",
+ "ARL",
+ "AMD",
+ "AWG",
+ "AUD",
+ "ATS",
+ "AZN",
+ "AZM",
+ "BSD",
+ "BHD",
+ "BDT",
+ "BBD",
+ "BYN",
+ "BYB",
+ "BYR",
+ "BEF",
+ "BEC",
+ "BEL",
+ "BZD",
+ "BMD",
+ "BTN",
+ "BOB",
+ "BOL",
+ "BOV",
+ "BOP",
+ "BAM",
+ "BAD",
+ "BAN",
+ "BWP",
+ "BRC",
+ "BRZ",
+ "BRE",
+ "BRR",
+ "BRN",
+ "BRB",
+ "BRL",
+ "GBP",
+ "BND",
+ "BGL",
+ "BGN",
+ "BGO",
+ "BGM",
+ "BUK",
+ "BIF",
+ "XPF",
+ "KHR",
+ "CAD",
+ "CVE",
+ "KYD",
+ "XAF",
+ "CLE",
+ "CLP",
+ "CLF",
+ "CNX",
+ "CNY",
+ "CNH",
+ "COP",
+ "COU",
+ "KMF",
+ "CDF",
+ "CRC",
+ "HRD",
+ "HRK",
+ "CUC",
+ "CUP",
+ "CYP",
+ "CZK",
+ "CSK",
+ "DKK",
+ "DJF",
+ "DOP",
+ "NLG",
+ "XCD",
+ "DDM",
+ "ECS",
+ "ECV",
+ "EGP",
+ "GQE",
+ "ERN",
+ "EEK",
+ "ETB",
+ "EUR",
+ "XBA",
+ "XEU",
+ "XBB",
+ "XBC",
+ "XBD",
+ "FKP",
+ "FJD",
+ "FIM",
+ "FRF",
+ "XFO",
+ "XFU",
+ "GMD",
+ "GEK",
+ "GEL",
+ "DEM",
+ "GHS",
+ "GHC",
+ "GIP",
+ "XAU",
+ "GRD",
+ "GTQ",
+ "GWP",
+ "GNF",
+ "GNS",
+ "GYD",
+ "HTG",
+ "HNL",
+ "HKD",
+ "HUF",
+ "IMP",
+ "ISK",
+ "ISJ",
+ "INR",
+ "IDR",
+ "IRR",
+ "IQD",
+ "IEP",
+ "ILS",
+ "ILP",
+ "ILR",
+ "ITL",
+ "JMD",
+ "JPY",
+ "JOD",
+ "KZT",
+ "KES",
+ "KWD",
+ "KGS",
+ "LAK",
+ "LVL",
+ "LVR",
+ "LBP",
+ "LSL",
+ "LRD",
+ "LYD",
+ "LTL",
+ "LTT",
+ "LUL",
+ "LUC",
+ "LUF",
+ "MOP",
+ "MKD",
+ "MKN",
+ "MGA",
+ "MGF",
+ "MWK",
+ "MYR",
+ "MVR",
+ "MVP",
+ "MLF",
+ "MTL",
+ "MTP",
+ "MRU",
+ "MRO",
+ "MUR",
+ "MXV",
+ "MXN",
+ "MXP",
+ "MDC",
+ "MDL",
+ "MCF",
+ "MNT",
+ "MAD",
+ "MAF",
+ "MZE",
+ "MZN",
+ "MZM",
+ "MMK",
+ "NAD",
+ "NPR",
+ "ANG",
+ "TWD",
+ "NZD",
+ "NIO",
+ "NIC",
+ "NGN",
+ "KPW",
+ "NOK",
+ "OMR",
+ "PKR",
+ "XPD",
+ "PAB",
+ "PGK",
+ "PYG",
+ "PEI",
+ "PEN",
+ "PES",
+ "PHP",
+ "XPT",
+ "PLN",
+ "PLZ",
+ "PTE",
+ "GWE",
+ "QAR",
+ "XRE",
+ "RHD",
+ "RON",
+ "ROL",
+ "RUB",
+ "RUR",
+ "RWF",
+ "SVC",
+ "WST",
+ "SAR",
+ "RSD",
+ "CSD",
+ "SCR",
+ "SLL",
+ "XAG",
+ "SGD",
+ "SKK",
+ "SIT",
+ "SBD",
+ "SOS",
+ "ZAR",
+ "ZAL",
+ "KRH",
+ "KRW",
+ "KRO",
+ "SSP",
+ "SUR",
+ "ESP",
+ "ESA",
+ "ESB",
+ "XDR",
+ "LKR",
+ "SHP",
+ "XSU",
+ "SDD",
+ "SDG",
+ "SDP",
+ "SRD",
+ "SRG",
+ "SZL",
+ "SEK",
+ "CHF",
+ "SYP",
+ "STN",
+ "STD",
+ "TVD",
+ "TJR",
+ "TJS",
+ "TZS",
+ "XTS",
+ "THB",
+ "XXX",
+ "TPE",
+ "TOP",
+ "TTD",
+ "TND",
+ "TRY",
+ "TRL",
+ "TMT",
+ "TMM",
+ "USD",
+ "USN",
+ "USS",
+ "UGX",
+ "UGS",
+ "UAH",
+ "UAK",
+ "AED",
+ "UYW",
+ "UYU",
+ "UYP",
+ "UYI",
+ "UZS",
+ "VUV",
+ "VES",
+ "VEB",
+ "VEF",
+ "VND",
+ "VNN",
+ "CHE",
+ "CHW",
+ "XOF",
+ "YDD",
+ "YER",
+ "YUN",
+ "YUD",
+ "YUM",
+ "YUR",
+ "ZWN",
+ "ZRN",
+ "ZRZ",
+ "ZMW",
+ "ZMK",
+ "ZWD",
+ "ZWR",
+ "ZWL",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/types/data_passthrough_request.py b/src/merge/resources/accounting/types/data_passthrough_request.py
index fdf9b18c..f2718105 100644
--- a/src/merge/resources/accounting/types/data_passthrough_request.py
+++ b/src/merge/resources/accounting/types/data_passthrough_request.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .method_enum import MethodEnum
+import pydantic
+import typing
from .multipart_form_field_request import MultipartFormFieldRequest
from .request_format_enum import RequestFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class DataPassthroughRequest(pydantic_v1.BaseModel):
+class DataPassthroughRequest(UniversalBaseModel):
"""
# The DataPassthrough Object
@@ -24,51 +23,42 @@ class DataPassthroughRequest(pydantic_v1.BaseModel):
"""
method: MethodEnum
- path: str = pydantic_v1.Field()
+ path: str = pydantic.Field()
"""
The path of the request in the third party's platform.
"""
- base_url_override: typing.Optional[str] = pydantic_v1.Field()
+ base_url_override: typing.Optional[str] = pydantic.Field()
"""
An optional override of the third party's base url for the request.
"""
- data: typing.Optional[str] = pydantic_v1.Field()
+ data: typing.Optional[str] = pydantic.Field()
"""
The data with the request. You must include a `request_format` parameter matching the data's format
"""
- multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic_v1.Field()
+ multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field()
"""
Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`.
"""
- headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server.
"""
request_format: typing.Optional[RequestFormatEnum]
- normalize_response: typing.Optional[bool] = pydantic_v1.Field()
+ normalize_response: typing.Optional[bool] = pydantic.Field()
"""
Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/debug_mode_log.py b/src/merge/resources/accounting/types/debug_mode_log.py
index 321c9090..2b02c1b9 100644
--- a/src/merge/resources/accounting/types/debug_mode_log.py
+++ b/src/merge/resources/accounting/types/debug_mode_log.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .debug_model_log_summary import DebugModelLogSummary
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class DebugModeLog(pydantic_v1.BaseModel):
+class DebugModeLog(UniversalBaseModel):
log_id: str
dashboard_view: str
log_summary: DebugModelLogSummary
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/debug_model_log_summary.py b/src/merge/resources/accounting/types/debug_model_log_summary.py
index 06bb154b..b4f48752 100644
--- a/src/merge/resources/accounting/types/debug_model_log_summary.py
+++ b/src/merge/resources/accounting/types/debug_model_log_summary.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class DebugModelLogSummary(pydantic_v1.BaseModel):
+class DebugModelLogSummary(UniversalBaseModel):
url: str
method: str
status_code: int
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/enabled_actions_enum.py b/src/merge/resources/accounting/types/enabled_actions_enum.py
index 949d69dc..fa6c674e 100644
--- a/src/merge/resources/accounting/types/enabled_actions_enum.py
+++ b/src/merge/resources/accounting/types/enabled_actions_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EnabledActionsEnum(str, enum.Enum):
- """
- - `READ` - READ
- - `WRITE` - WRITE
- """
-
- READ = "READ"
- WRITE = "WRITE"
-
- def visit(self, read: typing.Callable[[], T_Result], write: typing.Callable[[], T_Result]) -> T_Result:
- if self is EnabledActionsEnum.READ:
- return read()
- if self is EnabledActionsEnum.WRITE:
- return write()
+EnabledActionsEnum = typing.Union[typing.Literal["READ", "WRITE"], typing.Any]
diff --git a/src/merge/resources/accounting/types/encoding_enum.py b/src/merge/resources/accounting/types/encoding_enum.py
index fed12372..4c4997b2 100644
--- a/src/merge/resources/accounting/types/encoding_enum.py
+++ b/src/merge/resources/accounting/types/encoding_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EncodingEnum(str, enum.Enum):
- """
- - `RAW` - RAW
- - `BASE64` - BASE64
- - `GZIP_BASE64` - GZIP_BASE64
- """
-
- RAW = "RAW"
- BASE_64 = "BASE64"
- GZIP_BASE_64 = "GZIP_BASE64"
-
- def visit(
- self,
- raw: typing.Callable[[], T_Result],
- base_64: typing.Callable[[], T_Result],
- gzip_base_64: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EncodingEnum.RAW:
- return raw()
- if self is EncodingEnum.BASE_64:
- return base_64()
- if self is EncodingEnum.GZIP_BASE_64:
- return gzip_base_64()
+EncodingEnum = typing.Union[typing.Literal["RAW", "BASE64", "GZIP_BASE64"], typing.Any]
diff --git a/src/merge/resources/accounting/types/error_validation_problem.py b/src/merge/resources/accounting/types/error_validation_problem.py
index 425af45c..58ea87e6 100644
--- a/src/merge/resources/accounting/types/error_validation_problem.py
+++ b/src/merge/resources/accounting/types/error_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ErrorValidationProblem(pydantic_v1.BaseModel):
+class ErrorValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/event_type_enum.py b/src/merge/resources/accounting/types/event_type_enum.py
index fcc33f75..2693c646 100644
--- a/src/merge/resources/accounting/types/event_type_enum.py
+++ b/src/merge/resources/accounting/types/event_type_enum.py
@@ -1,201 +1,47 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EventTypeEnum(str, enum.Enum):
- """
- - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY
- - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY
- - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY
- - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY
- - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY
- - `INVITED_USER` - INVITED_USER
- - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED
- - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED
- - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT
- - `CREATED_DESTINATION` - CREATED_DESTINATION
- - `DELETED_DESTINATION` - DELETED_DESTINATION
- - `CHANGED_DESTINATION` - CHANGED_DESTINATION
- - `CHANGED_SCOPES` - CHANGED_SCOPES
- - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION
- - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS
- - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION
- - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION
- - `ENABLED_CATEGORY` - ENABLED_CATEGORY
- - `DISABLED_CATEGORY` - DISABLED_CATEGORY
- - `CHANGED_PASSWORD` - CHANGED_PASSWORD
- - `RESET_PASSWORD` - RESET_PASSWORD
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING
- - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING
- - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING
- - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING
- - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC
- - `MUTED_ISSUE` - MUTED_ISSUE
- - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK
- - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
- - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
- - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
- """
-
- CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY"
- DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY"
- CREATED_TEST_API_KEY = "CREATED_TEST_API_KEY"
- DELETED_TEST_API_KEY = "DELETED_TEST_API_KEY"
- REGENERATED_PRODUCTION_API_KEY = "REGENERATED_PRODUCTION_API_KEY"
- INVITED_USER = "INVITED_USER"
- TWO_FACTOR_AUTH_ENABLED = "TWO_FACTOR_AUTH_ENABLED"
- TWO_FACTOR_AUTH_DISABLED = "TWO_FACTOR_AUTH_DISABLED"
- DELETED_LINKED_ACCOUNT = "DELETED_LINKED_ACCOUNT"
- CREATED_DESTINATION = "CREATED_DESTINATION"
- DELETED_DESTINATION = "DELETED_DESTINATION"
- CHANGED_DESTINATION = "CHANGED_DESTINATION"
- CHANGED_SCOPES = "CHANGED_SCOPES"
- CHANGED_PERSONAL_INFORMATION = "CHANGED_PERSONAL_INFORMATION"
- CHANGED_ORGANIZATION_SETTINGS = "CHANGED_ORGANIZATION_SETTINGS"
- ENABLED_INTEGRATION = "ENABLED_INTEGRATION"
- DISABLED_INTEGRATION = "DISABLED_INTEGRATION"
- ENABLED_CATEGORY = "ENABLED_CATEGORY"
- DISABLED_CATEGORY = "DISABLED_CATEGORY"
- CHANGED_PASSWORD = "CHANGED_PASSWORD"
- RESET_PASSWORD = "RESET_PASSWORD"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- CREATED_INTEGRATION_WIDE_FIELD_MAPPING = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING"
- CREATED_LINKED_ACCOUNT_FIELD_MAPPING = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING"
- CHANGED_INTEGRATION_WIDE_FIELD_MAPPING = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING"
- CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING"
- DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING"
- DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING"
- FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC"
- MUTED_ISSUE = "MUTED_ISSUE"
- GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK"
- ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK"
- DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK"
- MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED"
-
- def visit(
- self,
- created_remote_production_api_key: typing.Callable[[], T_Result],
- deleted_remote_production_api_key: typing.Callable[[], T_Result],
- created_test_api_key: typing.Callable[[], T_Result],
- deleted_test_api_key: typing.Callable[[], T_Result],
- regenerated_production_api_key: typing.Callable[[], T_Result],
- invited_user: typing.Callable[[], T_Result],
- two_factor_auth_enabled: typing.Callable[[], T_Result],
- two_factor_auth_disabled: typing.Callable[[], T_Result],
- deleted_linked_account: typing.Callable[[], T_Result],
- created_destination: typing.Callable[[], T_Result],
- deleted_destination: typing.Callable[[], T_Result],
- changed_destination: typing.Callable[[], T_Result],
- changed_scopes: typing.Callable[[], T_Result],
- changed_personal_information: typing.Callable[[], T_Result],
- changed_organization_settings: typing.Callable[[], T_Result],
- enabled_integration: typing.Callable[[], T_Result],
- disabled_integration: typing.Callable[[], T_Result],
- enabled_category: typing.Callable[[], T_Result],
- disabled_category: typing.Callable[[], T_Result],
- changed_password: typing.Callable[[], T_Result],
- reset_password: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- created_integration_wide_field_mapping: typing.Callable[[], T_Result],
- created_linked_account_field_mapping: typing.Callable[[], T_Result],
- changed_integration_wide_field_mapping: typing.Callable[[], T_Result],
- changed_linked_account_field_mapping: typing.Callable[[], T_Result],
- deleted_integration_wide_field_mapping: typing.Callable[[], T_Result],
- deleted_linked_account_field_mapping: typing.Callable[[], T_Result],
- forced_linked_account_resync: typing.Callable[[], T_Result],
- muted_issue: typing.Callable[[], T_Result],
- generated_magic_link: typing.Callable[[], T_Result],
- enabled_merge_webhook: typing.Callable[[], T_Result],
- disabled_merge_webhook: typing.Callable[[], T_Result],
- merge_webhook_target_changed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY:
- return created_remote_production_api_key()
- if self is EventTypeEnum.DELETED_REMOTE_PRODUCTION_API_KEY:
- return deleted_remote_production_api_key()
- if self is EventTypeEnum.CREATED_TEST_API_KEY:
- return created_test_api_key()
- if self is EventTypeEnum.DELETED_TEST_API_KEY:
- return deleted_test_api_key()
- if self is EventTypeEnum.REGENERATED_PRODUCTION_API_KEY:
- return regenerated_production_api_key()
- if self is EventTypeEnum.INVITED_USER:
- return invited_user()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_ENABLED:
- return two_factor_auth_enabled()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_DISABLED:
- return two_factor_auth_disabled()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT:
- return deleted_linked_account()
- if self is EventTypeEnum.CREATED_DESTINATION:
- return created_destination()
- if self is EventTypeEnum.DELETED_DESTINATION:
- return deleted_destination()
- if self is EventTypeEnum.CHANGED_DESTINATION:
- return changed_destination()
- if self is EventTypeEnum.CHANGED_SCOPES:
- return changed_scopes()
- if self is EventTypeEnum.CHANGED_PERSONAL_INFORMATION:
- return changed_personal_information()
- if self is EventTypeEnum.CHANGED_ORGANIZATION_SETTINGS:
- return changed_organization_settings()
- if self is EventTypeEnum.ENABLED_INTEGRATION:
- return enabled_integration()
- if self is EventTypeEnum.DISABLED_INTEGRATION:
- return disabled_integration()
- if self is EventTypeEnum.ENABLED_CATEGORY:
- return enabled_category()
- if self is EventTypeEnum.DISABLED_CATEGORY:
- return disabled_category()
- if self is EventTypeEnum.CHANGED_PASSWORD:
- return changed_password()
- if self is EventTypeEnum.RESET_PASSWORD:
- return reset_password()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return enabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return enabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return disabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return disabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.CREATED_INTEGRATION_WIDE_FIELD_MAPPING:
- return created_integration_wide_field_mapping()
- if self is EventTypeEnum.CREATED_LINKED_ACCOUNT_FIELD_MAPPING:
- return created_linked_account_field_mapping()
- if self is EventTypeEnum.CHANGED_INTEGRATION_WIDE_FIELD_MAPPING:
- return changed_integration_wide_field_mapping()
- if self is EventTypeEnum.CHANGED_LINKED_ACCOUNT_FIELD_MAPPING:
- return changed_linked_account_field_mapping()
- if self is EventTypeEnum.DELETED_INTEGRATION_WIDE_FIELD_MAPPING:
- return deleted_integration_wide_field_mapping()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING:
- return deleted_linked_account_field_mapping()
- if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC:
- return forced_linked_account_resync()
- if self is EventTypeEnum.MUTED_ISSUE:
- return muted_issue()
- if self is EventTypeEnum.GENERATED_MAGIC_LINK:
- return generated_magic_link()
- if self is EventTypeEnum.ENABLED_MERGE_WEBHOOK:
- return enabled_merge_webhook()
- if self is EventTypeEnum.DISABLED_MERGE_WEBHOOK:
- return disabled_merge_webhook()
- if self is EventTypeEnum.MERGE_WEBHOOK_TARGET_CHANGED:
- return merge_webhook_target_changed()
+EventTypeEnum = typing.Union[
+ typing.Literal[
+ "CREATED_REMOTE_PRODUCTION_API_KEY",
+ "DELETED_REMOTE_PRODUCTION_API_KEY",
+ "CREATED_TEST_API_KEY",
+ "DELETED_TEST_API_KEY",
+ "REGENERATED_PRODUCTION_API_KEY",
+ "INVITED_USER",
+ "TWO_FACTOR_AUTH_ENABLED",
+ "TWO_FACTOR_AUTH_DISABLED",
+ "DELETED_LINKED_ACCOUNT",
+ "CREATED_DESTINATION",
+ "DELETED_DESTINATION",
+ "CHANGED_DESTINATION",
+ "CHANGED_SCOPES",
+ "CHANGED_PERSONAL_INFORMATION",
+ "CHANGED_ORGANIZATION_SETTINGS",
+ "ENABLED_INTEGRATION",
+ "DISABLED_INTEGRATION",
+ "ENABLED_CATEGORY",
+ "DISABLED_CATEGORY",
+ "CHANGED_PASSWORD",
+ "RESET_PASSWORD",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "CREATED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CREATED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "DELETED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "DELETED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "FORCED_LINKED_ACCOUNT_RESYNC",
+ "MUTED_ISSUE",
+ "GENERATED_MAGIC_LINK",
+ "ENABLED_MERGE_WEBHOOK",
+ "DISABLED_MERGE_WEBHOOK",
+ "MERGE_WEBHOOK_TARGET_CHANGED",
+ "END_USER_CREDENTIALS_ACCESSED",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/accounting/types/expense.py b/src/merge/resources/accounting/types/expense.py
index 3a76e358..1336b7c8 100644
--- a/src/merge/resources/accounting/types/expense.py
+++ b/src/merge/resources/accounting/types/expense.py
@@ -1,21 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .expense_account import ExpenseAccount
-from .expense_accounting_period import ExpenseAccountingPeriod
-from .expense_company import ExpenseCompany
from .expense_contact import ExpenseContact
from .expense_currency import ExpenseCurrency
+from .expense_company import ExpenseCompany
from .expense_line import ExpenseLine
from .expense_tracking_categories_item import ExpenseTrackingCategoriesItem
+from .expense_accounting_period import ExpenseAccountingPeriod
from .remote_data import RemoteData
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Expense(pydantic_v1.BaseModel):
+class Expense(UniversalBaseModel):
"""
# The Expense Object
@@ -31,57 +32,57 @@ class Expense(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the transaction occurred.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the expense was created.
"""
- account: typing.Optional[ExpenseAccount] = pydantic_v1.Field()
+ account: typing.Optional[ExpenseAccount] = pydantic.Field()
"""
The expense's payment account.
"""
- contact: typing.Optional[ExpenseContact] = pydantic_v1.Field()
+ contact: typing.Optional[ExpenseContact] = pydantic.Field()
"""
The expense's contact.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The expense's total amount.
"""
- sub_total: typing.Optional[float] = pydantic_v1.Field()
+ sub_total: typing.Optional[float] = pydantic.Field()
"""
The expense's total amount before tax.
"""
- total_tax_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_tax_amount: typing.Optional[float] = pydantic.Field()
"""
The expense's total tax amount.
"""
- currency: typing.Optional[ExpenseCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[ExpenseCurrency] = pydantic.Field()
"""
The expense's currency.
@@ -393,50 +394,47 @@ class Expense(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The expense's exchange rate.
"""
- company: typing.Optional[ExpenseCompany] = pydantic_v1.Field()
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
+ company: typing.Optional[ExpenseCompany] = pydantic.Field()
"""
The company the expense belongs to.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
The expense's private note.
"""
lines: typing.Optional[typing.List[ExpenseLine]]
tracking_categories: typing.Optional[typing.List[typing.Optional[ExpenseTrackingCategoriesItem]]]
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- accounting_period: typing.Optional[ExpenseAccountingPeriod] = pydantic_v1.Field()
+ accounting_period: typing.Optional[ExpenseAccountingPeriod] = pydantic.Field()
"""
The accounting period that the Expense was generated in.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/expense_account.py b/src/merge/resources/accounting/types/expense_account.py
index 4da9826e..3a7c4062 100644
--- a/src/merge/resources/accounting/types/expense_account.py
+++ b/src/merge/resources/accounting/types/expense_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ExpenseAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/expense_accounting_period.py b/src/merge/resources/accounting/types/expense_accounting_period.py
index ef90ea80..3c6251e5 100644
--- a/src/merge/resources/accounting/types/expense_accounting_period.py
+++ b/src/merge/resources/accounting/types/expense_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
ExpenseAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/expense_company.py b/src/merge/resources/accounting/types/expense_company.py
index fb3a47cb..15728379 100644
--- a/src/merge/resources/accounting/types/expense_company.py
+++ b/src/merge/resources/accounting/types/expense_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
ExpenseCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/expense_contact.py b/src/merge/resources/accounting/types/expense_contact.py
index b032b507..589c22cd 100644
--- a/src/merge/resources/accounting/types/expense_contact.py
+++ b/src/merge/resources/accounting/types/expense_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
ExpenseContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/expense_currency.py b/src/merge/resources/accounting/types/expense_currency.py
index 38e23e20..eb81ba01 100644
--- a/src/merge/resources/accounting/types/expense_currency.py
+++ b/src/merge/resources/accounting/types/expense_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
ExpenseCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/expense_line.py b/src/merge/resources/accounting/types/expense_line.py
index d259a86a..f6f2b10f 100644
--- a/src/merge/resources/accounting/types/expense_line.py
+++ b/src/merge/resources/accounting/types/expense_line.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .expense_line_account import ExpenseLineAccount
-from .expense_line_contact import ExpenseLineContact
-from .expense_line_currency import ExpenseLineCurrency
+import pydantic
+import datetime as dt
from .expense_line_item import ExpenseLineItem
-from .expense_line_tracking_categories_item import ExpenseLineTrackingCategoriesItem
from .expense_line_tracking_category import ExpenseLineTrackingCategory
+from .expense_line_tracking_categories_item import ExpenseLineTrackingCategoriesItem
+from .expense_line_currency import ExpenseLineCurrency
+from .expense_line_account import ExpenseLineAccount
+from .expense_line_contact import ExpenseLineContact
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ExpenseLine(pydantic_v1.BaseModel):
+class ExpenseLine(UniversalBaseModel):
"""
# The ExpenseLine Object
@@ -27,39 +27,45 @@ class ExpenseLine(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- item: typing.Optional[ExpenseLineItem] = pydantic_v1.Field()
+ item: typing.Optional[ExpenseLineItem] = pydantic.Field()
"""
The line's item.
"""
- net_amount: typing.Optional[float] = pydantic_v1.Field()
+ net_amount: typing.Optional[float] = pydantic.Field()
"""
The line's net amount.
"""
tracking_category: typing.Optional[ExpenseLineTrackingCategory]
- tracking_categories: typing.Optional[typing.List[typing.Optional[ExpenseLineTrackingCategoriesItem]]]
- company: typing.Optional[str] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[ExpenseLineTrackingCategoriesItem]]] = (
+ pydantic.Field()
+ )
+ """
+ The expense line item's associated tracking categories.
+ """
+
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the line belongs to.
"""
- currency: typing.Optional[ExpenseLineCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[ExpenseLineCurrency] = pydantic.Field()
"""
The expense line item's currency.
@@ -371,45 +377,41 @@ class ExpenseLine(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- account: typing.Optional[ExpenseLineAccount] = pydantic_v1.Field()
+ account: typing.Optional[ExpenseLineAccount] = pydantic.Field()
"""
The expense's payment account.
"""
- contact: typing.Optional[ExpenseLineContact] = pydantic_v1.Field()
+ contact: typing.Optional[ExpenseLineContact] = pydantic.Field()
"""
The expense's contact.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The description of the item that was purchased by the company.
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The expense line item's exchange rate.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ The tax rate that applies to this line item.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
+ """
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+ """
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/expense_line_account.py b/src/merge/resources/accounting/types/expense_line_account.py
index c04b7bd2..9fa0ca1c 100644
--- a/src/merge/resources/accounting/types/expense_line_account.py
+++ b/src/merge/resources/accounting/types/expense_line_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ExpenseLineAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/expense_line_contact.py b/src/merge/resources/accounting/types/expense_line_contact.py
index 7152af35..76181c8b 100644
--- a/src/merge/resources/accounting/types/expense_line_contact.py
+++ b/src/merge/resources/accounting/types/expense_line_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
ExpenseLineContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/expense_line_currency.py b/src/merge/resources/accounting/types/expense_line_currency.py
index 70a86457..b1ccdd48 100644
--- a/src/merge/resources/accounting/types/expense_line_currency.py
+++ b/src/merge/resources/accounting/types/expense_line_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
ExpenseLineCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/expense_line_item.py b/src/merge/resources/accounting/types/expense_line_item.py
index 321fe8a2..d8b3ff52 100644
--- a/src/merge/resources/accounting/types/expense_line_item.py
+++ b/src/merge/resources/accounting/types/expense_line_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .item import Item
ExpenseLineItem = typing.Union[str, Item]
diff --git a/src/merge/resources/accounting/types/expense_line_request.py b/src/merge/resources/accounting/types/expense_line_request.py
index e329103b..fc9b08f9 100644
--- a/src/merge/resources/accounting/types/expense_line_request.py
+++ b/src/merge/resources/accounting/types/expense_line_request.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .expense_line_request_account import ExpenseLineRequestAccount
-from .expense_line_request_contact import ExpenseLineRequestContact
-from .expense_line_request_currency import ExpenseLineRequestCurrency
+import pydantic
from .expense_line_request_item import ExpenseLineRequestItem
-from .expense_line_request_tracking_categories_item import ExpenseLineRequestTrackingCategoriesItem
from .expense_line_request_tracking_category import ExpenseLineRequestTrackingCategory
+from .expense_line_request_tracking_categories_item import ExpenseLineRequestTrackingCategoriesItem
+from .expense_line_request_currency import ExpenseLineRequestCurrency
+from .expense_line_request_account import ExpenseLineRequestAccount
+from .expense_line_request_contact import ExpenseLineRequestContact
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ExpenseLineRequest(pydantic_v1.BaseModel):
+class ExpenseLineRequest(UniversalBaseModel):
"""
# The ExpenseLine Object
@@ -26,29 +26,35 @@ class ExpenseLineRequest(pydantic_v1.BaseModel):
Fetch from the `GET Expense` endpoint and view the expense's line items.
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- item: typing.Optional[ExpenseLineRequestItem] = pydantic_v1.Field()
+ item: typing.Optional[ExpenseLineRequestItem] = pydantic.Field()
"""
The line's item.
"""
- net_amount: typing.Optional[float] = pydantic_v1.Field()
+ net_amount: typing.Optional[float] = pydantic.Field()
"""
The line's net amount.
"""
tracking_category: typing.Optional[ExpenseLineRequestTrackingCategory]
- tracking_categories: typing.Optional[typing.List[typing.Optional[ExpenseLineRequestTrackingCategoriesItem]]]
- company: typing.Optional[str] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[ExpenseLineRequestTrackingCategoriesItem]]] = (
+ pydantic.Field()
+ )
+ """
+ The expense line item's associated tracking categories.
+ """
+
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the line belongs to.
"""
- currency: typing.Optional[ExpenseLineRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[ExpenseLineRequestCurrency] = pydantic.Field()
"""
The expense line item's currency.
@@ -360,43 +366,40 @@ class ExpenseLineRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- account: typing.Optional[ExpenseLineRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[ExpenseLineRequestAccount] = pydantic.Field()
"""
The expense's payment account.
"""
- contact: typing.Optional[ExpenseLineRequestContact] = pydantic_v1.Field()
+ contact: typing.Optional[ExpenseLineRequestContact] = pydantic.Field()
"""
The expense's contact.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The description of the item that was purchased by the company.
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The expense line item's exchange rate.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ tax_rate: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rate that applies to this line item.
+ """
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/expense_line_request_account.py b/src/merge/resources/accounting/types/expense_line_request_account.py
index 1b68d457..5c64366c 100644
--- a/src/merge/resources/accounting/types/expense_line_request_account.py
+++ b/src/merge/resources/accounting/types/expense_line_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ExpenseLineRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/expense_line_request_contact.py b/src/merge/resources/accounting/types/expense_line_request_contact.py
index 6bd0bfae..c46a0de4 100644
--- a/src/merge/resources/accounting/types/expense_line_request_contact.py
+++ b/src/merge/resources/accounting/types/expense_line_request_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
ExpenseLineRequestContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/expense_line_request_currency.py b/src/merge/resources/accounting/types/expense_line_request_currency.py
index 2e5a0cc2..bde8a180 100644
--- a/src/merge/resources/accounting/types/expense_line_request_currency.py
+++ b/src/merge/resources/accounting/types/expense_line_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
ExpenseLineRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/expense_line_request_item.py b/src/merge/resources/accounting/types/expense_line_request_item.py
index f65e9bde..9631cd0c 100644
--- a/src/merge/resources/accounting/types/expense_line_request_item.py
+++ b/src/merge/resources/accounting/types/expense_line_request_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .item import Item
ExpenseLineRequestItem = typing.Union[str, Item]
diff --git a/src/merge/resources/accounting/types/expense_line_request_tracking_categories_item.py b/src/merge/resources/accounting/types/expense_line_request_tracking_categories_item.py
index d3a539e6..8176e76f 100644
--- a/src/merge/resources/accounting/types/expense_line_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/expense_line_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
ExpenseLineRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/expense_line_request_tracking_category.py b/src/merge/resources/accounting/types/expense_line_request_tracking_category.py
index ccc3b333..3d630a47 100644
--- a/src/merge/resources/accounting/types/expense_line_request_tracking_category.py
+++ b/src/merge/resources/accounting/types/expense_line_request_tracking_category.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
ExpenseLineRequestTrackingCategory = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/expense_line_tracking_categories_item.py b/src/merge/resources/accounting/types/expense_line_tracking_categories_item.py
index a3e6f796..40c9628d 100644
--- a/src/merge/resources/accounting/types/expense_line_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/expense_line_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
ExpenseLineTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/expense_line_tracking_category.py b/src/merge/resources/accounting/types/expense_line_tracking_category.py
index ea969833..05ac968b 100644
--- a/src/merge/resources/accounting/types/expense_line_tracking_category.py
+++ b/src/merge/resources/accounting/types/expense_line_tracking_category.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
ExpenseLineTrackingCategory = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/expense_request.py b/src/merge/resources/accounting/types/expense_request.py
index 3f71ea04..96e99746 100644
--- a/src/merge/resources/accounting/types/expense_request.py
+++ b/src/merge/resources/accounting/types/expense_request.py
@@ -1,20 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .expense_line_request import ExpenseLineRequest
+import datetime as dt
+import pydantic
from .expense_request_account import ExpenseRequestAccount
-from .expense_request_accounting_period import ExpenseRequestAccountingPeriod
-from .expense_request_company import ExpenseRequestCompany
from .expense_request_contact import ExpenseRequestContact
from .expense_request_currency import ExpenseRequestCurrency
+from .expense_request_company import ExpenseRequestCompany
+from .expense_line_request import ExpenseLineRequest
from .expense_request_tracking_categories_item import ExpenseRequestTrackingCategoriesItem
+from .expense_request_accounting_period import ExpenseRequestAccountingPeriod
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ExpenseRequest(pydantic_v1.BaseModel):
+class ExpenseRequest(UniversalBaseModel):
"""
# The Expense Object
@@ -29,37 +30,37 @@ class ExpenseRequest(pydantic_v1.BaseModel):
Fetch from the `GET Expense` endpoint and view a company's expense.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the transaction occurred.
"""
- account: typing.Optional[ExpenseRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[ExpenseRequestAccount] = pydantic.Field()
"""
The expense's payment account.
"""
- contact: typing.Optional[ExpenseRequestContact] = pydantic_v1.Field()
+ contact: typing.Optional[ExpenseRequestContact] = pydantic.Field()
"""
The expense's contact.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The expense's total amount.
"""
- sub_total: typing.Optional[float] = pydantic_v1.Field()
+ sub_total: typing.Optional[float] = pydantic.Field()
"""
The expense's total amount before tax.
"""
- total_tax_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_tax_amount: typing.Optional[float] = pydantic.Field()
"""
The expense's total tax amount.
"""
- currency: typing.Optional[ExpenseRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[ExpenseRequestCurrency] = pydantic.Field()
"""
The expense's currency.
@@ -371,45 +372,42 @@ class ExpenseRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The expense's exchange rate.
"""
- company: typing.Optional[ExpenseRequestCompany] = pydantic_v1.Field()
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
+ company: typing.Optional[ExpenseRequestCompany] = pydantic.Field()
"""
The company the expense belongs to.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
The expense's private note.
"""
lines: typing.Optional[typing.List[ExpenseLineRequest]]
tracking_categories: typing.Optional[typing.List[typing.Optional[ExpenseRequestTrackingCategoriesItem]]]
- accounting_period: typing.Optional[ExpenseRequestAccountingPeriod] = pydantic_v1.Field()
+ accounting_period: typing.Optional[ExpenseRequestAccountingPeriod] = pydantic.Field()
"""
The accounting period that the Expense was generated in.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/expense_request_account.py b/src/merge/resources/accounting/types/expense_request_account.py
index 6d3d14de..5f16b076 100644
--- a/src/merge/resources/accounting/types/expense_request_account.py
+++ b/src/merge/resources/accounting/types/expense_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ExpenseRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/expense_request_accounting_period.py b/src/merge/resources/accounting/types/expense_request_accounting_period.py
index 42d60154..7315ffed 100644
--- a/src/merge/resources/accounting/types/expense_request_accounting_period.py
+++ b/src/merge/resources/accounting/types/expense_request_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
ExpenseRequestAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/expense_request_company.py b/src/merge/resources/accounting/types/expense_request_company.py
index c632888f..21157c63 100644
--- a/src/merge/resources/accounting/types/expense_request_company.py
+++ b/src/merge/resources/accounting/types/expense_request_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
ExpenseRequestCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/expense_request_contact.py b/src/merge/resources/accounting/types/expense_request_contact.py
index 815e7427..cab86b62 100644
--- a/src/merge/resources/accounting/types/expense_request_contact.py
+++ b/src/merge/resources/accounting/types/expense_request_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
ExpenseRequestContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/expense_request_currency.py b/src/merge/resources/accounting/types/expense_request_currency.py
index bd7a4e78..73037c38 100644
--- a/src/merge/resources/accounting/types/expense_request_currency.py
+++ b/src/merge/resources/accounting/types/expense_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
ExpenseRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/expense_request_tracking_categories_item.py b/src/merge/resources/accounting/types/expense_request_tracking_categories_item.py
index a56580fa..97754fd6 100644
--- a/src/merge/resources/accounting/types/expense_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/expense_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
ExpenseRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/expense_response.py b/src/merge/resources/accounting/types/expense_response.py
index cb2549df..2a7eba90 100644
--- a/src/merge/resources/accounting/types/expense_response.py
+++ b/src/merge/resources/accounting/types/expense_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .expense import Expense
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ExpenseResponse(pydantic_v1.BaseModel):
+class ExpenseResponse(UniversalBaseModel):
model: Expense
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/expense_tracking_categories_item.py b/src/merge/resources/accounting/types/expense_tracking_categories_item.py
index 69a369cb..39d65d72 100644
--- a/src/merge/resources/accounting/types/expense_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/expense_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
ExpenseTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/external_target_field_api.py b/src/merge/resources/accounting/types/external_target_field_api.py
index a97d536a..18988d44 100644
--- a/src/merge/resources/accounting/types/external_target_field_api.py
+++ b/src/merge/resources/accounting/types/external_target_field_api.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ExternalTargetFieldApi(pydantic_v1.BaseModel):
+class ExternalTargetFieldApi(UniversalBaseModel):
name: typing.Optional[str]
description: typing.Optional[str]
is_mapped: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/external_target_field_api_response.py b/src/merge/resources/accounting/types/external_target_field_api_response.py
index 610d9f29..5c3241f2 100644
--- a/src/merge/resources/accounting/types/external_target_field_api_response.py
+++ b/src/merge/resources/accounting/types/external_target_field_api_response.py
@@ -1,58 +1,45 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .external_target_field_api import ExternalTargetFieldApi
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ExternalTargetFieldApiResponse(pydantic_v1.BaseModel):
- account: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Account")
- accounting_attachment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(
+class ExternalTargetFieldApiResponse(UniversalBaseModel):
+ account: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Account")
+ accounting_attachment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(
alias="AccountingAttachment"
)
- balance_sheet: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="BalanceSheet")
- cash_flow_statement: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(
+ balance_sheet: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="BalanceSheet")
+ cash_flow_statement: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(
alias="CashFlowStatement"
)
- company_info: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="CompanyInfo")
- contact: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Contact")
- income_statement: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="IncomeStatement")
- credit_note: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="CreditNote")
- item: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Item")
- purchase_order: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="PurchaseOrder")
- tracking_category: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(
- alias="TrackingCategory"
- )
- journal_entry: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="JournalEntry")
- tax_rate: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="TaxRate")
- invoice: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Invoice")
- payment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Payment")
- expense: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Expense")
- vendor_credit: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="VendorCredit")
- transaction: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Transaction")
- general_ledger_transaction: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(
+ company_info: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="CompanyInfo")
+ contact: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Contact")
+ income_statement: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="IncomeStatement")
+ credit_note: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="CreditNote")
+ item: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Item")
+ purchase_order: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="PurchaseOrder")
+ tracking_category: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="TrackingCategory")
+ journal_entry: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="JournalEntry")
+ tax_rate: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="TaxRate")
+ invoice: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Invoice")
+ payment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Payment")
+ expense: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Expense")
+ vendor_credit: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="VendorCredit")
+ transaction: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Transaction")
+ accounting_period: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="AccountingPeriod")
+ general_ledger_transaction: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(
alias="GeneralLedgerTransaction"
)
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_format_enum.py b/src/merge/resources/accounting/types/field_format_enum.py
new file mode 100644
index 00000000..9c904dc8
--- /dev/null
+++ b/src/merge/resources/accounting/types/field_format_enum.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+FieldFormatEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/accounting/types/field_mapping_api_instance.py b/src/merge/resources/accounting/types/field_mapping_api_instance.py
index d9d7670d..ef4d9c48 100644
--- a/src/merge/resources/accounting/types/field_mapping_api_instance.py
+++ b/src/merge/resources/accounting/types/field_mapping_api_instance.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
from .field_mapping_api_instance_target_field import FieldMappingApiInstanceTargetField
+from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingApiInstance(pydantic_v1.BaseModel):
+class FieldMappingApiInstance(UniversalBaseModel):
id: typing.Optional[str]
is_integration_wide: typing.Optional[bool]
target_field: typing.Optional[FieldMappingApiInstanceTargetField]
remote_field: typing.Optional[FieldMappingApiInstanceRemoteField]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_mapping_api_instance_remote_field.py b/src/merge/resources/accounting/types/field_mapping_api_instance_remote_field.py
index 9539d3dc..ddfff4da 100644
--- a/src/merge/resources/accounting/types/field_mapping_api_instance_remote_field.py
+++ b/src/merge/resources/accounting/types/field_mapping_api_instance_remote_field.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .field_mapping_api_instance_remote_field_remote_endpoint_info import (
FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo,
)
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceRemoteField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteField(UniversalBaseModel):
remote_key_name: str
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py b/src/merge/resources/accounting/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
index d9fcc276..14c37c76 100644
--- a/src/merge/resources/accounting/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
+++ b/src/merge/resources/accounting/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(UniversalBaseModel):
method: typing.Optional[str]
url_path: typing.Optional[str]
field_traversal_path: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_mapping_api_instance_response.py b/src/merge/resources/accounting/types/field_mapping_api_instance_response.py
index d2de12fb..866c9be3 100644
--- a/src/merge/resources/accounting/types/field_mapping_api_instance_response.py
+++ b/src/merge/resources/accounting/types/field_mapping_api_instance_response.py
@@ -1,58 +1,45 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .field_mapping_api_instance import FieldMappingApiInstance
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceResponse(pydantic_v1.BaseModel):
- account: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Account")
- accounting_attachment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(
+class FieldMappingApiInstanceResponse(UniversalBaseModel):
+ account: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Account")
+ accounting_attachment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(
alias="AccountingAttachment"
)
- balance_sheet: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="BalanceSheet")
- cash_flow_statement: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(
+ balance_sheet: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="BalanceSheet")
+ cash_flow_statement: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(
alias="CashFlowStatement"
)
- company_info: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="CompanyInfo")
- contact: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Contact")
- income_statement: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="IncomeStatement")
- credit_note: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="CreditNote")
- item: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Item")
- purchase_order: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="PurchaseOrder")
- tracking_category: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(
- alias="TrackingCategory"
- )
- journal_entry: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="JournalEntry")
- tax_rate: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="TaxRate")
- invoice: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Invoice")
- payment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Payment")
- expense: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Expense")
- vendor_credit: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="VendorCredit")
- transaction: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Transaction")
- general_ledger_transaction: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(
+ company_info: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="CompanyInfo")
+ contact: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Contact")
+ income_statement: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="IncomeStatement")
+ credit_note: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="CreditNote")
+ item: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Item")
+ purchase_order: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="PurchaseOrder")
+ tracking_category: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="TrackingCategory")
+ journal_entry: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="JournalEntry")
+ tax_rate: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="TaxRate")
+ invoice: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Invoice")
+ payment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Payment")
+ expense: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Expense")
+ vendor_credit: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="VendorCredit")
+ transaction: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Transaction")
+ accounting_period: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="AccountingPeriod")
+ general_ledger_transaction: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(
alias="GeneralLedgerTransaction"
)
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_mapping_api_instance_target_field.py b/src/merge/resources/accounting/types/field_mapping_api_instance_target_field.py
index 25a8dcff..a1b51052 100644
--- a/src/merge/resources/accounting/types/field_mapping_api_instance_target_field.py
+++ b/src/merge/resources/accounting/types/field_mapping_api_instance_target_field.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceTargetField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceTargetField(UniversalBaseModel):
name: str
description: str
is_organization_wide: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_mapping_instance_response.py b/src/merge/resources/accounting/types/field_mapping_instance_response.py
index b55d2c40..a56aeb93 100644
--- a/src/merge/resources/accounting/types/field_mapping_instance_response.py
+++ b/src/merge/resources/accounting/types/field_mapping_instance_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .field_mapping_api_instance import FieldMappingApiInstance
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingInstanceResponse(pydantic_v1.BaseModel):
+class FieldMappingInstanceResponse(UniversalBaseModel):
model: FieldMappingApiInstance
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_permission_deserializer.py b/src/merge/resources/accounting/types/field_permission_deserializer.py
index 124f3deb..9670537a 100644
--- a/src/merge/resources/accounting/types/field_permission_deserializer.py
+++ b/src/merge/resources/accounting/types/field_permission_deserializer.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializer(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializer(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_permission_deserializer_request.py b/src/merge/resources/accounting/types/field_permission_deserializer_request.py
index 65e80e75..04e14608 100644
--- a/src/merge/resources/accounting/types/field_permission_deserializer_request.py
+++ b/src/merge/resources/accounting/types/field_permission_deserializer_request.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializerRequest(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializerRequest(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/field_type_enum.py b/src/merge/resources/accounting/types/field_type_enum.py
new file mode 100644
index 00000000..e6fa6d6f
--- /dev/null
+++ b/src/merge/resources/accounting/types/field_type_enum.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+FieldTypeEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/accounting/types/income_statement.py b/src/merge/resources/accounting/types/income_statement.py
index 08450396..97202a4a 100644
--- a/src/merge/resources/accounting/types/income_statement.py
+++ b/src/merge/resources/accounting/types/income_statement.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .income_statement_company import IncomeStatementCompany
+import pydantic
+import datetime as dt
from .income_statement_currency import IncomeStatementCurrency
-from .remote_data import RemoteData
+from .income_statement_company import IncomeStatementCompany
from .report_item import ReportItem
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class IncomeStatement(pydantic_v1.BaseModel):
+class IncomeStatement(UniversalBaseModel):
"""
# The IncomeStatement Object
@@ -25,27 +25,27 @@ class IncomeStatement(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The income statement's name.
"""
- currency: typing.Optional[IncomeStatementCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[IncomeStatementCurrency] = pydantic.Field()
"""
The income statement's currency.
@@ -357,62 +357,53 @@ class IncomeStatement(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- company: typing.Optional[IncomeStatementCompany] = pydantic_v1.Field()
+ company: typing.Optional[IncomeStatementCompany] = pydantic.Field()
"""
The company the income statement belongs to.
"""
- start_period: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_period: typing.Optional[dt.datetime] = pydantic.Field()
"""
The income statement's start period.
"""
- end_period: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_period: typing.Optional[dt.datetime] = pydantic.Field()
"""
The income statement's end period.
"""
income: typing.Optional[typing.List[ReportItem]]
cost_of_sales: typing.Optional[typing.List[ReportItem]]
- gross_profit: typing.Optional[float] = pydantic_v1.Field()
+ gross_profit: typing.Optional[float] = pydantic.Field()
"""
The revenue minus the cost of sale.
"""
operating_expenses: typing.Optional[typing.List[ReportItem]]
- net_operating_income: typing.Optional[float] = pydantic_v1.Field()
+ net_operating_income: typing.Optional[float] = pydantic.Field()
"""
The revenue minus the operating expenses.
"""
non_operating_expenses: typing.Optional[typing.List[ReportItem]]
- net_income: typing.Optional[float] = pydantic_v1.Field()
+ net_income: typing.Optional[float] = pydantic.Field()
"""
The gross profit minus the total expenses.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/income_statement_company.py b/src/merge/resources/accounting/types/income_statement_company.py
index 62b20e79..10c03b61 100644
--- a/src/merge/resources/accounting/types/income_statement_company.py
+++ b/src/merge/resources/accounting/types/income_statement_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
IncomeStatementCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/income_statement_currency.py b/src/merge/resources/accounting/types/income_statement_currency.py
index b541b2b6..895d8e51 100644
--- a/src/merge/resources/accounting/types/income_statement_currency.py
+++ b/src/merge/resources/accounting/types/income_statement_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
IncomeStatementCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/individual_common_model_scope_deserializer.py b/src/merge/resources/accounting/types/individual_common_model_scope_deserializer.py
index d80ca06e..122df11c 100644
--- a/src/merge/resources/accounting/types/individual_common_model_scope_deserializer.py
+++ b/src/merge/resources/accounting/types/individual_common_model_scope_deserializer.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer import FieldPermissionDeserializer
from .model_permission_deserializer import ModelPermissionDeserializer
+from .field_permission_deserializer import FieldPermissionDeserializer
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializer(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializer(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializer]]
field_permissions: typing.Optional[FieldPermissionDeserializer]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/individual_common_model_scope_deserializer_request.py b/src/merge/resources/accounting/types/individual_common_model_scope_deserializer_request.py
index 8f2e7de5..a1a80902 100644
--- a/src/merge/resources/accounting/types/individual_common_model_scope_deserializer_request.py
+++ b/src/merge/resources/accounting/types/individual_common_model_scope_deserializer_request.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
from .model_permission_deserializer_request import ModelPermissionDeserializerRequest
+from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializerRequest(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializerRequest(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializerRequest]]
field_permissions: typing.Optional[FieldPermissionDeserializerRequest]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/invoice.py b/src/merge/resources/accounting/types/invoice.py
index bef59576..00213e03 100644
--- a/src/merge/resources/accounting/types/invoice.py
+++ b/src/merge/resources/accounting/types/invoice.py
@@ -1,31 +1,34 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .invoice_accounting_period import InvoiceAccountingPeriod
-from .invoice_applied_payments_item import InvoiceAppliedPaymentsItem
-from .invoice_company import InvoiceCompany
+import pydantic
+import datetime as dt
+from .invoice_type import InvoiceType
from .invoice_contact import InvoiceContact
+from .invoice_company import InvoiceCompany
from .invoice_currency import InvoiceCurrency
-from .invoice_line_item import InvoiceLineItem
-from .invoice_payments_item import InvoicePaymentsItem
-from .invoice_purchase_orders_item import InvoicePurchaseOrdersItem
from .invoice_status import InvoiceStatus
from .invoice_tracking_categories_item import InvoiceTrackingCategoriesItem
-from .invoice_type import InvoiceType
+from .invoice_accounting_period import InvoiceAccountingPeriod
+from .invoice_purchase_orders_item import InvoicePurchaseOrdersItem
+from .invoice_payments_item import InvoicePaymentsItem
+from .invoice_applied_payments_item import InvoiceAppliedPaymentsItem
+from .invoice_line_item import InvoiceLineItem
from .remote_data import RemoteData
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Invoice(pydantic_v1.BaseModel):
+class Invoice(UniversalBaseModel):
"""
# The Invoice Object
### Description
- The `Invoice` object represents an itemized record of goods and/or services sold to a customer.
+ The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor.
+
+ Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`.
### Usage Example
@@ -33,22 +36,22 @@ class Invoice(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- type: typing.Optional[InvoiceType] = pydantic_v1.Field()
+ type: typing.Optional[InvoiceType] = pydantic.Field()
"""
Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice.
@@ -56,42 +59,42 @@ class Invoice(pydantic_v1.BaseModel):
- `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
"""
- contact: typing.Optional[InvoiceContact] = pydantic_v1.Field()
+ contact: typing.Optional[InvoiceContact] = pydantic.Field()
"""
The invoice's contact.
"""
- number: typing.Optional[str] = pydantic_v1.Field()
+ number: typing.Optional[str] = pydantic.Field()
"""
The invoice's number.
"""
- issue_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ issue_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The invoice's issue date.
"""
- due_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ due_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The invoice's due date.
"""
- paid_on_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ paid_on_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The invoice's paid date.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
The invoice's private note.
"""
- company: typing.Optional[InvoiceCompany] = pydantic_v1.Field()
+ company: typing.Optional[InvoiceCompany] = pydantic.Field()
"""
The company the invoice belongs to.
"""
- currency: typing.Optional[InvoiceCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[InvoiceCurrency] = pydantic.Field()
"""
The invoice's currency.
@@ -403,22 +406,22 @@ class Invoice(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The invoice's exchange rate.
"""
- total_discount: typing.Optional[float] = pydantic_v1.Field()
+ total_discount: typing.Optional[float] = pydantic.Field()
"""
The total discounts applied to the total cost.
"""
- sub_total: typing.Optional[float] = pydantic_v1.Field()
+ sub_total: typing.Optional[float] = pydantic.Field()
"""
The total amount being paid before taxes.
"""
- status: typing.Optional[InvoiceStatus] = pydantic_v1.Field()
+ status: typing.Optional[InvoiceStatus] = pydantic.Field()
"""
The status of the invoice.
@@ -430,62 +433,63 @@ class Invoice(pydantic_v1.BaseModel):
- `VOID` - VOID
"""
- total_tax_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_tax_amount: typing.Optional[float] = pydantic.Field()
"""
The total amount being paid in taxes.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The invoice's total amount.
"""
- balance: typing.Optional[float] = pydantic_v1.Field()
+ balance: typing.Optional[float] = pydantic.Field()
"""
The invoice's remaining balance.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's invoice entry was updated.
"""
tracking_categories: typing.Optional[typing.List[typing.Optional[InvoiceTrackingCategoriesItem]]]
- payments: typing.Optional[typing.List[typing.Optional[InvoicePaymentsItem]]] = pydantic_v1.Field()
+ accounting_period: typing.Optional[InvoiceAccountingPeriod] = pydantic.Field()
+ """
+ The accounting period that the Invoice was generated in.
+ """
+
+ purchase_orders: typing.Optional[typing.List[typing.Optional[InvoicePurchaseOrdersItem]]]
+ payments: typing.Optional[typing.List[typing.Optional[InvoicePaymentsItem]]] = pydantic.Field()
"""
Array of `Payment` object IDs.
"""
- applied_payments: typing.Optional[typing.List[typing.Optional[InvoiceAppliedPaymentsItem]]] = pydantic_v1.Field()
+ applied_payments: typing.Optional[typing.List[typing.Optional[InvoiceAppliedPaymentsItem]]] = pydantic.Field()
"""
A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.
"""
line_items: typing.Optional[typing.List[InvoiceLineItem]]
- remote_was_deleted: typing.Optional[bool]
- accounting_period: typing.Optional[InvoiceAccountingPeriod] = pydantic_v1.Field()
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
"""
- The accounting period that the Invoice was generated in.
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
"""
- purchase_orders: typing.Optional[typing.List[typing.Optional[InvoicePurchaseOrdersItem]]]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[RemoteData]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
+ """
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+ """
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[RemoteData]]
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/invoice_accounting_period.py b/src/merge/resources/accounting/types/invoice_accounting_period.py
index e3b87d8c..decfbd1e 100644
--- a/src/merge/resources/accounting/types/invoice_accounting_period.py
+++ b/src/merge/resources/accounting/types/invoice_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
InvoiceAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/invoice_applied_payments_item.py b/src/merge/resources/accounting/types/invoice_applied_payments_item.py
index e2b48038..90a659ed 100644
--- a/src/merge/resources/accounting/types/invoice_applied_payments_item.py
+++ b/src/merge/resources/accounting/types/invoice_applied_payments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_line_item import PaymentLineItem
InvoiceAppliedPaymentsItem = typing.Union[str, PaymentLineItem]
diff --git a/src/merge/resources/accounting/types/invoice_company.py b/src/merge/resources/accounting/types/invoice_company.py
index e8558dc2..9d2faef9 100644
--- a/src/merge/resources/accounting/types/invoice_company.py
+++ b/src/merge/resources/accounting/types/invoice_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
InvoiceCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/invoice_contact.py b/src/merge/resources/accounting/types/invoice_contact.py
index 88b5c862..d2ac5f49 100644
--- a/src/merge/resources/accounting/types/invoice_contact.py
+++ b/src/merge/resources/accounting/types/invoice_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
InvoiceContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/invoice_currency.py b/src/merge/resources/accounting/types/invoice_currency.py
index 151e745d..7f1f47f0 100644
--- a/src/merge/resources/accounting/types/invoice_currency.py
+++ b/src/merge/resources/accounting/types/invoice_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
InvoiceCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/invoice_line_item.py b/src/merge/resources/accounting/types/invoice_line_item.py
index ecef9df8..d5ad1019 100644
--- a/src/merge/resources/accounting/types/invoice_line_item.py
+++ b/src/merge/resources/accounting/types/invoice_line_item.py
@@ -1,18 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .invoice_line_item_account import InvoiceLineItemAccount
+import pydantic
+import datetime as dt
from .invoice_line_item_currency import InvoiceLineItemCurrency
from .invoice_line_item_item import InvoiceLineItemItem
-from .invoice_line_item_tracking_categories_item import InvoiceLineItemTrackingCategoriesItem
+from .invoice_line_item_account import InvoiceLineItemAccount
from .invoice_line_item_tracking_category import InvoiceLineItemTrackingCategory
+from .invoice_line_item_tracking_categories_item import InvoiceLineItemTrackingCategoriesItem
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class InvoiceLineItem(pydantic_v1.BaseModel):
+class InvoiceLineItem(UniversalBaseModel):
"""
# The InvoiceLineItem Object
@@ -26,42 +27,42 @@ class InvoiceLineItem(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The line item's description.
"""
- unit_price: typing.Optional[float] = pydantic_v1.Field()
+ unit_price: typing.Optional[float] = pydantic.Field()
"""
The line item's unit price.
"""
- quantity: typing.Optional[float] = pydantic_v1.Field()
+ quantity: typing.Optional[float] = pydantic.Field()
"""
The line item's quantity.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The line item's total amount.
"""
- currency: typing.Optional[InvoiceLineItemCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[InvoiceLineItemCurrency] = pydantic.Field()
"""
The line item's currency.
@@ -373,41 +374,44 @@ class InvoiceLineItem(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The line item's exchange rate.
"""
item: typing.Optional[InvoiceLineItemItem]
account: typing.Optional[InvoiceLineItemAccount]
- tracking_category: typing.Optional[InvoiceLineItemTrackingCategory]
- tracking_categories: typing.Optional[typing.List[typing.Optional[InvoiceLineItemTrackingCategoriesItem]]]
- company: typing.Optional[str] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
"""
- The company the line item belongs to.
+ The tax rate that applies to this line item.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ tracking_category: typing.Optional[InvoiceLineItemTrackingCategory]
+ tracking_categories: typing.Optional[typing.List[typing.Optional[InvoiceLineItemTrackingCategoriesItem]]] = (
+ pydantic.Field()
+ )
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ The invoice line item's associated tracking categories.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ company: typing.Optional[str] = pydantic.Field()
+ """
+ The company the line item belongs to.
+ """
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
+ """
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+ """
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/invoice_line_item_account.py b/src/merge/resources/accounting/types/invoice_line_item_account.py
index c9bd67f7..24acfa7f 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_account.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
InvoiceLineItemAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_currency.py b/src/merge/resources/accounting/types/invoice_line_item_currency.py
index 6deb561f..849a107b 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_currency.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
InvoiceLineItemCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_item.py b/src/merge/resources/accounting/types/invoice_line_item_item.py
index dbf9418a..fdb657d6 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_item.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .item import Item
InvoiceLineItemItem = typing.Union[str, Item]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_request.py b/src/merge/resources/accounting/types/invoice_line_item_request.py
index a539cde5..837beaa6 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_request.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_request.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .invoice_line_item_request_account import InvoiceLineItemRequestAccount
+import pydantic
from .invoice_line_item_request_currency import InvoiceLineItemRequestCurrency
from .invoice_line_item_request_item import InvoiceLineItemRequestItem
-from .invoice_line_item_request_tracking_categories_item import InvoiceLineItemRequestTrackingCategoriesItem
+from .invoice_line_item_request_account import InvoiceLineItemRequestAccount
from .invoice_line_item_request_tracking_category import InvoiceLineItemRequestTrackingCategory
+from .invoice_line_item_request_tracking_categories_item import InvoiceLineItemRequestTrackingCategoriesItem
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class InvoiceLineItemRequest(pydantic_v1.BaseModel):
+class InvoiceLineItemRequest(UniversalBaseModel):
"""
# The InvoiceLineItem Object
@@ -25,32 +25,32 @@ class InvoiceLineItemRequest(pydantic_v1.BaseModel):
Fetch from the `GET Invoice` endpoint and view the invoice's line items.
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The line item's description.
"""
- unit_price: typing.Optional[float] = pydantic_v1.Field()
+ unit_price: typing.Optional[float] = pydantic.Field()
"""
The line item's unit price.
"""
- quantity: typing.Optional[float] = pydantic_v1.Field()
+ quantity: typing.Optional[float] = pydantic.Field()
"""
The line item's quantity.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The line item's total amount.
"""
- currency: typing.Optional[InvoiceLineItemRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[InvoiceLineItemRequestCurrency] = pydantic.Field()
"""
The line item's currency.
@@ -362,37 +362,40 @@ class InvoiceLineItemRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The line item's exchange rate.
"""
item: typing.Optional[InvoiceLineItemRequestItem]
account: typing.Optional[InvoiceLineItemRequestAccount]
- tracking_category: typing.Optional[InvoiceLineItemRequestTrackingCategory]
- tracking_categories: typing.Optional[typing.List[typing.Optional[InvoiceLineItemRequestTrackingCategoriesItem]]]
- company: typing.Optional[str] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
"""
- The company the line item belongs to.
+ The tax rate that applies to this line item.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ tracking_category: typing.Optional[InvoiceLineItemRequestTrackingCategory]
+ tracking_categories: typing.Optional[typing.List[typing.Optional[InvoiceLineItemRequestTrackingCategoriesItem]]] = (
+ pydantic.Field()
+ )
+ """
+ The invoice line item's associated tracking categories.
+ """
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ company: typing.Optional[str] = pydantic.Field()
+ """
+ The company the line item belongs to.
+ """
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/invoice_line_item_request_account.py b/src/merge/resources/accounting/types/invoice_line_item_request_account.py
index 0b1c8cd6..b401417c 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_request_account.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
InvoiceLineItemRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_request_currency.py b/src/merge/resources/accounting/types/invoice_line_item_request_currency.py
index 70a9b7e1..f5b04771 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_request_currency.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
InvoiceLineItemRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_request_item.py b/src/merge/resources/accounting/types/invoice_line_item_request_item.py
index a0c32380..38e9f1c5 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_request_item.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_request_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .item import Item
InvoiceLineItemRequestItem = typing.Union[str, Item]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_request_tracking_categories_item.py b/src/merge/resources/accounting/types/invoice_line_item_request_tracking_categories_item.py
index a7eba0c4..4d489e3a 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
InvoiceLineItemRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_request_tracking_category.py b/src/merge/resources/accounting/types/invoice_line_item_request_tracking_category.py
index 499d43ee..3774d618 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_request_tracking_category.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_request_tracking_category.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
InvoiceLineItemRequestTrackingCategory = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_tracking_categories_item.py b/src/merge/resources/accounting/types/invoice_line_item_tracking_categories_item.py
index fa22c4ea..adb4e876 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
InvoiceLineItemTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/invoice_line_item_tracking_category.py b/src/merge/resources/accounting/types/invoice_line_item_tracking_category.py
index fff4c012..a5b02155 100644
--- a/src/merge/resources/accounting/types/invoice_line_item_tracking_category.py
+++ b/src/merge/resources/accounting/types/invoice_line_item_tracking_category.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
InvoiceLineItemTrackingCategory = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/invoice_payments_item.py b/src/merge/resources/accounting/types/invoice_payments_item.py
index 546f3ef2..9e9b0658 100644
--- a/src/merge/resources/accounting/types/invoice_payments_item.py
+++ b/src/merge/resources/accounting/types/invoice_payments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment import Payment
InvoicePaymentsItem = typing.Union[str, Payment]
diff --git a/src/merge/resources/accounting/types/invoice_purchase_orders_item.py b/src/merge/resources/accounting/types/invoice_purchase_orders_item.py
index a91afeba..c7b6a15f 100644
--- a/src/merge/resources/accounting/types/invoice_purchase_orders_item.py
+++ b/src/merge/resources/accounting/types/invoice_purchase_orders_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .purchase_order import PurchaseOrder
InvoicePurchaseOrdersItem = typing.Union[str, PurchaseOrder]
diff --git a/src/merge/resources/accounting/types/invoice_request.py b/src/merge/resources/accounting/types/invoice_request.py
index 032c0edf..85097b03 100644
--- a/src/merge/resources/accounting/types/invoice_request.py
+++ b/src/merge/resources/accounting/types/invoice_request.py
@@ -1,35 +1,38 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .invoice_line_item_request import InvoiceLineItemRequest
-from .invoice_request_company import InvoiceRequestCompany
+from .invoice_request_type import InvoiceRequestType
+import pydantic
from .invoice_request_contact import InvoiceRequestContact
+import datetime as dt
+from .invoice_request_status import InvoiceRequestStatus
+from .invoice_request_company import InvoiceRequestCompany
from .invoice_request_currency import InvoiceRequestCurrency
from .invoice_request_payments_item import InvoiceRequestPaymentsItem
-from .invoice_request_purchase_orders_item import InvoiceRequestPurchaseOrdersItem
-from .invoice_request_status import InvoiceRequestStatus
from .invoice_request_tracking_categories_item import InvoiceRequestTrackingCategoriesItem
-from .invoice_request_type import InvoiceRequestType
+from .invoice_line_item_request import InvoiceLineItemRequest
+from .invoice_request_purchase_orders_item import InvoiceRequestPurchaseOrdersItem
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class InvoiceRequest(pydantic_v1.BaseModel):
+class InvoiceRequest(UniversalBaseModel):
"""
# The Invoice Object
- ### Description
- The `Invoice` object represents an itemized record of goods and/or services sold to a customer.
+ ### Description
+
+ The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor.
+
+ Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`.
- If type = accounts_payable `Invoice` is a bill, if type = accounts_receivable it's an invoice.
+ ### Usage Example
- ### Usage Example
- Fetch from the `LIST Invoices` endpoint and view a company's invoices.
+ Fetch from the `LIST Invoices` endpoint and view a company's invoices.
"""
- type: typing.Optional[InvoiceRequestType] = pydantic_v1.Field()
+ type: typing.Optional[InvoiceRequestType] = pydantic.Field()
"""
Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice.
@@ -37,37 +40,37 @@ class InvoiceRequest(pydantic_v1.BaseModel):
- `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
"""
- contact: typing.Optional[InvoiceRequestContact] = pydantic_v1.Field()
+ contact: typing.Optional[InvoiceRequestContact] = pydantic.Field()
"""
The invoice's contact.
"""
- number: typing.Optional[str] = pydantic_v1.Field()
+ number: typing.Optional[str] = pydantic.Field()
"""
The invoice's number.
"""
- issue_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ issue_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The invoice's issue date.
"""
- due_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ due_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The invoice's due date.
"""
- paid_on_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ paid_on_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The invoice's paid date.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
The invoice's private note.
"""
- status: typing.Optional[InvoiceRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[InvoiceRequestStatus] = pydantic.Field()
"""
The status of the invoice.
@@ -79,12 +82,12 @@ class InvoiceRequest(pydantic_v1.BaseModel):
- `VOID` - VOID
"""
- company: typing.Optional[InvoiceRequestCompany] = pydantic_v1.Field()
+ company: typing.Optional[InvoiceRequestCompany] = pydantic.Field()
"""
The company the invoice belongs to.
"""
- currency: typing.Optional[InvoiceRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[InvoiceRequestCurrency] = pydantic.Field()
"""
The invoice's currency.
@@ -396,37 +399,42 @@ class InvoiceRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The invoice's exchange rate.
"""
- total_discount: typing.Optional[float] = pydantic_v1.Field()
+ total_discount: typing.Optional[float] = pydantic.Field()
"""
The total discounts applied to the total cost.
"""
- sub_total: typing.Optional[float] = pydantic_v1.Field()
+ sub_total: typing.Optional[float] = pydantic.Field()
"""
The total amount being paid before taxes.
"""
- total_tax_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_tax_amount: typing.Optional[float] = pydantic.Field()
"""
The total amount being paid in taxes.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The invoice's total amount.
"""
- balance: typing.Optional[float] = pydantic_v1.Field()
+ balance: typing.Optional[float] = pydantic.Field()
"""
The invoice's remaining balance.
"""
- payments: typing.Optional[typing.List[typing.Optional[InvoiceRequestPaymentsItem]]] = pydantic_v1.Field()
+ payments: typing.Optional[typing.List[typing.Optional[InvoiceRequestPaymentsItem]]] = pydantic.Field()
"""
Array of `Payment` object IDs.
"""
@@ -434,23 +442,15 @@ class InvoiceRequest(pydantic_v1.BaseModel):
tracking_categories: typing.Optional[typing.List[typing.Optional[InvoiceRequestTrackingCategoriesItem]]]
line_items: typing.Optional[typing.List[InvoiceLineItemRequest]]
purchase_orders: typing.Optional[typing.List[typing.Optional[InvoiceRequestPurchaseOrdersItem]]]
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/invoice_request_company.py b/src/merge/resources/accounting/types/invoice_request_company.py
index dba10e8c..d3ffd5e9 100644
--- a/src/merge/resources/accounting/types/invoice_request_company.py
+++ b/src/merge/resources/accounting/types/invoice_request_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
InvoiceRequestCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/invoice_request_contact.py b/src/merge/resources/accounting/types/invoice_request_contact.py
index e197c573..537743ff 100644
--- a/src/merge/resources/accounting/types/invoice_request_contact.py
+++ b/src/merge/resources/accounting/types/invoice_request_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
InvoiceRequestContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/invoice_request_currency.py b/src/merge/resources/accounting/types/invoice_request_currency.py
index 1c97cada..380df173 100644
--- a/src/merge/resources/accounting/types/invoice_request_currency.py
+++ b/src/merge/resources/accounting/types/invoice_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
InvoiceRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/invoice_request_payments_item.py b/src/merge/resources/accounting/types/invoice_request_payments_item.py
index 9fce823b..6c00ca5a 100644
--- a/src/merge/resources/accounting/types/invoice_request_payments_item.py
+++ b/src/merge/resources/accounting/types/invoice_request_payments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment import Payment
InvoiceRequestPaymentsItem = typing.Union[str, Payment]
diff --git a/src/merge/resources/accounting/types/invoice_request_purchase_orders_item.py b/src/merge/resources/accounting/types/invoice_request_purchase_orders_item.py
index e45382ce..da93d985 100644
--- a/src/merge/resources/accounting/types/invoice_request_purchase_orders_item.py
+++ b/src/merge/resources/accounting/types/invoice_request_purchase_orders_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .purchase_order import PurchaseOrder
InvoiceRequestPurchaseOrdersItem = typing.Union[str, PurchaseOrder]
diff --git a/src/merge/resources/accounting/types/invoice_request_status.py b/src/merge/resources/accounting/types/invoice_request_status.py
index 7311ef1d..afabdf22 100644
--- a/src/merge/resources/accounting/types/invoice_request_status.py
+++ b/src/merge/resources/accounting/types/invoice_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .invoice_status_enum import InvoiceStatusEnum
InvoiceRequestStatus = typing.Union[InvoiceStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/invoice_request_tracking_categories_item.py b/src/merge/resources/accounting/types/invoice_request_tracking_categories_item.py
index 9a333048..3913ccd2 100644
--- a/src/merge/resources/accounting/types/invoice_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/invoice_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
InvoiceRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/invoice_request_type.py b/src/merge/resources/accounting/types/invoice_request_type.py
index 9b0799d0..8ab1a60a 100644
--- a/src/merge/resources/accounting/types/invoice_request_type.py
+++ b/src/merge/resources/accounting/types/invoice_request_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .invoice_type_enum import InvoiceTypeEnum
InvoiceRequestType = typing.Union[InvoiceTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/invoice_response.py b/src/merge/resources/accounting/types/invoice_response.py
index 0aa5deaf..b2443598 100644
--- a/src/merge/resources/accounting/types/invoice_response.py
+++ b/src/merge/resources/accounting/types/invoice_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .invoice import Invoice
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class InvoiceResponse(pydantic_v1.BaseModel):
+class InvoiceResponse(UniversalBaseModel):
model: Invoice
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/invoice_status.py b/src/merge/resources/accounting/types/invoice_status.py
index aff15936..34180cef 100644
--- a/src/merge/resources/accounting/types/invoice_status.py
+++ b/src/merge/resources/accounting/types/invoice_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .invoice_status_enum import InvoiceStatusEnum
InvoiceStatus = typing.Union[InvoiceStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/invoice_status_enum.py b/src/merge/resources/accounting/types/invoice_status_enum.py
index 9aeca5c7..e2c625c2 100644
--- a/src/merge/resources/accounting/types/invoice_status_enum.py
+++ b/src/merge/resources/accounting/types/invoice_status_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class InvoiceStatusEnum(str, enum.Enum):
- """
- - `PAID` - PAID
- - `DRAFT` - DRAFT
- - `SUBMITTED` - SUBMITTED
- - `PARTIALLY_PAID` - PARTIALLY_PAID
- - `OPEN` - OPEN
- - `VOID` - VOID
- """
-
- PAID = "PAID"
- DRAFT = "DRAFT"
- SUBMITTED = "SUBMITTED"
- PARTIALLY_PAID = "PARTIALLY_PAID"
- OPEN = "OPEN"
- VOID = "VOID"
-
- def visit(
- self,
- paid: typing.Callable[[], T_Result],
- draft: typing.Callable[[], T_Result],
- submitted: typing.Callable[[], T_Result],
- partially_paid: typing.Callable[[], T_Result],
- open: typing.Callable[[], T_Result],
- void: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is InvoiceStatusEnum.PAID:
- return paid()
- if self is InvoiceStatusEnum.DRAFT:
- return draft()
- if self is InvoiceStatusEnum.SUBMITTED:
- return submitted()
- if self is InvoiceStatusEnum.PARTIALLY_PAID:
- return partially_paid()
- if self is InvoiceStatusEnum.OPEN:
- return open()
- if self is InvoiceStatusEnum.VOID:
- return void()
+InvoiceStatusEnum = typing.Union[
+ typing.Literal["PAID", "DRAFT", "SUBMITTED", "PARTIALLY_PAID", "OPEN", "VOID"], typing.Any
+]
diff --git a/src/merge/resources/accounting/types/invoice_tracking_categories_item.py b/src/merge/resources/accounting/types/invoice_tracking_categories_item.py
index 1ade3e05..f7c610ff 100644
--- a/src/merge/resources/accounting/types/invoice_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/invoice_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
InvoiceTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/invoice_type.py b/src/merge/resources/accounting/types/invoice_type.py
index 701f7ece..8adfd989 100644
--- a/src/merge/resources/accounting/types/invoice_type.py
+++ b/src/merge/resources/accounting/types/invoice_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .invoice_type_enum import InvoiceTypeEnum
InvoiceType = typing.Union[InvoiceTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/invoice_type_enum.py b/src/merge/resources/accounting/types/invoice_type_enum.py
index e4fe99da..4348a702 100644
--- a/src/merge/resources/accounting/types/invoice_type_enum.py
+++ b/src/merge/resources/accounting/types/invoice_type_enum.py
@@ -1,24 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class InvoiceTypeEnum(str, enum.Enum):
- """
- - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
- - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
- """
-
- ACCOUNTS_RECEIVABLE = "ACCOUNTS_RECEIVABLE"
- ACCOUNTS_PAYABLE = "ACCOUNTS_PAYABLE"
-
- def visit(
- self, accounts_receivable: typing.Callable[[], T_Result], accounts_payable: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is InvoiceTypeEnum.ACCOUNTS_RECEIVABLE:
- return accounts_receivable()
- if self is InvoiceTypeEnum.ACCOUNTS_PAYABLE:
- return accounts_payable()
+InvoiceTypeEnum = typing.Union[typing.Literal["ACCOUNTS_RECEIVABLE", "ACCOUNTS_PAYABLE"], typing.Any]
diff --git a/src/merge/resources/accounting/types/issue.py b/src/merge/resources/accounting/types/issue.py
index 086a0db2..5a584515 100644
--- a/src/merge/resources/accounting/types/issue.py
+++ b/src/merge/resources/accounting/types/issue.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue_status import IssueStatus
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Issue(pydantic_v1.BaseModel):
+class Issue(UniversalBaseModel):
id: typing.Optional[str]
- status: typing.Optional[IssueStatus] = pydantic_v1.Field()
+ status: typing.Optional[IssueStatus] = pydantic.Field()
"""
Status of the issue. Options: ('ONGOING', 'RESOLVED')
@@ -19,26 +19,17 @@ class Issue(pydantic_v1.BaseModel):
"""
error_description: str
- end_user: typing.Optional[typing.Dict[str, typing.Any]]
+ end_user: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
first_incident_time: typing.Optional[dt.datetime]
last_incident_time: typing.Optional[dt.datetime]
is_muted: typing.Optional[bool]
error_details: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/issue_status.py b/src/merge/resources/accounting/types/issue_status.py
index 8e4d6516..59d004d8 100644
--- a/src/merge/resources/accounting/types/issue_status.py
+++ b/src/merge/resources/accounting/types/issue_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .issue_status_enum import IssueStatusEnum
IssueStatus = typing.Union[IssueStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/issue_status_enum.py b/src/merge/resources/accounting/types/issue_status_enum.py
index fc2ef2b5..76eb5549 100644
--- a/src/merge/resources/accounting/types/issue_status_enum.py
+++ b/src/merge/resources/accounting/types/issue_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssueStatusEnum(str, enum.Enum):
- """
- - `ONGOING` - ONGOING
- - `RESOLVED` - RESOLVED
- """
-
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssueStatusEnum.ONGOING:
- return ongoing()
- if self is IssueStatusEnum.RESOLVED:
- return resolved()
+IssueStatusEnum = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/accounting/types/item.py b/src/merge/resources/accounting/types/item.py
index 53354ebe..9b25289d 100644
--- a/src/merge/resources/accounting/types/item.py
+++ b/src/merge/resources/accounting/types/item.py
@@ -1,18 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .item_company import ItemCompany
+import pydantic
+import datetime as dt
+from .item_status import ItemStatus
from .item_purchase_account import ItemPurchaseAccount
from .item_sales_account import ItemSalesAccount
-from .item_status import ItemStatus
+from .item_company import ItemCompany
+from .item_purchase_tax_rate import ItemPurchaseTaxRate
+from .item_sales_tax_rate import ItemSalesTaxRate
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Item(pydantic_v1.BaseModel):
+class Item(UniversalBaseModel):
"""
# The Item Object
@@ -26,27 +28,27 @@ class Item(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The item's name.
"""
- status: typing.Optional[ItemStatus] = pydantic_v1.Field()
+ status: typing.Optional[ItemStatus] = pydantic.Field()
"""
The item's status.
@@ -54,58 +56,59 @@ class Item(pydantic_v1.BaseModel):
- `ARCHIVED` - ARCHIVED
"""
- unit_price: typing.Optional[float] = pydantic_v1.Field()
+ unit_price: typing.Optional[float] = pydantic.Field()
"""
The item's unit price.
"""
- purchase_price: typing.Optional[float] = pydantic_v1.Field()
+ purchase_price: typing.Optional[float] = pydantic.Field()
"""
The price at which the item is purchased from a vendor.
"""
- purchase_account: typing.Optional[ItemPurchaseAccount] = pydantic_v1.Field()
+ purchase_account: typing.Optional[ItemPurchaseAccount] = pydantic.Field()
"""
References the default account used to record a purchase of the item.
"""
- sales_account: typing.Optional[ItemSalesAccount] = pydantic_v1.Field()
+ sales_account: typing.Optional[ItemSalesAccount] = pydantic.Field()
"""
References the default account used to record a sale.
"""
- company: typing.Optional[ItemCompany] = pydantic_v1.Field()
+ company: typing.Optional[ItemCompany] = pydantic.Field()
"""
The company the item belongs to.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ purchase_tax_rate: typing.Optional[ItemPurchaseTaxRate] = pydantic.Field()
"""
- When the third party's item note was updated.
+ The default purchase tax rate for this item.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ sales_tax_rate: typing.Optional[ItemSalesTaxRate] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ The default sales tax rate for this item.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[RemoteData]]
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
+ """
+ When the third party's item note was updated.
+ """
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
+ """
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+ """
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[RemoteData]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/item_company.py b/src/merge/resources/accounting/types/item_company.py
index 8bd6469f..b6e28471 100644
--- a/src/merge/resources/accounting/types/item_company.py
+++ b/src/merge/resources/accounting/types/item_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
ItemCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/item_format_enum.py b/src/merge/resources/accounting/types/item_format_enum.py
new file mode 100644
index 00000000..37140f1f
--- /dev/null
+++ b/src/merge/resources/accounting/types/item_format_enum.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+ItemFormatEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/accounting/types/item_purchase_account.py b/src/merge/resources/accounting/types/item_purchase_account.py
index adb31772..97459039 100644
--- a/src/merge/resources/accounting/types/item_purchase_account.py
+++ b/src/merge/resources/accounting/types/item_purchase_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ItemPurchaseAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/item_purchase_tax_rate.py b/src/merge/resources/accounting/types/item_purchase_tax_rate.py
new file mode 100644
index 00000000..db4379ab
--- /dev/null
+++ b/src/merge/resources/accounting/types/item_purchase_tax_rate.py
@@ -0,0 +1,6 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from .tax_rate import TaxRate
+
+ItemPurchaseTaxRate = typing.Union[str, TaxRate]
diff --git a/src/merge/resources/accounting/types/item_sales_account.py b/src/merge/resources/accounting/types/item_sales_account.py
index 9c6991a2..daa5300f 100644
--- a/src/merge/resources/accounting/types/item_sales_account.py
+++ b/src/merge/resources/accounting/types/item_sales_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ItemSalesAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/item_sales_tax_rate.py b/src/merge/resources/accounting/types/item_sales_tax_rate.py
new file mode 100644
index 00000000..9face230
--- /dev/null
+++ b/src/merge/resources/accounting/types/item_sales_tax_rate.py
@@ -0,0 +1,6 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from .tax_rate import TaxRate
+
+ItemSalesTaxRate = typing.Union[str, TaxRate]
diff --git a/src/merge/resources/accounting/types/item_schema.py b/src/merge/resources/accounting/types/item_schema.py
new file mode 100644
index 00000000..cfe24209
--- /dev/null
+++ b/src/merge/resources/accounting/types/item_schema.py
@@ -0,0 +1,23 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ....core.pydantic_utilities import UniversalBaseModel
+import typing
+from .item_type_enum import ItemTypeEnum
+from .item_format_enum import ItemFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class ItemSchema(UniversalBaseModel):
+ item_type: typing.Optional[ItemTypeEnum]
+ item_format: typing.Optional[ItemFormatEnum]
+ item_choices: typing.Optional[typing.List[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/merge/resources/accounting/types/item_status.py b/src/merge/resources/accounting/types/item_status.py
index 5b7de869..28262e4a 100644
--- a/src/merge/resources/accounting/types/item_status.py
+++ b/src/merge/resources/accounting/types/item_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .status_7_d_1_enum import Status7D1Enum
ItemStatus = typing.Union[Status7D1Enum, str]
diff --git a/src/merge/resources/accounting/types/item_type_enum.py b/src/merge/resources/accounting/types/item_type_enum.py
new file mode 100644
index 00000000..e8873e07
--- /dev/null
+++ b/src/merge/resources/accounting/types/item_type_enum.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+ItemTypeEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/accounting/types/journal_entry.py b/src/merge/resources/accounting/types/journal_entry.py
index 942157b7..0de4f12f 100644
--- a/src/merge/resources/accounting/types/journal_entry.py
+++ b/src/merge/resources/accounting/types/journal_entry.py
@@ -1,22 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .journal_entry_accounting_period import JournalEntryAccountingPeriod
+import pydantic
+import datetime as dt
+from .journal_entry_payments_item import JournalEntryPaymentsItem
from .journal_entry_applied_payments_item import JournalEntryAppliedPaymentsItem
-from .journal_entry_company import JournalEntryCompany
from .journal_entry_currency import JournalEntryCurrency
-from .journal_entry_payments_item import JournalEntryPaymentsItem
-from .journal_entry_posting_status import JournalEntryPostingStatus
-from .journal_entry_tracking_categories_item import JournalEntryTrackingCategoriesItem
+from .journal_entry_company import JournalEntryCompany
from .journal_line import JournalLine
+from .journal_entry_tracking_categories_item import JournalEntryTrackingCategoriesItem
+from .journal_entry_posting_status import JournalEntryPostingStatus
+from .journal_entry_accounting_period import JournalEntryAccountingPeriod
from .remote_data import RemoteData
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class JournalEntry(pydantic_v1.BaseModel):
+class JournalEntry(UniversalBaseModel):
"""
# The JournalEntry Object
@@ -34,54 +35,42 @@ class JournalEntry(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The journal entry's transaction date.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
- """
- When the third party's journal entry was created.
- """
-
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
- """
- When the third party's journal entry was updated.
- """
-
- payments: typing.Optional[typing.List[typing.Optional[JournalEntryPaymentsItem]]] = pydantic_v1.Field()
+ payments: typing.Optional[typing.List[typing.Optional[JournalEntryPaymentsItem]]] = pydantic.Field()
"""
Array of `Payment` object IDs.
"""
- applied_payments: typing.Optional[
- typing.List[typing.Optional[JournalEntryAppliedPaymentsItem]]
- ] = pydantic_v1.Field()
+ applied_payments: typing.Optional[typing.List[typing.Optional[JournalEntryAppliedPaymentsItem]]] = pydantic.Field()
"""
A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
The journal entry's private note.
"""
- currency: typing.Optional[JournalEntryCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[JournalEntryCurrency] = pydantic.Field()
"""
The journal's currency.
@@ -393,25 +382,34 @@ class JournalEntry(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The journal entry's exchange rate.
"""
- company: typing.Optional[JournalEntryCompany] = pydantic_v1.Field()
+ company: typing.Optional[JournalEntryCompany] = pydantic.Field()
"""
The company the journal entry belongs to.
"""
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
lines: typing.Optional[typing.List[JournalLine]]
- journal_number: typing.Optional[str] = pydantic_v1.Field()
+ journal_number: typing.Optional[str] = pydantic.Field()
"""
Reference number for identifying journal entries.
"""
tracking_categories: typing.Optional[typing.List[typing.Optional[JournalEntryTrackingCategoriesItem]]]
- remote_was_deleted: typing.Optional[bool]
- posting_status: typing.Optional[JournalEntryPostingStatus] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
+ """
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+ """
+
+ posting_status: typing.Optional[JournalEntryPostingStatus] = pydantic.Field()
"""
The journal's posting status.
@@ -419,28 +417,30 @@ class JournalEntry(pydantic_v1.BaseModel):
- `POSTED` - POSTED
"""
- accounting_period: typing.Optional[JournalEntryAccountingPeriod] = pydantic_v1.Field()
+ accounting_period: typing.Optional[JournalEntryAccountingPeriod] = pydantic.Field()
"""
The accounting period that the JournalEntry was generated in.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[RemoteData]]
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
+ """
+ When the third party's journal entry was created.
+ """
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
+ """
+ When the third party's journal entry was updated.
+ """
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[RemoteData]]
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/journal_entry_accounting_period.py b/src/merge/resources/accounting/types/journal_entry_accounting_period.py
index 1684bcf6..e0176a57 100644
--- a/src/merge/resources/accounting/types/journal_entry_accounting_period.py
+++ b/src/merge/resources/accounting/types/journal_entry_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
JournalEntryAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/journal_entry_applied_payments_item.py b/src/merge/resources/accounting/types/journal_entry_applied_payments_item.py
index 4a8fb7fc..142ef0fb 100644
--- a/src/merge/resources/accounting/types/journal_entry_applied_payments_item.py
+++ b/src/merge/resources/accounting/types/journal_entry_applied_payments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_line_item import PaymentLineItem
JournalEntryAppliedPaymentsItem = typing.Union[str, PaymentLineItem]
diff --git a/src/merge/resources/accounting/types/journal_entry_company.py b/src/merge/resources/accounting/types/journal_entry_company.py
index 6856f4f3..b5acbcf4 100644
--- a/src/merge/resources/accounting/types/journal_entry_company.py
+++ b/src/merge/resources/accounting/types/journal_entry_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
JournalEntryCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/journal_entry_currency.py b/src/merge/resources/accounting/types/journal_entry_currency.py
index 46571a1d..f46921bf 100644
--- a/src/merge/resources/accounting/types/journal_entry_currency.py
+++ b/src/merge/resources/accounting/types/journal_entry_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
JournalEntryCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/journal_entry_payments_item.py b/src/merge/resources/accounting/types/journal_entry_payments_item.py
index 286f7632..75629f32 100644
--- a/src/merge/resources/accounting/types/journal_entry_payments_item.py
+++ b/src/merge/resources/accounting/types/journal_entry_payments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment import Payment
JournalEntryPaymentsItem = typing.Union[str, Payment]
diff --git a/src/merge/resources/accounting/types/journal_entry_posting_status.py b/src/merge/resources/accounting/types/journal_entry_posting_status.py
index 4be13128..1cabd08b 100644
--- a/src/merge/resources/accounting/types/journal_entry_posting_status.py
+++ b/src/merge/resources/accounting/types/journal_entry_posting_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .posting_status_enum import PostingStatusEnum
JournalEntryPostingStatus = typing.Union[PostingStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/journal_entry_request.py b/src/merge/resources/accounting/types/journal_entry_request.py
index 8a651811..364c9ef1 100644
--- a/src/merge/resources/accounting/types/journal_entry_request.py
+++ b/src/merge/resources/accounting/types/journal_entry_request.py
@@ -1,19 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .journal_entry_request_company import JournalEntryRequestCompany
-from .journal_entry_request_currency import JournalEntryRequestCurrency
+import datetime as dt
+import pydantic
from .journal_entry_request_payments_item import JournalEntryRequestPaymentsItem
-from .journal_entry_request_posting_status import JournalEntryRequestPostingStatus
+from .journal_entry_request_currency import JournalEntryRequestCurrency
+from .journal_entry_request_company import JournalEntryRequestCompany
from .journal_entry_request_tracking_categories_item import JournalEntryRequestTrackingCategoriesItem
from .journal_line_request import JournalLineRequest
+from .journal_entry_request_posting_status import JournalEntryRequestPostingStatus
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class JournalEntryRequest(pydantic_v1.BaseModel):
+class JournalEntryRequest(UniversalBaseModel):
"""
# The JournalEntry Object
@@ -26,22 +27,22 @@ class JournalEntryRequest(pydantic_v1.BaseModel):
Fetch from the `GET JournalEntry` endpoint and view a company's journey entry.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The journal entry's transaction date.
"""
- payments: typing.Optional[typing.List[typing.Optional[JournalEntryRequestPaymentsItem]]] = pydantic_v1.Field()
+ payments: typing.Optional[typing.List[typing.Optional[JournalEntryRequestPaymentsItem]]] = pydantic.Field()
"""
Array of `Payment` object IDs.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
The journal entry's private note.
"""
- currency: typing.Optional[JournalEntryRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[JournalEntryRequestCurrency] = pydantic.Field()
"""
The journal's currency.
@@ -353,24 +354,29 @@ class JournalEntryRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The journal entry's exchange rate.
"""
- company: typing.Optional[JournalEntryRequestCompany] = pydantic_v1.Field()
+ company: typing.Optional[JournalEntryRequestCompany] = pydantic.Field()
"""
The company the journal entry belongs to.
"""
tracking_categories: typing.Optional[typing.List[typing.Optional[JournalEntryRequestTrackingCategoriesItem]]]
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
lines: typing.Optional[typing.List[JournalLineRequest]]
- journal_number: typing.Optional[str] = pydantic_v1.Field()
+ journal_number: typing.Optional[str] = pydantic.Field()
"""
Reference number for identifying journal entries.
"""
- posting_status: typing.Optional[JournalEntryRequestPostingStatus] = pydantic_v1.Field()
+ posting_status: typing.Optional[JournalEntryRequestPostingStatus] = pydantic.Field()
"""
The journal's posting status.
@@ -378,23 +384,15 @@ class JournalEntryRequest(pydantic_v1.BaseModel):
- `POSTED` - POSTED
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/journal_entry_request_company.py b/src/merge/resources/accounting/types/journal_entry_request_company.py
index 5c388f77..cbb988fc 100644
--- a/src/merge/resources/accounting/types/journal_entry_request_company.py
+++ b/src/merge/resources/accounting/types/journal_entry_request_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
JournalEntryRequestCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/journal_entry_request_currency.py b/src/merge/resources/accounting/types/journal_entry_request_currency.py
index 07e56596..f9e31111 100644
--- a/src/merge/resources/accounting/types/journal_entry_request_currency.py
+++ b/src/merge/resources/accounting/types/journal_entry_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
JournalEntryRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/journal_entry_request_payments_item.py b/src/merge/resources/accounting/types/journal_entry_request_payments_item.py
index 13c34a9c..dcc1cd26 100644
--- a/src/merge/resources/accounting/types/journal_entry_request_payments_item.py
+++ b/src/merge/resources/accounting/types/journal_entry_request_payments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment import Payment
JournalEntryRequestPaymentsItem = typing.Union[str, Payment]
diff --git a/src/merge/resources/accounting/types/journal_entry_request_posting_status.py b/src/merge/resources/accounting/types/journal_entry_request_posting_status.py
index 44728c57..1a6fc512 100644
--- a/src/merge/resources/accounting/types/journal_entry_request_posting_status.py
+++ b/src/merge/resources/accounting/types/journal_entry_request_posting_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .posting_status_enum import PostingStatusEnum
JournalEntryRequestPostingStatus = typing.Union[PostingStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/journal_entry_request_tracking_categories_item.py b/src/merge/resources/accounting/types/journal_entry_request_tracking_categories_item.py
index 5661c699..5bbcc3e9 100644
--- a/src/merge/resources/accounting/types/journal_entry_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/journal_entry_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
JournalEntryRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/journal_entry_response.py b/src/merge/resources/accounting/types/journal_entry_response.py
index 1463efca..b23209b3 100644
--- a/src/merge/resources/accounting/types/journal_entry_response.py
+++ b/src/merge/resources/accounting/types/journal_entry_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .journal_entry import JournalEntry
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class JournalEntryResponse(pydantic_v1.BaseModel):
+class JournalEntryResponse(UniversalBaseModel):
model: JournalEntry
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/journal_entry_tracking_categories_item.py b/src/merge/resources/accounting/types/journal_entry_tracking_categories_item.py
index dc3f6b22..8b56d5a8 100644
--- a/src/merge/resources/accounting/types/journal_entry_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/journal_entry_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
JournalEntryTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/journal_line.py b/src/merge/resources/accounting/types/journal_line.py
index fc79526f..90d1e01c 100644
--- a/src/merge/resources/accounting/types/journal_line.py
+++ b/src/merge/resources/accounting/types/journal_line.py
@@ -1,17 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .journal_line_account import JournalLineAccount
-from .journal_line_currency import JournalLineCurrency
-from .journal_line_tracking_categories_item import JournalLineTrackingCategoriesItem
from .journal_line_tracking_category import JournalLineTrackingCategory
+from .journal_line_tracking_categories_item import JournalLineTrackingCategoriesItem
+from .journal_line_currency import JournalLineCurrency
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class JournalLine(pydantic_v1.BaseModel):
+class JournalLine(UniversalBaseModel):
"""
# The JournalLine Object
@@ -25,30 +26,36 @@ class JournalLine(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
account: typing.Optional[JournalLineAccount]
- net_amount: typing.Optional[float] = pydantic_v1.Field()
+ net_amount: typing.Optional[float] = pydantic.Field()
"""
The value of the line item including taxes and other fees.
"""
tracking_category: typing.Optional[JournalLineTrackingCategory]
- tracking_categories: typing.Optional[typing.List[typing.Optional[JournalLineTrackingCategoriesItem]]]
- currency: typing.Optional[JournalLineCurrency] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[JournalLineTrackingCategoriesItem]]] = (
+ pydantic.Field()
+ )
+ """
+ The journal line item's associated tracking categories.
+ """
+
+ currency: typing.Optional[JournalLineCurrency] = pydantic.Field()
"""
The journal line item's currency.
@@ -360,41 +367,39 @@ class JournalLine(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the journal entry belongs to.
"""
contact: typing.Optional[str]
- description: typing.Optional[str] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rate that applies to this line item.
+ """
+
+ description: typing.Optional[str] = pydantic.Field()
"""
The line's description.
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The journal line item's exchange rate.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/journal_line_account.py b/src/merge/resources/accounting/types/journal_line_account.py
index 3f1ff32c..aa8748bd 100644
--- a/src/merge/resources/accounting/types/journal_line_account.py
+++ b/src/merge/resources/accounting/types/journal_line_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
JournalLineAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/journal_line_currency.py b/src/merge/resources/accounting/types/journal_line_currency.py
index 9851f4cb..659bc4ec 100644
--- a/src/merge/resources/accounting/types/journal_line_currency.py
+++ b/src/merge/resources/accounting/types/journal_line_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
JournalLineCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/journal_line_request.py b/src/merge/resources/accounting/types/journal_line_request.py
index cb21b79f..e6c90dd3 100644
--- a/src/merge/resources/accounting/types/journal_line_request.py
+++ b/src/merge/resources/accounting/types/journal_line_request.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .journal_line_request_account import JournalLineRequestAccount
-from .journal_line_request_currency import JournalLineRequestCurrency
-from .journal_line_request_tracking_categories_item import JournalLineRequestTrackingCategoriesItem
from .journal_line_request_tracking_category import JournalLineRequestTrackingCategory
+from .journal_line_request_tracking_categories_item import JournalLineRequestTrackingCategoriesItem
+from .journal_line_request_currency import JournalLineRequestCurrency
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class JournalLineRequest(pydantic_v1.BaseModel):
+class JournalLineRequest(UniversalBaseModel):
"""
# The JournalLine Object
@@ -24,20 +24,26 @@ class JournalLineRequest(pydantic_v1.BaseModel):
Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items.
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
account: typing.Optional[JournalLineRequestAccount]
- net_amount: typing.Optional[float] = pydantic_v1.Field()
+ net_amount: typing.Optional[float] = pydantic.Field()
"""
The value of the line item including taxes and other fees.
"""
tracking_category: typing.Optional[JournalLineRequestTrackingCategory]
- tracking_categories: typing.Optional[typing.List[typing.Optional[JournalLineRequestTrackingCategoriesItem]]]
- currency: typing.Optional[JournalLineRequestCurrency] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[JournalLineRequestTrackingCategoriesItem]]] = (
+ pydantic.Field()
+ )
+ """
+ The journal line item's associated tracking categories.
+ """
+
+ currency: typing.Optional[JournalLineRequestCurrency] = pydantic.Field()
"""
The journal line item's currency.
@@ -349,39 +355,36 @@ class JournalLineRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the journal entry belongs to.
"""
contact: typing.Optional[str]
- description: typing.Optional[str] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rate that applies to this line item.
+ """
+
+ description: typing.Optional[str] = pydantic.Field()
"""
The line's description.
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The journal line item's exchange rate.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/journal_line_request_account.py b/src/merge/resources/accounting/types/journal_line_request_account.py
index a16863b7..c812ebfc 100644
--- a/src/merge/resources/accounting/types/journal_line_request_account.py
+++ b/src/merge/resources/accounting/types/journal_line_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
JournalLineRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/journal_line_request_currency.py b/src/merge/resources/accounting/types/journal_line_request_currency.py
index 9b10f128..087881c1 100644
--- a/src/merge/resources/accounting/types/journal_line_request_currency.py
+++ b/src/merge/resources/accounting/types/journal_line_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
JournalLineRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/journal_line_request_tracking_categories_item.py b/src/merge/resources/accounting/types/journal_line_request_tracking_categories_item.py
index 8833229a..c60477af 100644
--- a/src/merge/resources/accounting/types/journal_line_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/journal_line_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
JournalLineRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/journal_line_request_tracking_category.py b/src/merge/resources/accounting/types/journal_line_request_tracking_category.py
index 995705d7..7191d13c 100644
--- a/src/merge/resources/accounting/types/journal_line_request_tracking_category.py
+++ b/src/merge/resources/accounting/types/journal_line_request_tracking_category.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
JournalLineRequestTrackingCategory = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/journal_line_tracking_categories_item.py b/src/merge/resources/accounting/types/journal_line_tracking_categories_item.py
index e63bdbaa..723f6671 100644
--- a/src/merge/resources/accounting/types/journal_line_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/journal_line_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
JournalLineTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/journal_line_tracking_category.py b/src/merge/resources/accounting/types/journal_line_tracking_category.py
index 122dffa0..e85273ab 100644
--- a/src/merge/resources/accounting/types/journal_line_tracking_category.py
+++ b/src/merge/resources/accounting/types/journal_line_tracking_category.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
JournalLineTrackingCategory = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/language_enum.py b/src/merge/resources/accounting/types/language_enum.py
new file mode 100644
index 00000000..8fccd0e7
--- /dev/null
+++ b/src/merge/resources/accounting/types/language_enum.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+LanguageEnum = typing.Union[typing.Literal["en", "de"], typing.Any]
diff --git a/src/merge/resources/accounting/types/link_token.py b/src/merge/resources/accounting/types/link_token.py
index 1c82d1ac..1d25dddb 100644
--- a/src/merge/resources/accounting/types/link_token.py
+++ b/src/merge/resources/accounting/types/link_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkToken(pydantic_v1.BaseModel):
+class LinkToken(UniversalBaseModel):
link_token: str
integration_name: typing.Optional[str]
magic_link_url: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/linked_account_status.py b/src/merge/resources/accounting/types/linked_account_status.py
index 60e21a98..2e27df33 100644
--- a/src/merge/resources/accounting/types/linked_account_status.py
+++ b/src/merge/resources/accounting/types/linked_account_status.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkedAccountStatus(pydantic_v1.BaseModel):
+class LinkedAccountStatus(UniversalBaseModel):
linked_account_status: str
can_make_request: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/meta_response.py b/src/merge/resources/accounting/types/meta_response.py
index debaf4ef..44e57fde 100644
--- a/src/merge/resources/accounting/types/meta_response.py
+++ b/src/merge/resources/accounting/types/meta_response.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .linked_account_status import LinkedAccountStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class MetaResponse(pydantic_v1.BaseModel):
- request_schema: typing.Dict[str, typing.Any]
- remote_field_classes: typing.Optional[typing.Dict[str, typing.Any]]
+class MetaResponse(UniversalBaseModel):
+ request_schema: typing.Dict[str, typing.Optional[typing.Any]]
+ remote_field_classes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
status: typing.Optional[LinkedAccountStatus]
has_conditional_params: bool
has_required_linked_account_params: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/method_enum.py b/src/merge/resources/accounting/types/method_enum.py
index c2418a83..e782e49c 100644
--- a/src/merge/resources/accounting/types/method_enum.py
+++ b/src/merge/resources/accounting/types/method_enum.py
@@ -1,51 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MethodEnum(str, enum.Enum):
- """
- - `GET` - GET
- - `OPTIONS` - OPTIONS
- - `HEAD` - HEAD
- - `POST` - POST
- - `PUT` - PUT
- - `PATCH` - PATCH
- - `DELETE` - DELETE
- """
-
- GET = "GET"
- OPTIONS = "OPTIONS"
- HEAD = "HEAD"
- POST = "POST"
- PUT = "PUT"
- PATCH = "PATCH"
- DELETE = "DELETE"
-
- def visit(
- self,
- get: typing.Callable[[], T_Result],
- options: typing.Callable[[], T_Result],
- head: typing.Callable[[], T_Result],
- post: typing.Callable[[], T_Result],
- put: typing.Callable[[], T_Result],
- patch: typing.Callable[[], T_Result],
- delete: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MethodEnum.GET:
- return get()
- if self is MethodEnum.OPTIONS:
- return options()
- if self is MethodEnum.HEAD:
- return head()
- if self is MethodEnum.POST:
- return post()
- if self is MethodEnum.PUT:
- return put()
- if self is MethodEnum.PATCH:
- return patch()
- if self is MethodEnum.DELETE:
- return delete()
+MethodEnum = typing.Union[typing.Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"], typing.Any]
diff --git a/src/merge/resources/accounting/types/model_operation.py b/src/merge/resources/accounting/types/model_operation.py
index 0f4429ec..2a12b6d5 100644
--- a/src/merge/resources/accounting/types/model_operation.py
+++ b/src/merge/resources/accounting/types/model_operation.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelOperation(pydantic_v1.BaseModel):
+class ModelOperation(UniversalBaseModel):
"""
# The ModelOperation Object
@@ -25,20 +24,11 @@ class ModelOperation(pydantic_v1.BaseModel):
required_post_parameters: typing.List[str]
supported_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/model_permission_deserializer.py b/src/merge/resources/accounting/types/model_permission_deserializer.py
index 5a6adf20..b6d813e4 100644
--- a/src/merge/resources/accounting/types/model_permission_deserializer.py
+++ b/src/merge/resources/accounting/types/model_permission_deserializer.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializer(pydantic_v1.BaseModel):
+class ModelPermissionDeserializer(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/model_permission_deserializer_request.py b/src/merge/resources/accounting/types/model_permission_deserializer_request.py
index 3f72b9ac..5885627b 100644
--- a/src/merge/resources/accounting/types/model_permission_deserializer_request.py
+++ b/src/merge/resources/accounting/types/model_permission_deserializer_request.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializerRequest(pydantic_v1.BaseModel):
+class ModelPermissionDeserializerRequest(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/multipart_form_field_request.py b/src/merge/resources/accounting/types/multipart_form_field_request.py
index 9c8ffb21..80099016 100644
--- a/src/merge/resources/accounting/types/multipart_form_field_request.py
+++ b/src/merge/resources/accounting/types/multipart_form_field_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class MultipartFormFieldRequest(pydantic_v1.BaseModel):
+class MultipartFormFieldRequest(UniversalBaseModel):
"""
# The MultipartFormField Object
@@ -21,17 +20,17 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
Create a `MultipartFormField` to define a multipart form entry.
"""
- name: str = pydantic_v1.Field()
+ name: str = pydantic.Field()
"""
The name of the form field
"""
- data: str = pydantic_v1.Field()
+ data: str = pydantic.Field()
"""
The data for the form field.
"""
- encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic_v1.Field()
+ encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic.Field()
"""
The encoding of the value of `data`. Defaults to `RAW` if not defined.
@@ -40,30 +39,21 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
- `GZIP_BASE64` - GZIP_BASE64
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The file name of the form field, if the field is for a file.
"""
- content_type: typing.Optional[str] = pydantic_v1.Field()
+ content_type: typing.Optional[str] = pydantic.Field()
"""
The MIME type of the file, if the field is for a file.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/multipart_form_field_request_encoding.py b/src/merge/resources/accounting/types/multipart_form_field_request_encoding.py
index c6513b6b..2b1db5ad 100644
--- a/src/merge/resources/accounting/types/multipart_form_field_request_encoding.py
+++ b/src/merge/resources/accounting/types/multipart_form_field_request_encoding.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .encoding_enum import EncodingEnum
MultipartFormFieldRequestEncoding = typing.Union[EncodingEnum, str]
diff --git a/src/merge/resources/accounting/types/paginated_account_details_and_actions_list.py b/src/merge/resources/accounting/types/paginated_account_details_and_actions_list.py
index 280100c4..a9128c76 100644
--- a/src/merge/resources/accounting/types/paginated_account_details_and_actions_list.py
+++ b/src/merge/resources/accounting/types/paginated_account_details_and_actions_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account_details_and_actions import AccountDetailsAndActions
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountDetailsAndActionsList(pydantic_v1.BaseModel):
+class PaginatedAccountDetailsAndActionsList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AccountDetailsAndActions]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_account_list.py b/src/merge/resources/accounting/types/paginated_account_list.py
index 21d2cda1..b49c8fba 100644
--- a/src/merge/resources/accounting/types/paginated_account_list.py
+++ b/src/merge/resources/accounting/types/paginated_account_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account import Account
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountList(pydantic_v1.BaseModel):
+class PaginatedAccountList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Account]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_accounting_attachment_list.py b/src/merge/resources/accounting/types/paginated_accounting_attachment_list.py
index f9baa36f..f021b301 100644
--- a/src/merge/resources/accounting/types/paginated_accounting_attachment_list.py
+++ b/src/merge/resources/accounting/types/paginated_accounting_attachment_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .accounting_attachment import AccountingAttachment
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountingAttachmentList(pydantic_v1.BaseModel):
+class PaginatedAccountingAttachmentList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AccountingAttachment]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_accounting_period_list.py b/src/merge/resources/accounting/types/paginated_accounting_period_list.py
index d7dcad2d..7bd057fe 100644
--- a/src/merge/resources/accounting/types/paginated_accounting_period_list.py
+++ b/src/merge/resources/accounting/types/paginated_accounting_period_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .accounting_period import AccountingPeriod
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountingPeriodList(pydantic_v1.BaseModel):
+class PaginatedAccountingPeriodList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AccountingPeriod]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_audit_log_event_list.py b/src/merge/resources/accounting/types/paginated_audit_log_event_list.py
index 1d4154d2..a50b7c75 100644
--- a/src/merge/resources/accounting/types/paginated_audit_log_event_list.py
+++ b/src/merge/resources/accounting/types/paginated_audit_log_event_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .audit_log_event import AuditLogEvent
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAuditLogEventList(pydantic_v1.BaseModel):
+class PaginatedAuditLogEventList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AuditLogEvent]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_balance_sheet_list.py b/src/merge/resources/accounting/types/paginated_balance_sheet_list.py
index 00716e0a..73be0c60 100644
--- a/src/merge/resources/accounting/types/paginated_balance_sheet_list.py
+++ b/src/merge/resources/accounting/types/paginated_balance_sheet_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .balance_sheet import BalanceSheet
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedBalanceSheetList(pydantic_v1.BaseModel):
+class PaginatedBalanceSheetList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[BalanceSheet]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_cash_flow_statement_list.py b/src/merge/resources/accounting/types/paginated_cash_flow_statement_list.py
index 2960e23e..e8429edf 100644
--- a/src/merge/resources/accounting/types/paginated_cash_flow_statement_list.py
+++ b/src/merge/resources/accounting/types/paginated_cash_flow_statement_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .cash_flow_statement import CashFlowStatement
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedCashFlowStatementList(pydantic_v1.BaseModel):
+class PaginatedCashFlowStatementList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[CashFlowStatement]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_company_info_list.py b/src/merge/resources/accounting/types/paginated_company_info_list.py
index 3f31d2c2..85bd7981 100644
--- a/src/merge/resources/accounting/types/paginated_company_info_list.py
+++ b/src/merge/resources/accounting/types/paginated_company_info_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .company_info import CompanyInfo
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedCompanyInfoList(pydantic_v1.BaseModel):
+class PaginatedCompanyInfoList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[CompanyInfo]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_contact_list.py b/src/merge/resources/accounting/types/paginated_contact_list.py
index dbe7c925..07c47744 100644
--- a/src/merge/resources/accounting/types/paginated_contact_list.py
+++ b/src/merge/resources/accounting/types/paginated_contact_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .contact import Contact
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedContactList(pydantic_v1.BaseModel):
+class PaginatedContactList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Contact]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_credit_note_list.py b/src/merge/resources/accounting/types/paginated_credit_note_list.py
index 5ea1ac05..9a766a24 100644
--- a/src/merge/resources/accounting/types/paginated_credit_note_list.py
+++ b/src/merge/resources/accounting/types/paginated_credit_note_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .credit_note import CreditNote
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedCreditNoteList(pydantic_v1.BaseModel):
+class PaginatedCreditNoteList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[CreditNote]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_expense_list.py b/src/merge/resources/accounting/types/paginated_expense_list.py
index aae906c4..79e692ea 100644
--- a/src/merge/resources/accounting/types/paginated_expense_list.py
+++ b/src/merge/resources/accounting/types/paginated_expense_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .expense import Expense
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedExpenseList(pydantic_v1.BaseModel):
+class PaginatedExpenseList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Expense]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_income_statement_list.py b/src/merge/resources/accounting/types/paginated_income_statement_list.py
index 15c59bb6..4f8695b9 100644
--- a/src/merge/resources/accounting/types/paginated_income_statement_list.py
+++ b/src/merge/resources/accounting/types/paginated_income_statement_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .income_statement import IncomeStatement
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedIncomeStatementList(pydantic_v1.BaseModel):
+class PaginatedIncomeStatementList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[IncomeStatement]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_invoice_list.py b/src/merge/resources/accounting/types/paginated_invoice_list.py
index 52457121..286cd31b 100644
--- a/src/merge/resources/accounting/types/paginated_invoice_list.py
+++ b/src/merge/resources/accounting/types/paginated_invoice_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .invoice import Invoice
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedInvoiceList(pydantic_v1.BaseModel):
+class PaginatedInvoiceList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Invoice]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_issue_list.py b/src/merge/resources/accounting/types/paginated_issue_list.py
index 1016e29a..12b866d9 100644
--- a/src/merge/resources/accounting/types/paginated_issue_list.py
+++ b/src/merge/resources/accounting/types/paginated_issue_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue import Issue
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedIssueList(pydantic_v1.BaseModel):
+class PaginatedIssueList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Issue]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_item_list.py b/src/merge/resources/accounting/types/paginated_item_list.py
index 5964764c..2569f862 100644
--- a/src/merge/resources/accounting/types/paginated_item_list.py
+++ b/src/merge/resources/accounting/types/paginated_item_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .item import Item
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedItemList(pydantic_v1.BaseModel):
+class PaginatedItemList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Item]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_journal_entry_list.py b/src/merge/resources/accounting/types/paginated_journal_entry_list.py
index 2e120953..3ec412e7 100644
--- a/src/merge/resources/accounting/types/paginated_journal_entry_list.py
+++ b/src/merge/resources/accounting/types/paginated_journal_entry_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .journal_entry import JournalEntry
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedJournalEntryList(pydantic_v1.BaseModel):
+class PaginatedJournalEntryList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[JournalEntry]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_payment_list.py b/src/merge/resources/accounting/types/paginated_payment_list.py
index 76fa6efc..75a06fd9 100644
--- a/src/merge/resources/accounting/types/paginated_payment_list.py
+++ b/src/merge/resources/accounting/types/paginated_payment_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .payment import Payment
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedPaymentList(pydantic_v1.BaseModel):
+class PaginatedPaymentList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Payment]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_purchase_order_list.py b/src/merge/resources/accounting/types/paginated_purchase_order_list.py
index fef2d120..d93d0326 100644
--- a/src/merge/resources/accounting/types/paginated_purchase_order_list.py
+++ b/src/merge/resources/accounting/types/paginated_purchase_order_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .purchase_order import PurchaseOrder
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedPurchaseOrderList(pydantic_v1.BaseModel):
+class PaginatedPurchaseOrderList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[PurchaseOrder]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_remote_field_class_list.py b/src/merge/resources/accounting/types/paginated_remote_field_class_list.py
new file mode 100644
index 00000000..1f51ab63
--- /dev/null
+++ b/src/merge/resources/accounting/types/paginated_remote_field_class_list.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 .remote_field_class import RemoteFieldClass
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class PaginatedRemoteFieldClassList(UniversalBaseModel):
+ next: typing.Optional[str]
+ previous: typing.Optional[str]
+ results: typing.Optional[typing.List[RemoteFieldClass]]
+
+ 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/merge/resources/accounting/types/paginated_sync_status_list.py b/src/merge/resources/accounting/types/paginated_sync_status_list.py
index 6c88197e..f59f2c9a 100644
--- a/src/merge/resources/accounting/types/paginated_sync_status_list.py
+++ b/src/merge/resources/accounting/types/paginated_sync_status_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .sync_status import SyncStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedSyncStatusList(pydantic_v1.BaseModel):
+class PaginatedSyncStatusList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[SyncStatus]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_tax_rate_list.py b/src/merge/resources/accounting/types/paginated_tax_rate_list.py
index 08dc426b..11921af9 100644
--- a/src/merge/resources/accounting/types/paginated_tax_rate_list.py
+++ b/src/merge/resources/accounting/types/paginated_tax_rate_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .tax_rate import TaxRate
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedTaxRateList(pydantic_v1.BaseModel):
+class PaginatedTaxRateList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[TaxRate]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_tracking_category_list.py b/src/merge/resources/accounting/types/paginated_tracking_category_list.py
index 67d4fbae..ab1cfdd2 100644
--- a/src/merge/resources/accounting/types/paginated_tracking_category_list.py
+++ b/src/merge/resources/accounting/types/paginated_tracking_category_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .tracking_category import TrackingCategory
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedTrackingCategoryList(pydantic_v1.BaseModel):
+class PaginatedTrackingCategoryList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[TrackingCategory]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_transaction_list.py b/src/merge/resources/accounting/types/paginated_transaction_list.py
index 4f73938b..9ff70ef0 100644
--- a/src/merge/resources/accounting/types/paginated_transaction_list.py
+++ b/src/merge/resources/accounting/types/paginated_transaction_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .transaction import Transaction
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedTransactionList(pydantic_v1.BaseModel):
+class PaginatedTransactionList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Transaction]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/paginated_vendor_credit_list.py b/src/merge/resources/accounting/types/paginated_vendor_credit_list.py
index 69fbf3ce..1861dc79 100644
--- a/src/merge/resources/accounting/types/paginated_vendor_credit_list.py
+++ b/src/merge/resources/accounting/types/paginated_vendor_credit_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .vendor_credit import VendorCredit
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedVendorCreditList(pydantic_v1.BaseModel):
+class PaginatedVendorCreditList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[VendorCredit]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/patched_payment_request.py b/src/merge/resources/accounting/types/patched_payment_request.py
index c44daa71..a0867c79 100644
--- a/src/merge/resources/accounting/types/patched_payment_request.py
+++ b/src/merge/resources/accounting/types/patched_payment_request.py
@@ -1,21 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .patched_payment_request_account import PatchedPaymentRequestAccount
-from .patched_payment_request_accounting_period import PatchedPaymentRequestAccountingPeriod
-from .patched_payment_request_applied_to_lines_item import PatchedPaymentRequestAppliedToLinesItem
-from .patched_payment_request_company import PatchedPaymentRequestCompany
+import datetime as dt
+import pydantic
from .patched_payment_request_contact import PatchedPaymentRequestContact
+from .patched_payment_request_account import PatchedPaymentRequestAccount
from .patched_payment_request_currency import PatchedPaymentRequestCurrency
-from .patched_payment_request_tracking_categories_item import PatchedPaymentRequestTrackingCategoriesItem
+from .patched_payment_request_company import PatchedPaymentRequestCompany
from .patched_payment_request_type import PatchedPaymentRequestType
+from .patched_payment_request_tracking_categories_item import PatchedPaymentRequestTrackingCategoriesItem
+from .patched_payment_request_accounting_period import PatchedPaymentRequestAccountingPeriod
+from .patched_payment_request_applied_to_lines_item import PatchedPaymentRequestAppliedToLinesItem
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PatchedPaymentRequest(pydantic_v1.BaseModel):
+class PatchedPaymentRequest(UniversalBaseModel):
"""
# The Payment Object
@@ -28,22 +29,22 @@ class PatchedPaymentRequest(pydantic_v1.BaseModel):
Fetch from the `GET Payment` endpoint and view an invoice's payment.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The payment's transaction date.
"""
- contact: typing.Optional[PatchedPaymentRequestContact] = pydantic_v1.Field()
+ contact: typing.Optional[PatchedPaymentRequestContact] = pydantic.Field()
"""
The supplier, or customer involved in the payment.
"""
- account: typing.Optional[PatchedPaymentRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[PatchedPaymentRequestAccount] = pydantic.Field()
"""
The supplierβs or customerβs account in which the payment is made.
"""
- currency: typing.Optional[PatchedPaymentRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[PatchedPaymentRequestCurrency] = pydantic.Field()
"""
The payment's currency.
@@ -355,22 +356,22 @@ class PatchedPaymentRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The payment's exchange rate.
"""
- company: typing.Optional[PatchedPaymentRequestCompany] = pydantic_v1.Field()
+ company: typing.Optional[PatchedPaymentRequestCompany] = pydantic.Field()
"""
The company the payment belongs to.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The total amount of money being paid to the supplier, or customer, after taxes.
"""
- type: typing.Optional[PatchedPaymentRequestType] = pydantic_v1.Field()
+ type: typing.Optional[PatchedPaymentRequestType] = pydantic.Field()
"""
The type of the invoice.
@@ -379,33 +380,25 @@ class PatchedPaymentRequest(pydantic_v1.BaseModel):
"""
tracking_categories: typing.Optional[typing.List[typing.Optional[PatchedPaymentRequestTrackingCategoriesItem]]]
- accounting_period: typing.Optional[PatchedPaymentRequestAccountingPeriod] = pydantic_v1.Field()
+ accounting_period: typing.Optional[PatchedPaymentRequestAccountingPeriod] = pydantic.Field()
"""
The accounting period that the Payment was generated in.
"""
- applied_to_lines: typing.Optional[typing.List[PatchedPaymentRequestAppliedToLinesItem]] = pydantic_v1.Field()
+ applied_to_lines: typing.Optional[typing.List[PatchedPaymentRequestAppliedToLinesItem]] = pydantic.Field()
"""
A list of βPayment Applied to Linesβ objects.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/patched_payment_request_account.py b/src/merge/resources/accounting/types/patched_payment_request_account.py
index f051a194..73514946 100644
--- a/src/merge/resources/accounting/types/patched_payment_request_account.py
+++ b/src/merge/resources/accounting/types/patched_payment_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
PatchedPaymentRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/patched_payment_request_accounting_period.py b/src/merge/resources/accounting/types/patched_payment_request_accounting_period.py
index bfd131d4..e88629d6 100644
--- a/src/merge/resources/accounting/types/patched_payment_request_accounting_period.py
+++ b/src/merge/resources/accounting/types/patched_payment_request_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
PatchedPaymentRequestAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/patched_payment_request_applied_to_lines_item.py b/src/merge/resources/accounting/types/patched_payment_request_applied_to_lines_item.py
index f613b16c..9f912492 100644
--- a/src/merge/resources/accounting/types/patched_payment_request_applied_to_lines_item.py
+++ b/src/merge/resources/accounting/types/patched_payment_request_applied_to_lines_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_line_item import PaymentLineItem
PatchedPaymentRequestAppliedToLinesItem = typing.Union[str, PaymentLineItem]
diff --git a/src/merge/resources/accounting/types/patched_payment_request_company.py b/src/merge/resources/accounting/types/patched_payment_request_company.py
index 46869369..f948b30e 100644
--- a/src/merge/resources/accounting/types/patched_payment_request_company.py
+++ b/src/merge/resources/accounting/types/patched_payment_request_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
PatchedPaymentRequestCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/patched_payment_request_contact.py b/src/merge/resources/accounting/types/patched_payment_request_contact.py
index 1478828a..7c69b0f0 100644
--- a/src/merge/resources/accounting/types/patched_payment_request_contact.py
+++ b/src/merge/resources/accounting/types/patched_payment_request_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
PatchedPaymentRequestContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/patched_payment_request_currency.py b/src/merge/resources/accounting/types/patched_payment_request_currency.py
index 70cbe104..d3d06c3d 100644
--- a/src/merge/resources/accounting/types/patched_payment_request_currency.py
+++ b/src/merge/resources/accounting/types/patched_payment_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
PatchedPaymentRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/patched_payment_request_tracking_categories_item.py b/src/merge/resources/accounting/types/patched_payment_request_tracking_categories_item.py
index 5ec2c8f9..9d411f90 100644
--- a/src/merge/resources/accounting/types/patched_payment_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/patched_payment_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
PatchedPaymentRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/patched_payment_request_type.py b/src/merge/resources/accounting/types/patched_payment_request_type.py
index 13dde772..416ffc53 100644
--- a/src/merge/resources/accounting/types/patched_payment_request_type.py
+++ b/src/merge/resources/accounting/types/patched_payment_request_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_type_enum import PaymentTypeEnum
PatchedPaymentRequestType = typing.Union[PaymentTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/payment.py b/src/merge/resources/accounting/types/payment.py
index b191449d..5881ec73 100644
--- a/src/merge/resources/accounting/types/payment.py
+++ b/src/merge/resources/accounting/types/payment.py
@@ -1,22 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .payment_account import PaymentAccount
-from .payment_accounting_period import PaymentAccountingPeriod
-from .payment_applied_to_lines_item import PaymentAppliedToLinesItem
-from .payment_company import PaymentCompany
+import pydantic
+import datetime as dt
from .payment_contact import PaymentContact
+from .payment_account import PaymentAccount
from .payment_currency import PaymentCurrency
-from .payment_tracking_categories_item import PaymentTrackingCategoriesItem
+from .payment_company import PaymentCompany
from .payment_type import PaymentType
+from .payment_tracking_categories_item import PaymentTrackingCategoriesItem
+from .payment_accounting_period import PaymentAccountingPeriod
+from .payment_applied_to_lines_item import PaymentAppliedToLinesItem
from .remote_data import RemoteData
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Payment(pydantic_v1.BaseModel):
+class Payment(UniversalBaseModel):
"""
# The Payment Object
@@ -30,37 +31,37 @@ class Payment(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The payment's transaction date.
"""
- contact: typing.Optional[PaymentContact] = pydantic_v1.Field()
+ contact: typing.Optional[PaymentContact] = pydantic.Field()
"""
The supplier, or customer involved in the payment.
"""
- account: typing.Optional[PaymentAccount] = pydantic_v1.Field()
+ account: typing.Optional[PaymentAccount] = pydantic.Field()
"""
The supplierβs or customerβs account in which the payment is made.
"""
- currency: typing.Optional[PaymentCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[PaymentCurrency] = pydantic.Field()
"""
The payment's currency.
@@ -372,22 +373,22 @@ class Payment(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The payment's exchange rate.
"""
- company: typing.Optional[PaymentCompany] = pydantic_v1.Field()
+ company: typing.Optional[PaymentCompany] = pydantic.Field()
"""
The company the payment belongs to.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The total amount of money being paid to the supplier, or customer, after taxes.
"""
- type: typing.Optional[PaymentType] = pydantic_v1.Field()
+ type: typing.Optional[PaymentType] = pydantic.Field()
"""
The type of the invoice.
@@ -396,43 +397,35 @@ class Payment(pydantic_v1.BaseModel):
"""
tracking_categories: typing.Optional[typing.List[typing.Optional[PaymentTrackingCategoriesItem]]]
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ accounting_period: typing.Optional[PaymentAccountingPeriod] = pydantic.Field()
"""
- When the third party's payment entry was updated.
+ The accounting period that the Payment was generated in.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ applied_to_lines: typing.Optional[typing.List[PaymentAppliedToLinesItem]] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ A list of βPayment Applied to Linesβ objects.
"""
- accounting_period: typing.Optional[PaymentAccountingPeriod] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
- The accounting period that the Payment was generated in.
+ When the third party's payment entry was updated.
"""
- applied_to_lines: typing.Optional[typing.List[PaymentAppliedToLinesItem]] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- A list of βPayment Applied to Linesβ objects.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/payment_account.py b/src/merge/resources/accounting/types/payment_account.py
index 1134aaab..b2bd909c 100644
--- a/src/merge/resources/accounting/types/payment_account.py
+++ b/src/merge/resources/accounting/types/payment_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
PaymentAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/payment_accounting_period.py b/src/merge/resources/accounting/types/payment_accounting_period.py
index f53d132d..096ba31f 100644
--- a/src/merge/resources/accounting/types/payment_accounting_period.py
+++ b/src/merge/resources/accounting/types/payment_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
PaymentAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/payment_applied_to_lines_item.py b/src/merge/resources/accounting/types/payment_applied_to_lines_item.py
index 664fde17..57fd5522 100644
--- a/src/merge/resources/accounting/types/payment_applied_to_lines_item.py
+++ b/src/merge/resources/accounting/types/payment_applied_to_lines_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_line_item import PaymentLineItem
PaymentAppliedToLinesItem = typing.Union[str, PaymentLineItem]
diff --git a/src/merge/resources/accounting/types/payment_company.py b/src/merge/resources/accounting/types/payment_company.py
index 8dfe2cc3..bdbc780c 100644
--- a/src/merge/resources/accounting/types/payment_company.py
+++ b/src/merge/resources/accounting/types/payment_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
PaymentCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/payment_contact.py b/src/merge/resources/accounting/types/payment_contact.py
index 70e0b700..51bb5114 100644
--- a/src/merge/resources/accounting/types/payment_contact.py
+++ b/src/merge/resources/accounting/types/payment_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
PaymentContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/payment_currency.py b/src/merge/resources/accounting/types/payment_currency.py
index 9c389fc9..ace835b5 100644
--- a/src/merge/resources/accounting/types/payment_currency.py
+++ b/src/merge/resources/accounting/types/payment_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
PaymentCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/payment_line_item.py b/src/merge/resources/accounting/types/payment_line_item.py
index 335d7235..33ecd3b6 100644
--- a/src/merge/resources/accounting/types/payment_line_item.py
+++ b/src/merge/resources/accounting/types/payment_line_item.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PaymentLineItem(pydantic_v1.BaseModel):
+class PaymentLineItem(UniversalBaseModel):
"""
# The PaymentLineItem Object
@@ -21,55 +21,46 @@ class PaymentLineItem(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- applied_amount: typing.Optional[str] = pydantic_v1.Field()
+ applied_amount: typing.Optional[str] = pydantic.Field()
"""
The amount being applied to the transaction.
"""
- applied_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ applied_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The date the payment portion is applied.
"""
- related_object_id: typing.Optional[str] = pydantic_v1.Field()
+ related_object_id: typing.Optional[str] = pydantic.Field()
"""
The Merge ID of the transaction the payment portion is being applied to.
"""
- related_object_type: typing.Optional[str] = pydantic_v1.Field()
+ related_object_type: typing.Optional[str] = pydantic.Field()
"""
The type of transaction the payment portion is being applied to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/payment_line_item_request.py b/src/merge/resources/accounting/types/payment_line_item_request.py
index 8a855ea5..af308cfd 100644
--- a/src/merge/resources/accounting/types/payment_line_item_request.py
+++ b/src/merge/resources/accounting/types/payment_line_item_request.py
@@ -1,13 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PaymentLineItemRequest(pydantic_v1.BaseModel):
+class PaymentLineItemRequest(UniversalBaseModel):
"""
# The PaymentLineItem Object
@@ -20,48 +21,40 @@ class PaymentLineItemRequest(pydantic_v1.BaseModel):
`Payment` will have a field called `applied-to-lines` which will be an array of `PaymentLineItemInternalMappingSerializer` objects that can either be a `Invoice`, `CreditNote`, or `JournalEntry`.
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- applied_amount: typing.Optional[str] = pydantic_v1.Field()
+ applied_amount: typing.Optional[str] = pydantic.Field()
"""
The amount being applied to the transaction.
"""
- applied_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ applied_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The date the payment portion is applied.
"""
- related_object_id: typing.Optional[str] = pydantic_v1.Field()
+ related_object_id: typing.Optional[str] = pydantic.Field()
"""
The Merge ID of the transaction the payment portion is being applied to.
"""
- related_object_type: typing.Optional[str] = pydantic_v1.Field()
+ related_object_type: typing.Optional[str] = pydantic.Field()
"""
The type of transaction the payment portion is being applied to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/payment_request.py b/src/merge/resources/accounting/types/payment_request.py
index ef524552..899844db 100644
--- a/src/merge/resources/accounting/types/payment_request.py
+++ b/src/merge/resources/accounting/types/payment_request.py
@@ -1,21 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .payment_request_account import PaymentRequestAccount
-from .payment_request_accounting_period import PaymentRequestAccountingPeriod
-from .payment_request_applied_to_lines_item import PaymentRequestAppliedToLinesItem
-from .payment_request_company import PaymentRequestCompany
+import datetime as dt
+import pydantic
from .payment_request_contact import PaymentRequestContact
+from .payment_request_account import PaymentRequestAccount
from .payment_request_currency import PaymentRequestCurrency
-from .payment_request_tracking_categories_item import PaymentRequestTrackingCategoriesItem
+from .payment_request_company import PaymentRequestCompany
from .payment_request_type import PaymentRequestType
+from .payment_request_tracking_categories_item import PaymentRequestTrackingCategoriesItem
+from .payment_request_accounting_period import PaymentRequestAccountingPeriod
+from .payment_request_applied_to_lines_item import PaymentRequestAppliedToLinesItem
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PaymentRequest(pydantic_v1.BaseModel):
+class PaymentRequest(UniversalBaseModel):
"""
# The Payment Object
@@ -28,22 +29,22 @@ class PaymentRequest(pydantic_v1.BaseModel):
Fetch from the `GET Payment` endpoint and view an invoice's payment.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The payment's transaction date.
"""
- contact: typing.Optional[PaymentRequestContact] = pydantic_v1.Field()
+ contact: typing.Optional[PaymentRequestContact] = pydantic.Field()
"""
The supplier, or customer involved in the payment.
"""
- account: typing.Optional[PaymentRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[PaymentRequestAccount] = pydantic.Field()
"""
The supplierβs or customerβs account in which the payment is made.
"""
- currency: typing.Optional[PaymentRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[PaymentRequestCurrency] = pydantic.Field()
"""
The payment's currency.
@@ -355,22 +356,22 @@ class PaymentRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The payment's exchange rate.
"""
- company: typing.Optional[PaymentRequestCompany] = pydantic_v1.Field()
+ company: typing.Optional[PaymentRequestCompany] = pydantic.Field()
"""
The company the payment belongs to.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The total amount of money being paid to the supplier, or customer, after taxes.
"""
- type: typing.Optional[PaymentRequestType] = pydantic_v1.Field()
+ type: typing.Optional[PaymentRequestType] = pydantic.Field()
"""
The type of the invoice.
@@ -379,33 +380,25 @@ class PaymentRequest(pydantic_v1.BaseModel):
"""
tracking_categories: typing.Optional[typing.List[typing.Optional[PaymentRequestTrackingCategoriesItem]]]
- accounting_period: typing.Optional[PaymentRequestAccountingPeriod] = pydantic_v1.Field()
+ accounting_period: typing.Optional[PaymentRequestAccountingPeriod] = pydantic.Field()
"""
The accounting period that the Payment was generated in.
"""
- applied_to_lines: typing.Optional[typing.List[PaymentRequestAppliedToLinesItem]] = pydantic_v1.Field()
+ applied_to_lines: typing.Optional[typing.List[PaymentRequestAppliedToLinesItem]] = pydantic.Field()
"""
A list of βPayment Applied to Linesβ objects.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/payment_request_account.py b/src/merge/resources/accounting/types/payment_request_account.py
index de594743..d2536068 100644
--- a/src/merge/resources/accounting/types/payment_request_account.py
+++ b/src/merge/resources/accounting/types/payment_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
PaymentRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/payment_request_accounting_period.py b/src/merge/resources/accounting/types/payment_request_accounting_period.py
index 893f6f8e..7d017f30 100644
--- a/src/merge/resources/accounting/types/payment_request_accounting_period.py
+++ b/src/merge/resources/accounting/types/payment_request_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
PaymentRequestAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/payment_request_applied_to_lines_item.py b/src/merge/resources/accounting/types/payment_request_applied_to_lines_item.py
index ecd42a0d..1bd63fa2 100644
--- a/src/merge/resources/accounting/types/payment_request_applied_to_lines_item.py
+++ b/src/merge/resources/accounting/types/payment_request_applied_to_lines_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_line_item_request import PaymentLineItemRequest
PaymentRequestAppliedToLinesItem = typing.Union[str, PaymentLineItemRequest]
diff --git a/src/merge/resources/accounting/types/payment_request_company.py b/src/merge/resources/accounting/types/payment_request_company.py
index 1ca40fe1..f3f9f841 100644
--- a/src/merge/resources/accounting/types/payment_request_company.py
+++ b/src/merge/resources/accounting/types/payment_request_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
PaymentRequestCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/payment_request_contact.py b/src/merge/resources/accounting/types/payment_request_contact.py
index 190cbc2f..d3d65a6b 100644
--- a/src/merge/resources/accounting/types/payment_request_contact.py
+++ b/src/merge/resources/accounting/types/payment_request_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
PaymentRequestContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/payment_request_currency.py b/src/merge/resources/accounting/types/payment_request_currency.py
index b09e9134..344b7659 100644
--- a/src/merge/resources/accounting/types/payment_request_currency.py
+++ b/src/merge/resources/accounting/types/payment_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
PaymentRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/payment_request_tracking_categories_item.py b/src/merge/resources/accounting/types/payment_request_tracking_categories_item.py
index a976f214..a467b183 100644
--- a/src/merge/resources/accounting/types/payment_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/payment_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
PaymentRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/payment_request_type.py b/src/merge/resources/accounting/types/payment_request_type.py
index cdf01583..72f37964 100644
--- a/src/merge/resources/accounting/types/payment_request_type.py
+++ b/src/merge/resources/accounting/types/payment_request_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_type_enum import PaymentTypeEnum
PaymentRequestType = typing.Union[PaymentTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/payment_response.py b/src/merge/resources/accounting/types/payment_response.py
index 6c1baf81..9eab5dc5 100644
--- a/src/merge/resources/accounting/types/payment_response.py
+++ b/src/merge/resources/accounting/types/payment_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .payment import Payment
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaymentResponse(pydantic_v1.BaseModel):
+class PaymentResponse(UniversalBaseModel):
model: Payment
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/payment_tracking_categories_item.py b/src/merge/resources/accounting/types/payment_tracking_categories_item.py
index cf8204c9..fe4ebb23 100644
--- a/src/merge/resources/accounting/types/payment_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/payment_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
PaymentTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/payment_type.py b/src/merge/resources/accounting/types/payment_type.py
index 95c1776f..b4be47d5 100644
--- a/src/merge/resources/accounting/types/payment_type.py
+++ b/src/merge/resources/accounting/types/payment_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payment_type_enum import PaymentTypeEnum
PaymentType = typing.Union[PaymentTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/payment_type_enum.py b/src/merge/resources/accounting/types/payment_type_enum.py
index 5768cb45..d8b37403 100644
--- a/src/merge/resources/accounting/types/payment_type_enum.py
+++ b/src/merge/resources/accounting/types/payment_type_enum.py
@@ -1,24 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PaymentTypeEnum(str, enum.Enum):
- """
- - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
- - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
- """
-
- ACCOUNTS_PAYABLE = "ACCOUNTS_PAYABLE"
- ACCOUNTS_RECEIVABLE = "ACCOUNTS_RECEIVABLE"
-
- def visit(
- self, accounts_payable: typing.Callable[[], T_Result], accounts_receivable: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is PaymentTypeEnum.ACCOUNTS_PAYABLE:
- return accounts_payable()
- if self is PaymentTypeEnum.ACCOUNTS_RECEIVABLE:
- return accounts_receivable()
+PaymentTypeEnum = typing.Union[typing.Literal["ACCOUNTS_PAYABLE", "ACCOUNTS_RECEIVABLE"], typing.Any]
diff --git a/src/merge/resources/accounting/types/posting_status_enum.py b/src/merge/resources/accounting/types/posting_status_enum.py
index 272eb555..9fe5d1a8 100644
--- a/src/merge/resources/accounting/types/posting_status_enum.py
+++ b/src/merge/resources/accounting/types/posting_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PostingStatusEnum(str, enum.Enum):
- """
- - `UNPOSTED` - UNPOSTED
- - `POSTED` - POSTED
- """
-
- UNPOSTED = "UNPOSTED"
- POSTED = "POSTED"
-
- def visit(self, unposted: typing.Callable[[], T_Result], posted: typing.Callable[[], T_Result]) -> T_Result:
- if self is PostingStatusEnum.UNPOSTED:
- return unposted()
- if self is PostingStatusEnum.POSTED:
- return posted()
+PostingStatusEnum = typing.Union[typing.Literal["UNPOSTED", "POSTED"], typing.Any]
diff --git a/src/merge/resources/accounting/types/purchase_order.py b/src/merge/resources/accounting/types/purchase_order.py
index 382e045c..644a7af7 100644
--- a/src/merge/resources/accounting/types/purchase_order.py
+++ b/src/merge/resources/accounting/types/purchase_order.py
@@ -1,22 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .purchase_order_accounting_period import PurchaseOrderAccountingPeriod
+import pydantic
+import datetime as dt
+from .purchase_order_status import PurchaseOrderStatus
+from .purchase_order_delivery_address import PurchaseOrderDeliveryAddress
+from .purchase_order_vendor import PurchaseOrderVendor
from .purchase_order_company import PurchaseOrderCompany
from .purchase_order_currency import PurchaseOrderCurrency
-from .purchase_order_delivery_address import PurchaseOrderDeliveryAddress
from .purchase_order_line_item import PurchaseOrderLineItem
-from .purchase_order_status import PurchaseOrderStatus
from .purchase_order_tracking_categories_item import PurchaseOrderTrackingCategoriesItem
-from .purchase_order_vendor import PurchaseOrderVendor
+from .purchase_order_accounting_period import PurchaseOrderAccountingPeriod
from .remote_data import RemoteData
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PurchaseOrder(pydantic_v1.BaseModel):
+class PurchaseOrder(UniversalBaseModel):
"""
# The PurchaseOrder Object
@@ -24,7 +25,7 @@ class PurchaseOrder(pydantic_v1.BaseModel):
A `PurchaseOrder` represents a request to purchase goods or services from a vendor. It outlines the details of the purchase, such as the items or services requested, quantities, prices, and delivery details.
- A `PurchaseOrder` is a crucial component of the procurement process, but does not typically result in any impact on the companyβs general ledger. The general ledger is typically only affected when the `PurchaseOrder` is fulfilled as an _Accounts Payable_ Invoice object.
+ A `PurchaseOrder` is a crucial component of the procurement process, but does not typically result in any impact on the companyβs general ledger. The general ledger is typically only affected when the `PurchaseOrder` is fulfilled as an _Accounts Payable_ `Invoice` object (also known as a Bill).
### Usage Example
@@ -32,22 +33,22 @@ class PurchaseOrder(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- status: typing.Optional[PurchaseOrderStatus] = pydantic_v1.Field()
+ status: typing.Optional[PurchaseOrderStatus] = pydantic.Field()
"""
The purchase order's status.
@@ -58,52 +59,52 @@ class PurchaseOrder(pydantic_v1.BaseModel):
- `DELETED` - DELETED
"""
- issue_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ issue_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The purchase order's issue date.
"""
- purchase_order_number: typing.Optional[str] = pydantic_v1.Field()
+ purchase_order_number: typing.Optional[str] = pydantic.Field()
"""
The human-readable number of the purchase order.
"""
- delivery_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ delivery_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The purchase order's delivery date.
"""
- delivery_address: typing.Optional[PurchaseOrderDeliveryAddress] = pydantic_v1.Field()
+ delivery_address: typing.Optional[PurchaseOrderDeliveryAddress] = pydantic.Field()
"""
The purchase order's delivery address.
"""
- customer: typing.Optional[str] = pydantic_v1.Field()
+ customer: typing.Optional[str] = pydantic.Field()
"""
The contact making the purchase order.
"""
- vendor: typing.Optional[PurchaseOrderVendor] = pydantic_v1.Field()
+ vendor: typing.Optional[PurchaseOrderVendor] = pydantic.Field()
"""
The party fulfilling the purchase order.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
A memo attached to the purchase order.
"""
- company: typing.Optional[PurchaseOrderCompany] = pydantic_v1.Field()
+ company: typing.Optional[PurchaseOrderCompany] = pydantic.Field()
"""
The company the purchase order belongs to.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The purchase order's total amount.
"""
- currency: typing.Optional[PurchaseOrderCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[PurchaseOrderCurrency] = pydantic.Field()
"""
The purchase order's currency.
@@ -415,50 +416,47 @@ class PurchaseOrder(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The purchase order's exchange rate.
"""
line_items: typing.Optional[typing.List[PurchaseOrderLineItem]]
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
tracking_categories: typing.Optional[typing.List[typing.Optional[PurchaseOrderTrackingCategoriesItem]]]
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ accounting_period: typing.Optional[PurchaseOrderAccountingPeriod] = pydantic.Field()
"""
- When the third party's purchase order note was created.
+ The accounting period that the PurchaseOrder was generated in.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
- When the third party's purchase order note was updated.
+ When the third party's purchase order note was created.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ When the third party's purchase order note was updated.
"""
- accounting_period: typing.Optional[PurchaseOrderAccountingPeriod] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- The accounting period that the PurchaseOrder was generated in.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/purchase_order_accounting_period.py b/src/merge/resources/accounting/types/purchase_order_accounting_period.py
index a2e3e1eb..67a55475 100644
--- a/src/merge/resources/accounting/types/purchase_order_accounting_period.py
+++ b/src/merge/resources/accounting/types/purchase_order_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
PurchaseOrderAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/purchase_order_company.py b/src/merge/resources/accounting/types/purchase_order_company.py
index ca2f0db9..ed112b86 100644
--- a/src/merge/resources/accounting/types/purchase_order_company.py
+++ b/src/merge/resources/accounting/types/purchase_order_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
PurchaseOrderCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/purchase_order_currency.py b/src/merge/resources/accounting/types/purchase_order_currency.py
index 9d409fe6..c003d6d8 100644
--- a/src/merge/resources/accounting/types/purchase_order_currency.py
+++ b/src/merge/resources/accounting/types/purchase_order_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
PurchaseOrderCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/purchase_order_delivery_address.py b/src/merge/resources/accounting/types/purchase_order_delivery_address.py
index 333453d3..bb7b0286 100644
--- a/src/merge/resources/accounting/types/purchase_order_delivery_address.py
+++ b/src/merge/resources/accounting/types/purchase_order_delivery_address.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .address import Address
PurchaseOrderDeliveryAddress = typing.Union[str, Address]
diff --git a/src/merge/resources/accounting/types/purchase_order_line_item.py b/src/merge/resources/accounting/types/purchase_order_line_item.py
index a37648fb..1ecedbf7 100644
--- a/src/merge/resources/accounting/types/purchase_order_line_item.py
+++ b/src/merge/resources/accounting/types/purchase_order_line_item.py
@@ -1,15 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .purchase_order_line_item_currency import PurchaseOrderLineItemCurrency
+import pydantic
+import datetime as dt
from .purchase_order_line_item_item import PurchaseOrderLineItemItem
+from .purchase_order_line_item_currency import PurchaseOrderLineItemCurrency
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PurchaseOrderLineItem(pydantic_v1.BaseModel):
+class PurchaseOrderLineItem(UniversalBaseModel):
"""
# The PurchaseOrderLineItem Object
@@ -23,63 +24,63 @@ class PurchaseOrderLineItem(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
A description of the good being purchased.
"""
- unit_price: typing.Optional[float] = pydantic_v1.Field()
+ unit_price: typing.Optional[float] = pydantic.Field()
"""
The line item's unit price.
"""
- quantity: typing.Optional[float] = pydantic_v1.Field()
+ quantity: typing.Optional[float] = pydantic.Field()
"""
The line item's quantity.
"""
item: typing.Optional[PurchaseOrderLineItemItem]
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's account.
"""
- tracking_category: typing.Optional[str] = pydantic_v1.Field()
+ tracking_category: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's associated tracking category.
"""
- tracking_categories: typing.List[str] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The purchase order line item's associated tracking categories.
"""
- tax_amount: typing.Optional[str] = pydantic_v1.Field()
+ tax_amount: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's tax amount.
"""
- total_line_amount: typing.Optional[str] = pydantic_v1.Field()
+ total_line_amount: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's total amount.
"""
- currency: typing.Optional[PurchaseOrderLineItemCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[PurchaseOrderLineItemCurrency] = pydantic.Field()
"""
The purchase order line item's currency.
@@ -391,35 +392,33 @@ class PurchaseOrderLineItem(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rate that applies to this line item.
+ """
+
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's exchange rate.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the purchase order line item belongs to.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ remote_fields: typing.Optional[typing.List[RemoteField]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/purchase_order_line_item_currency.py b/src/merge/resources/accounting/types/purchase_order_line_item_currency.py
index 530cce13..a13eeeb9 100644
--- a/src/merge/resources/accounting/types/purchase_order_line_item_currency.py
+++ b/src/merge/resources/accounting/types/purchase_order_line_item_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
PurchaseOrderLineItemCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/purchase_order_line_item_item.py b/src/merge/resources/accounting/types/purchase_order_line_item_item.py
index b1a2a0cf..375aaec6 100644
--- a/src/merge/resources/accounting/types/purchase_order_line_item_item.py
+++ b/src/merge/resources/accounting/types/purchase_order_line_item_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .item import Item
PurchaseOrderLineItemItem = typing.Union[str, Item]
diff --git a/src/merge/resources/accounting/types/purchase_order_line_item_request.py b/src/merge/resources/accounting/types/purchase_order_line_item_request.py
index 8196938b..b9e4fb5f 100644
--- a/src/merge/resources/accounting/types/purchase_order_line_item_request.py
+++ b/src/merge/resources/accounting/types/purchase_order_line_item_request.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .purchase_order_line_item_request_currency import PurchaseOrderLineItemRequestCurrency
+import pydantic
from .purchase_order_line_item_request_item import PurchaseOrderLineItemRequestItem
+from .purchase_order_line_item_request_currency import PurchaseOrderLineItemRequestCurrency
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PurchaseOrderLineItemRequest(pydantic_v1.BaseModel):
+class PurchaseOrderLineItemRequest(UniversalBaseModel):
"""
# The PurchaseOrderLineItem Object
@@ -22,53 +22,53 @@ class PurchaseOrderLineItemRequest(pydantic_v1.BaseModel):
Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders.
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
A description of the good being purchased.
"""
- unit_price: typing.Optional[float] = pydantic_v1.Field()
+ unit_price: typing.Optional[float] = pydantic.Field()
"""
The line item's unit price.
"""
- quantity: typing.Optional[float] = pydantic_v1.Field()
+ quantity: typing.Optional[float] = pydantic.Field()
"""
The line item's quantity.
"""
item: typing.Optional[PurchaseOrderLineItemRequestItem]
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's account.
"""
- tracking_category: typing.Optional[str] = pydantic_v1.Field()
+ tracking_category: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's associated tracking category.
"""
- tracking_categories: typing.List[str] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The purchase order line item's associated tracking categories.
"""
- tax_amount: typing.Optional[str] = pydantic_v1.Field()
+ tax_amount: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's tax amount.
"""
- total_line_amount: typing.Optional[str] = pydantic_v1.Field()
+ total_line_amount: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's total amount.
"""
- currency: typing.Optional[PurchaseOrderLineItemRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[PurchaseOrderLineItemRequestCurrency] = pydantic.Field()
"""
The purchase order line item's currency.
@@ -380,33 +380,30 @@ class PurchaseOrderLineItemRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rate that applies to this line item.
+ """
+
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The purchase order line item's exchange rate.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the purchase order line item belongs to.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/purchase_order_line_item_request_currency.py b/src/merge/resources/accounting/types/purchase_order_line_item_request_currency.py
index 3ca0d9da..e4580885 100644
--- a/src/merge/resources/accounting/types/purchase_order_line_item_request_currency.py
+++ b/src/merge/resources/accounting/types/purchase_order_line_item_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
PurchaseOrderLineItemRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/purchase_order_line_item_request_item.py b/src/merge/resources/accounting/types/purchase_order_line_item_request_item.py
index d3474562..2b762b27 100644
--- a/src/merge/resources/accounting/types/purchase_order_line_item_request_item.py
+++ b/src/merge/resources/accounting/types/purchase_order_line_item_request_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .item import Item
PurchaseOrderLineItemRequestItem = typing.Union[str, Item]
diff --git a/src/merge/resources/accounting/types/purchase_order_request.py b/src/merge/resources/accounting/types/purchase_order_request.py
index fb80e6e1..ea000418 100644
--- a/src/merge/resources/accounting/types/purchase_order_request.py
+++ b/src/merge/resources/accounting/types/purchase_order_request.py
@@ -1,20 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .purchase_order_line_item_request import PurchaseOrderLineItemRequest
+from .purchase_order_request_status import PurchaseOrderRequestStatus
+import pydantic
+import datetime as dt
+from .purchase_order_request_delivery_address import PurchaseOrderRequestDeliveryAddress
+from .purchase_order_request_vendor import PurchaseOrderRequestVendor
from .purchase_order_request_company import PurchaseOrderRequestCompany
from .purchase_order_request_currency import PurchaseOrderRequestCurrency
-from .purchase_order_request_delivery_address import PurchaseOrderRequestDeliveryAddress
-from .purchase_order_request_status import PurchaseOrderRequestStatus
from .purchase_order_request_tracking_categories_item import PurchaseOrderRequestTrackingCategoriesItem
-from .purchase_order_request_vendor import PurchaseOrderRequestVendor
+from .purchase_order_line_item_request import PurchaseOrderLineItemRequest
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PurchaseOrderRequest(pydantic_v1.BaseModel):
+class PurchaseOrderRequest(UniversalBaseModel):
"""
# The PurchaseOrder Object
@@ -27,7 +28,7 @@ class PurchaseOrderRequest(pydantic_v1.BaseModel):
Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders.
"""
- status: typing.Optional[PurchaseOrderRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[PurchaseOrderRequestStatus] = pydantic.Field()
"""
The purchase order's status.
@@ -38,47 +39,47 @@ class PurchaseOrderRequest(pydantic_v1.BaseModel):
- `DELETED` - DELETED
"""
- issue_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ issue_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The purchase order's issue date.
"""
- delivery_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ delivery_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The purchase order's delivery date.
"""
- delivery_address: typing.Optional[PurchaseOrderRequestDeliveryAddress] = pydantic_v1.Field()
+ delivery_address: typing.Optional[PurchaseOrderRequestDeliveryAddress] = pydantic.Field()
"""
The purchase order's delivery address.
"""
- customer: typing.Optional[str] = pydantic_v1.Field()
+ customer: typing.Optional[str] = pydantic.Field()
"""
The contact making the purchase order.
"""
- vendor: typing.Optional[PurchaseOrderRequestVendor] = pydantic_v1.Field()
+ vendor: typing.Optional[PurchaseOrderRequestVendor] = pydantic.Field()
"""
The party fulfilling the purchase order.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
A memo attached to the purchase order.
"""
- company: typing.Optional[PurchaseOrderRequestCompany] = pydantic_v1.Field()
+ company: typing.Optional[PurchaseOrderRequestCompany] = pydantic.Field()
"""
The company the purchase order belongs to.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The purchase order's total amount.
"""
- currency: typing.Optional[PurchaseOrderRequestCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[PurchaseOrderRequestCurrency] = pydantic.Field()
"""
The purchase order's currency.
@@ -390,30 +391,27 @@ class PurchaseOrderRequest(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The purchase order's exchange rate.
"""
tracking_categories: typing.Optional[typing.List[typing.Optional[PurchaseOrderRequestTrackingCategoriesItem]]]
line_items: typing.Optional[typing.List[PurchaseOrderLineItemRequest]]
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/purchase_order_request_company.py b/src/merge/resources/accounting/types/purchase_order_request_company.py
index 81167ef1..806d8eb8 100644
--- a/src/merge/resources/accounting/types/purchase_order_request_company.py
+++ b/src/merge/resources/accounting/types/purchase_order_request_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
PurchaseOrderRequestCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/purchase_order_request_currency.py b/src/merge/resources/accounting/types/purchase_order_request_currency.py
index 7adf0e6d..1d63af37 100644
--- a/src/merge/resources/accounting/types/purchase_order_request_currency.py
+++ b/src/merge/resources/accounting/types/purchase_order_request_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
PurchaseOrderRequestCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/purchase_order_request_delivery_address.py b/src/merge/resources/accounting/types/purchase_order_request_delivery_address.py
index 5387a269..cc517532 100644
--- a/src/merge/resources/accounting/types/purchase_order_request_delivery_address.py
+++ b/src/merge/resources/accounting/types/purchase_order_request_delivery_address.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .address import Address
PurchaseOrderRequestDeliveryAddress = typing.Union[str, Address]
diff --git a/src/merge/resources/accounting/types/purchase_order_request_status.py b/src/merge/resources/accounting/types/purchase_order_request_status.py
index de4651e4..00cc7774 100644
--- a/src/merge/resources/accounting/types/purchase_order_request_status.py
+++ b/src/merge/resources/accounting/types/purchase_order_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .purchase_order_status_enum import PurchaseOrderStatusEnum
PurchaseOrderRequestStatus = typing.Union[PurchaseOrderStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/purchase_order_request_tracking_categories_item.py b/src/merge/resources/accounting/types/purchase_order_request_tracking_categories_item.py
index e0006bb6..8d413521 100644
--- a/src/merge/resources/accounting/types/purchase_order_request_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/purchase_order_request_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
PurchaseOrderRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/purchase_order_request_vendor.py b/src/merge/resources/accounting/types/purchase_order_request_vendor.py
index 7d0dae2b..7f2a6fa9 100644
--- a/src/merge/resources/accounting/types/purchase_order_request_vendor.py
+++ b/src/merge/resources/accounting/types/purchase_order_request_vendor.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
PurchaseOrderRequestVendor = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/purchase_order_response.py b/src/merge/resources/accounting/types/purchase_order_response.py
index 675e925b..113388ac 100644
--- a/src/merge/resources/accounting/types/purchase_order_response.py
+++ b/src/merge/resources/accounting/types/purchase_order_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .purchase_order import PurchaseOrder
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PurchaseOrderResponse(pydantic_v1.BaseModel):
+class PurchaseOrderResponse(UniversalBaseModel):
model: PurchaseOrder
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/purchase_order_status.py b/src/merge/resources/accounting/types/purchase_order_status.py
index 0c1c6944..d0d8f5d5 100644
--- a/src/merge/resources/accounting/types/purchase_order_status.py
+++ b/src/merge/resources/accounting/types/purchase_order_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .purchase_order_status_enum import PurchaseOrderStatusEnum
PurchaseOrderStatus = typing.Union[PurchaseOrderStatusEnum, str]
diff --git a/src/merge/resources/accounting/types/purchase_order_status_enum.py b/src/merge/resources/accounting/types/purchase_order_status_enum.py
index 00eabc12..bf0ef3e3 100644
--- a/src/merge/resources/accounting/types/purchase_order_status_enum.py
+++ b/src/merge/resources/accounting/types/purchase_order_status_enum.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PurchaseOrderStatusEnum(str, enum.Enum):
- """
- - `DRAFT` - DRAFT
- - `SUBMITTED` - SUBMITTED
- - `AUTHORIZED` - AUTHORIZED
- - `BILLED` - BILLED
- - `DELETED` - DELETED
- """
-
- DRAFT = "DRAFT"
- SUBMITTED = "SUBMITTED"
- AUTHORIZED = "AUTHORIZED"
- BILLED = "BILLED"
- DELETED = "DELETED"
-
- def visit(
- self,
- draft: typing.Callable[[], T_Result],
- submitted: typing.Callable[[], T_Result],
- authorized: typing.Callable[[], T_Result],
- billed: typing.Callable[[], T_Result],
- deleted: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PurchaseOrderStatusEnum.DRAFT:
- return draft()
- if self is PurchaseOrderStatusEnum.SUBMITTED:
- return submitted()
- if self is PurchaseOrderStatusEnum.AUTHORIZED:
- return authorized()
- if self is PurchaseOrderStatusEnum.BILLED:
- return billed()
- if self is PurchaseOrderStatusEnum.DELETED:
- return deleted()
+PurchaseOrderStatusEnum = typing.Union[
+ typing.Literal["DRAFT", "SUBMITTED", "AUTHORIZED", "BILLED", "DELETED"], typing.Any
+]
diff --git a/src/merge/resources/accounting/types/purchase_order_tracking_categories_item.py b/src/merge/resources/accounting/types/purchase_order_tracking_categories_item.py
index 6662ceaa..53a46064 100644
--- a/src/merge/resources/accounting/types/purchase_order_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/purchase_order_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
PurchaseOrderTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/purchase_order_vendor.py b/src/merge/resources/accounting/types/purchase_order_vendor.py
index a0ead21e..9b42765a 100644
--- a/src/merge/resources/accounting/types/purchase_order_vendor.py
+++ b/src/merge/resources/accounting/types/purchase_order_vendor.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
PurchaseOrderVendor = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/remote_data.py b/src/merge/resources/accounting/types/remote_data.py
index 098f551b..27c2a5f2 100644
--- a/src/merge/resources/accounting/types/remote_data.py
+++ b/src/merge/resources/accounting/types/remote_data.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteData(pydantic_v1.BaseModel):
+class RemoteData(UniversalBaseModel):
path: str
- data: typing.Optional[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ data: typing.Optional[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/remote_endpoint_info.py b/src/merge/resources/accounting/types/remote_endpoint_info.py
index da6037bc..454688d0 100644
--- a/src/merge/resources/accounting/types/remote_endpoint_info.py
+++ b/src/merge/resources/accounting/types/remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteEndpointInfo(pydantic_v1.BaseModel):
+class RemoteEndpointInfo(UniversalBaseModel):
method: str
url_path: str
- field_traversal_path: typing.List[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_traversal_path: typing.List[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/remote_field.py b/src/merge/resources/accounting/types/remote_field.py
new file mode 100644
index 00000000..0bd420e0
--- /dev/null
+++ b/src/merge/resources/accounting/types/remote_field.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ....core.pydantic_utilities import UniversalBaseModel
+from .remote_field_class import RemoteFieldClass
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class RemoteField(UniversalBaseModel):
+ remote_field_class: RemoteFieldClass
+ value: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+
+ 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/merge/resources/accounting/types/remote_field_api.py b/src/merge/resources/accounting/types/remote_field_api.py
index c2a16698..18f2421d 100644
--- a/src/merge/resources/accounting/types/remote_field_api.py
+++ b/src/merge/resources/accounting/types/remote_field_api.py
@@ -1,39 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .advanced_metadata import AdvancedMetadata
+import pydantic
from .remote_endpoint_info import RemoteEndpointInfo
+from .advanced_metadata import AdvancedMetadata
from .remote_field_api_coverage import RemoteFieldApiCoverage
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteFieldApi(pydantic_v1.BaseModel):
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+class RemoteFieldApi(UniversalBaseModel):
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_key_name: str
remote_endpoint_info: RemoteEndpointInfo
- example_values: typing.List[typing.Any]
+ example_values: typing.Optional[typing.List[typing.Optional[typing.Any]]]
advanced_metadata: typing.Optional[AdvancedMetadata]
coverage: typing.Optional[RemoteFieldApiCoverage]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/remote_field_api_response.py b/src/merge/resources/accounting/types/remote_field_api_response.py
index de14b900..717b1a4b 100644
--- a/src/merge/resources/accounting/types/remote_field_api_response.py
+++ b/src/merge/resources/accounting/types/remote_field_api_response.py
@@ -1,54 +1,41 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_field_api import RemoteFieldApi
-
-
-class RemoteFieldApiResponse(pydantic_v1.BaseModel):
- account: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Account")
- accounting_attachment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(
- alias="AccountingAttachment"
- )
- balance_sheet: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="BalanceSheet")
- cash_flow_statement: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="CashFlowStatement")
- company_info: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="CompanyInfo")
- contact: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Contact")
- income_statement: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="IncomeStatement")
- credit_note: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="CreditNote")
- item: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Item")
- purchase_order: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="PurchaseOrder")
- tracking_category: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="TrackingCategory")
- journal_entry: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="JournalEntry")
- tax_rate: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="TaxRate")
- invoice: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Invoice")
- payment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Payment")
- expense: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Expense")
- vendor_credit: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="VendorCredit")
- transaction: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Transaction")
- general_ledger_transaction: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class RemoteFieldApiResponse(UniversalBaseModel):
+ account: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Account")
+ accounting_attachment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="AccountingAttachment")
+ balance_sheet: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="BalanceSheet")
+ cash_flow_statement: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="CashFlowStatement")
+ company_info: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="CompanyInfo")
+ contact: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Contact")
+ income_statement: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="IncomeStatement")
+ credit_note: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="CreditNote")
+ item: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Item")
+ purchase_order: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="PurchaseOrder")
+ tracking_category: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="TrackingCategory")
+ journal_entry: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="JournalEntry")
+ tax_rate: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="TaxRate")
+ invoice: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Invoice")
+ payment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Payment")
+ expense: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Expense")
+ vendor_credit: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="VendorCredit")
+ transaction: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Transaction")
+ accounting_period: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="AccountingPeriod")
+ general_ledger_transaction: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(
alias="GeneralLedgerTransaction"
)
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/remote_field_class.py b/src/merge/resources/accounting/types/remote_field_class.py
new file mode 100644
index 00000000..c58fe23f
--- /dev/null
+++ b/src/merge/resources/accounting/types/remote_field_class.py
@@ -0,0 +1,31 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ....core.pydantic_utilities import UniversalBaseModel
+import typing
+from .field_type_enum import FieldTypeEnum
+from .field_format_enum import FieldFormatEnum
+from .item_schema import ItemSchema
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class RemoteFieldClass(UniversalBaseModel):
+ id: typing.Optional[str]
+ display_name: typing.Optional[str]
+ remote_key_name: typing.Optional[str]
+ description: typing.Optional[str]
+ is_custom: typing.Optional[bool]
+ is_required: typing.Optional[bool]
+ field_type: typing.Optional[FieldTypeEnum]
+ field_format: typing.Optional[FieldFormatEnum]
+ field_choices: typing.Optional[typing.List[str]]
+ item_schema: typing.Optional[ItemSchema]
+
+ 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/merge/resources/accounting/types/remote_field_request.py b/src/merge/resources/accounting/types/remote_field_request.py
new file mode 100644
index 00000000..bf5b7ce4
--- /dev/null
+++ b/src/merge/resources/accounting/types/remote_field_request.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ....core.pydantic_utilities import UniversalBaseModel
+from .remote_field_request_remote_field_class import RemoteFieldRequestRemoteFieldClass
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class RemoteFieldRequest(UniversalBaseModel):
+ remote_field_class: RemoteFieldRequestRemoteFieldClass
+ value: typing.Optional[typing.Optional[typing.Any]]
+
+ 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/merge/resources/accounting/types/remote_field_request_remote_field_class.py b/src/merge/resources/accounting/types/remote_field_request_remote_field_class.py
new file mode 100644
index 00000000..ebf56780
--- /dev/null
+++ b/src/merge/resources/accounting/types/remote_field_request_remote_field_class.py
@@ -0,0 +1,6 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from .remote_field_class import RemoteFieldClass
+
+RemoteFieldRequestRemoteFieldClass = typing.Union[str, RemoteFieldClass]
diff --git a/src/merge/resources/accounting/types/remote_key.py b/src/merge/resources/accounting/types/remote_key.py
index e0bec368..7a61c212 100644
--- a/src/merge/resources/accounting/types/remote_key.py
+++ b/src/merge/resources/accounting/types/remote_key.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteKey(pydantic_v1.BaseModel):
+class RemoteKey(UniversalBaseModel):
"""
# The RemoteKey Object
@@ -23,20 +22,11 @@ class RemoteKey(pydantic_v1.BaseModel):
name: str
key: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/remote_response.py b/src/merge/resources/accounting/types/remote_response.py
index f39951ee..e2d1620d 100644
--- a/src/merge/resources/accounting/types/remote_response.py
+++ b/src/merge/resources/accounting/types/remote_response.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .response_type_enum import ResponseTypeEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteResponse(pydantic_v1.BaseModel):
+class RemoteResponse(UniversalBaseModel):
"""
# The RemoteResponse Object
@@ -24,25 +23,16 @@ class RemoteResponse(pydantic_v1.BaseModel):
method: str
path: str
status: int
- response: typing.Any
- response_headers: typing.Optional[typing.Dict[str, typing.Any]]
+ response: typing.Optional[typing.Any]
+ response_headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
response_type: typing.Optional[ResponseTypeEnum]
- headers: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/report_item.py b/src/merge/resources/accounting/types/report_item.py
index 350ff55d..5c280d2f 100644
--- a/src/merge/resources/accounting/types/report_item.py
+++ b/src/merge/resources/accounting/types/report_item.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ReportItem(pydantic_v1.BaseModel):
+class ReportItem(UniversalBaseModel):
"""
# The ReportItem Object
@@ -20,51 +20,42 @@ class ReportItem(pydantic_v1.BaseModel):
Fetch from the `GET BalanceSheet` endpoint and view the balance sheet's report items.
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The report item's name.
"""
- value: typing.Optional[float] = pydantic_v1.Field()
+ value: typing.Optional[float] = pydantic.Field()
"""
The report item's value.
"""
- sub_items: typing.Optional[typing.List[typing.Dict[str, typing.Any]]]
- company: typing.Optional[str] = pydantic_v1.Field()
+ sub_items: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]]
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the report item belongs to.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/request_format_enum.py b/src/merge/resources/accounting/types/request_format_enum.py
index bf445b71..dc284f25 100644
--- a/src/merge/resources/accounting/types/request_format_enum.py
+++ b/src/merge/resources/accounting/types/request_format_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RequestFormatEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `XML` - XML
- - `MULTIPART` - MULTIPART
- """
-
- JSON = "JSON"
- XML = "XML"
- MULTIPART = "MULTIPART"
-
- def visit(
- self,
- json: typing.Callable[[], T_Result],
- xml: typing.Callable[[], T_Result],
- multipart: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RequestFormatEnum.JSON:
- return json()
- if self is RequestFormatEnum.XML:
- return xml()
- if self is RequestFormatEnum.MULTIPART:
- return multipart()
+RequestFormatEnum = typing.Union[typing.Literal["JSON", "XML", "MULTIPART"], typing.Any]
diff --git a/src/merge/resources/accounting/types/response_type_enum.py b/src/merge/resources/accounting/types/response_type_enum.py
index 4b44d47d..7e4d5d30 100644
--- a/src/merge/resources/accounting/types/response_type_enum.py
+++ b/src/merge/resources/accounting/types/response_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ResponseTypeEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `BASE64_GZIP` - BASE64_GZIP
- """
-
- JSON = "JSON"
- BASE_64_GZIP = "BASE64_GZIP"
-
- def visit(self, json: typing.Callable[[], T_Result], base_64_gzip: typing.Callable[[], T_Result]) -> T_Result:
- if self is ResponseTypeEnum.JSON:
- return json()
- if self is ResponseTypeEnum.BASE_64_GZIP:
- return base_64_gzip()
+ResponseTypeEnum = typing.Union[typing.Literal["JSON", "BASE64_GZIP"], typing.Any]
diff --git a/src/merge/resources/accounting/types/role_enum.py b/src/merge/resources/accounting/types/role_enum.py
index 05e09112..65066251 100644
--- a/src/merge/resources/accounting/types/role_enum.py
+++ b/src/merge/resources/accounting/types/role_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RoleEnum(str, enum.Enum):
- """
- - `ADMIN` - ADMIN
- - `DEVELOPER` - DEVELOPER
- - `MEMBER` - MEMBER
- - `API` - API
- - `SYSTEM` - SYSTEM
- - `MERGE_TEAM` - MERGE_TEAM
- """
-
- ADMIN = "ADMIN"
- DEVELOPER = "DEVELOPER"
- MEMBER = "MEMBER"
- API = "API"
- SYSTEM = "SYSTEM"
- MERGE_TEAM = "MERGE_TEAM"
-
- def visit(
- self,
- admin: typing.Callable[[], T_Result],
- developer: typing.Callable[[], T_Result],
- member: typing.Callable[[], T_Result],
- api: typing.Callable[[], T_Result],
- system: typing.Callable[[], T_Result],
- merge_team: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RoleEnum.ADMIN:
- return admin()
- if self is RoleEnum.DEVELOPER:
- return developer()
- if self is RoleEnum.MEMBER:
- return member()
- if self is RoleEnum.API:
- return api()
- if self is RoleEnum.SYSTEM:
- return system()
- if self is RoleEnum.MERGE_TEAM:
- return merge_team()
+RoleEnum = typing.Union[typing.Literal["ADMIN", "DEVELOPER", "MEMBER", "API", "SYSTEM", "MERGE_TEAM"], typing.Any]
diff --git a/src/merge/resources/accounting/types/selective_sync_configurations_usage_enum.py b/src/merge/resources/accounting/types/selective_sync_configurations_usage_enum.py
index 4de6df94..baa6f2bd 100644
--- a/src/merge/resources/accounting/types/selective_sync_configurations_usage_enum.py
+++ b/src/merge/resources/accounting/types/selective_sync_configurations_usage_enum.py
@@ -1,24 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SelectiveSyncConfigurationsUsageEnum(str, enum.Enum):
- """
- - `IN_NEXT_SYNC` - IN_NEXT_SYNC
- - `IN_LAST_SYNC` - IN_LAST_SYNC
- """
-
- IN_NEXT_SYNC = "IN_NEXT_SYNC"
- IN_LAST_SYNC = "IN_LAST_SYNC"
-
- def visit(
- self, in_next_sync: typing.Callable[[], T_Result], in_last_sync: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is SelectiveSyncConfigurationsUsageEnum.IN_NEXT_SYNC:
- return in_next_sync()
- if self is SelectiveSyncConfigurationsUsageEnum.IN_LAST_SYNC:
- return in_last_sync()
+SelectiveSyncConfigurationsUsageEnum = typing.Union[typing.Literal["IN_NEXT_SYNC", "IN_LAST_SYNC"], typing.Any]
diff --git a/src/merge/resources/accounting/types/status_7_d_1_enum.py b/src/merge/resources/accounting/types/status_7_d_1_enum.py
index 6a876750..5d444dba 100644
--- a/src/merge/resources/accounting/types/status_7_d_1_enum.py
+++ b/src/merge/resources/accounting/types/status_7_d_1_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class Status7D1Enum(str, enum.Enum):
- """
- - `ACTIVE` - ACTIVE
- - `ARCHIVED` - ARCHIVED
- """
-
- ACTIVE = "ACTIVE"
- ARCHIVED = "ARCHIVED"
-
- def visit(self, active: typing.Callable[[], T_Result], archived: typing.Callable[[], T_Result]) -> T_Result:
- if self is Status7D1Enum.ACTIVE:
- return active()
- if self is Status7D1Enum.ARCHIVED:
- return archived()
+Status7D1Enum = typing.Union[typing.Literal["ACTIVE", "ARCHIVED"], typing.Any]
diff --git a/src/merge/resources/accounting/types/sync_status.py b/src/merge/resources/accounting/types/sync_status.py
index c6b7cbc4..f9a62229 100644
--- a/src/merge/resources/accounting/types/sync_status.py
+++ b/src/merge/resources/accounting/types/sync_status.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+import datetime as dt
from .sync_status_status_enum import SyncStatusStatusEnum
+from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class SyncStatus(pydantic_v1.BaseModel):
+class SyncStatus(UniversalBaseModel):
"""
# The SyncStatus Object
@@ -30,20 +30,11 @@ class SyncStatus(pydantic_v1.BaseModel):
is_initial_sync: bool
selective_sync_configurations_usage: typing.Optional[SelectiveSyncConfigurationsUsageEnum]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/sync_status_status_enum.py b/src/merge/resources/accounting/types/sync_status_status_enum.py
index e21e3285..92814990 100644
--- a/src/merge/resources/accounting/types/sync_status_status_enum.py
+++ b/src/merge/resources/accounting/types/sync_status_status_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SyncStatusStatusEnum(str, enum.Enum):
- """
- - `SYNCING` - SYNCING
- - `DONE` - DONE
- - `FAILED` - FAILED
- - `DISABLED` - DISABLED
- - `PAUSED` - PAUSED
- - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED
- """
-
- SYNCING = "SYNCING"
- DONE = "DONE"
- FAILED = "FAILED"
- DISABLED = "DISABLED"
- PAUSED = "PAUSED"
- PARTIALLY_SYNCED = "PARTIALLY_SYNCED"
-
- def visit(
- self,
- syncing: typing.Callable[[], T_Result],
- done: typing.Callable[[], T_Result],
- failed: typing.Callable[[], T_Result],
- disabled: typing.Callable[[], T_Result],
- paused: typing.Callable[[], T_Result],
- partially_synced: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SyncStatusStatusEnum.SYNCING:
- return syncing()
- if self is SyncStatusStatusEnum.DONE:
- return done()
- if self is SyncStatusStatusEnum.FAILED:
- return failed()
- if self is SyncStatusStatusEnum.DISABLED:
- return disabled()
- if self is SyncStatusStatusEnum.PAUSED:
- return paused()
- if self is SyncStatusStatusEnum.PARTIALLY_SYNCED:
- return partially_synced()
+SyncStatusStatusEnum = typing.Union[
+ typing.Literal["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"], typing.Any
+]
diff --git a/src/merge/resources/accounting/types/tax_component.py b/src/merge/resources/accounting/types/tax_component.py
new file mode 100644
index 00000000..ff4824c4
--- /dev/null
+++ b/src/merge/resources/accounting/types/tax_component.py
@@ -0,0 +1,75 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ....core.pydantic_utilities import UniversalBaseModel
+import typing
+import pydantic
+import datetime as dt
+from .tax_component_component_type import TaxComponentComponentType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class TaxComponent(UniversalBaseModel):
+ """
+ # The TaxRate Object
+
+ ### Description
+
+ The `TaxComponent` object is used to represent any sub-taxes that make up the `TaxRate`.
+
+ ### Usage Example
+
+ Fetch from the `LIST TaxRates` endpoint and view tax components relevant to a tax rate.
+ """
+
+ id: typing.Optional[str]
+ remote_id: typing.Optional[str] = pydantic.Field()
+ """
+ The third-party API ID of the matching object.
+ """
+
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
+ """
+ The datetime that this object was created by Merge.
+ """
+
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
+ """
+ The datetime that this object was modified by Merge.
+ """
+
+ name: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rateβs name.
+ """
+
+ rate: typing.Optional[str] = pydantic.Field()
+ """
+ The tax componentβs rate.
+ """
+
+ is_compound: typing.Optional[bool] = pydantic.Field()
+ """
+ Returns True if the tax component is compound, False if not.
+ """
+
+ component_type: typing.Optional[TaxComponentComponentType] = pydantic.Field()
+ """
+ Returns PURCHASE if the tax component corresponds to a purchase tax or SALES if the tax component corresponds to a sales tax.
+
+ - `SALES` - SALES
+ - `PURCHASE` - PURCHASE
+ """
+
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
+ """
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+ """
+
+ 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/merge/resources/accounting/types/tax_component_component_type.py b/src/merge/resources/accounting/types/tax_component_component_type.py
new file mode 100644
index 00000000..78e70dd4
--- /dev/null
+++ b/src/merge/resources/accounting/types/tax_component_component_type.py
@@ -0,0 +1,6 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from .component_type_enum import ComponentTypeEnum
+
+TaxComponentComponentType = typing.Union[ComponentTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/tax_rate.py b/src/merge/resources/accounting/types/tax_rate.py
index 5a9425d3..71093e28 100644
--- a/src/merge/resources/accounting/types/tax_rate.py
+++ b/src/merge/resources/accounting/types/tax_rate.py
@@ -1,15 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
+import pydantic
+import datetime as dt
from .tax_rate_company import TaxRateCompany
+from .tax_rate_status import TaxRateStatus
+from .tax_rate_tax_components_item import TaxRateTaxComponentsItem
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class TaxRate(pydantic_v1.BaseModel):
+class TaxRate(UniversalBaseModel):
"""
# The TaxRate Object
@@ -23,63 +25,82 @@ class TaxRate(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[TaxRateCompany] = pydantic.Field()
+ """
+ The subsidiary that the tax rate belongs to (in the case of multi-entity systems).
+ """
+
+ code: typing.Optional[str] = pydantic.Field()
+ """
+ The tax code associated with this tax rate or group of tax rates from the third-party platform.
+ """
+
+ name: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rateβs name.
+ """
+
+ description: typing.Optional[str] = pydantic.Field()
"""
The tax rate's description.
"""
- total_tax_rate: typing.Optional[float] = pydantic_v1.Field()
+ status: typing.Optional[TaxRateStatus] = pydantic.Field()
+ """
+ The tax rateβs status - `ACTIVE` if an active tax rate, `ARCHIVED` if not active.
+
+ - `ACTIVE` - ACTIVE
+ - `ARCHIVED` - ARCHIVED
+ """
+
+ country: typing.Optional[str] = pydantic.Field()
+ """
+ The country the tax rate is associated with.
+ """
+
+ total_tax_rate: typing.Optional[float] = pydantic.Field()
"""
The taxβs total tax rate - sum of the tax components (not compounded).
"""
- effective_tax_rate: typing.Optional[float] = pydantic_v1.Field()
+ effective_tax_rate: typing.Optional[float] = pydantic.Field()
"""
The tax rateβs effective tax rate - total amount of tax with compounding.
"""
- company: typing.Optional[TaxRateCompany] = pydantic_v1.Field()
+ tax_components: typing.Optional[typing.List[TaxRateTaxComponentsItem]] = pydantic.Field()
"""
- The subsidiary that the tax rate belongs to (in the case of multi-entity systems).
+ The related tax components of the tax rate.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/tax_rate_company.py b/src/merge/resources/accounting/types/tax_rate_company.py
index a3b6cd68..4d5bbe3a 100644
--- a/src/merge/resources/accounting/types/tax_rate_company.py
+++ b/src/merge/resources/accounting/types/tax_rate_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
TaxRateCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/tax_rate_status.py b/src/merge/resources/accounting/types/tax_rate_status.py
new file mode 100644
index 00000000..8ef48af4
--- /dev/null
+++ b/src/merge/resources/accounting/types/tax_rate_status.py
@@ -0,0 +1,6 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from .status_7_d_1_enum import Status7D1Enum
+
+TaxRateStatus = typing.Union[Status7D1Enum, str]
diff --git a/src/merge/resources/accounting/types/tax_rate_tax_components_item.py b/src/merge/resources/accounting/types/tax_rate_tax_components_item.py
new file mode 100644
index 00000000..a58f87a2
--- /dev/null
+++ b/src/merge/resources/accounting/types/tax_rate_tax_components_item.py
@@ -0,0 +1,6 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from .tax_component import TaxComponent
+
+TaxRateTaxComponentsItem = typing.Union[str, TaxComponent]
diff --git a/src/merge/resources/accounting/types/tracking_category.py b/src/merge/resources/accounting/types/tracking_category.py
index f80fb38c..fbd1274b 100644
--- a/src/merge/resources/accounting/types/tracking_category.py
+++ b/src/merge/resources/accounting/types/tracking_category.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
+import pydantic
+import datetime as dt
+from .tracking_category_status import TrackingCategoryStatus
from .tracking_category_category_type import TrackingCategoryCategoryType
from .tracking_category_company import TrackingCategoryCompany
-from .tracking_category_status import TrackingCategoryStatus
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class TrackingCategory(pydantic_v1.BaseModel):
+class TrackingCategory(UniversalBaseModel):
"""
# The TrackingCategory Object
@@ -25,27 +25,27 @@ class TrackingCategory(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The tracking category's name.
"""
- status: typing.Optional[TrackingCategoryStatus] = pydantic_v1.Field()
+ status: typing.Optional[TrackingCategoryStatus] = pydantic.Field()
"""
The tracking category's status.
@@ -53,7 +53,7 @@ class TrackingCategory(pydantic_v1.BaseModel):
- `ARCHIVED` - ARCHIVED
"""
- category_type: typing.Optional[TrackingCategoryCategoryType] = pydantic_v1.Field()
+ category_type: typing.Optional[TrackingCategoryCategoryType] = pydantic.Field()
"""
The tracking categoryβs type.
@@ -61,38 +61,29 @@ class TrackingCategory(pydantic_v1.BaseModel):
- `DEPARTMENT` - DEPARTMENT
"""
- parent_category: typing.Optional[str] = pydantic_v1.Field()
+ parent_category: typing.Optional[str] = pydantic.Field()
"""
ID of the parent tracking category.
"""
- company: typing.Optional[TrackingCategoryCompany] = pydantic_v1.Field()
+ company: typing.Optional[TrackingCategoryCompany] = pydantic.Field()
"""
The company the tracking category belongs to.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/tracking_category_category_type.py b/src/merge/resources/accounting/types/tracking_category_category_type.py
index 4b5d1999..2cc4f4b2 100644
--- a/src/merge/resources/accounting/types/tracking_category_category_type.py
+++ b/src/merge/resources/accounting/types/tracking_category_category_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .category_type_enum import CategoryTypeEnum
TrackingCategoryCategoryType = typing.Union[CategoryTypeEnum, str]
diff --git a/src/merge/resources/accounting/types/tracking_category_company.py b/src/merge/resources/accounting/types/tracking_category_company.py
index 47be6b88..fa6fc565 100644
--- a/src/merge/resources/accounting/types/tracking_category_company.py
+++ b/src/merge/resources/accounting/types/tracking_category_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
TrackingCategoryCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/tracking_category_status.py b/src/merge/resources/accounting/types/tracking_category_status.py
index 8d0328ef..97662aca 100644
--- a/src/merge/resources/accounting/types/tracking_category_status.py
+++ b/src/merge/resources/accounting/types/tracking_category_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .status_7_d_1_enum import Status7D1Enum
TrackingCategoryStatus = typing.Union[Status7D1Enum, str]
diff --git a/src/merge/resources/accounting/types/transaction.py b/src/merge/resources/accounting/types/transaction.py
index 1c5920ff..a0a1dd51 100644
--- a/src/merge/resources/accounting/types/transaction.py
+++ b/src/merge/resources/accounting/types/transaction.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
+import pydantic
+import datetime as dt
from .transaction_account import TransactionAccount
-from .transaction_accounting_period import TransactionAccountingPeriod
from .transaction_contact import TransactionContact
from .transaction_currency import TransactionCurrency
-from .transaction_line_item import TransactionLineItem
from .transaction_tracking_categories_item import TransactionTrackingCategoriesItem
+from .transaction_line_item import TransactionLineItem
+from .transaction_accounting_period import TransactionAccountingPeriod
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Transaction(pydantic_v1.BaseModel):
+class Transaction(UniversalBaseModel):
"""
# The Transaction Object
@@ -36,52 +36,57 @@ class Transaction(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- transaction_type: typing.Optional[str] = pydantic_v1.Field()
+ transaction_type: typing.Optional[str] = pydantic.Field()
"""
The type of transaction, which can by any transaction object not already included in Mergeβs common model.
"""
- number: typing.Optional[str] = pydantic_v1.Field()
+ number: typing.Optional[str] = pydantic.Field()
"""
The transaction's number used for identifying purposes.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The date upon which the transaction occurred.
"""
- account: typing.Optional[TransactionAccount] = pydantic_v1.Field()
+ account: typing.Optional[TransactionAccount] = pydantic.Field()
"""
The transaction's account.
"""
- contact: typing.Optional[TransactionContact] = pydantic_v1.Field()
+ contact: typing.Optional[TransactionContact] = pydantic.Field()
"""
The contact to whom the transaction relates to.
"""
- total_amount: typing.Optional[str] = pydantic_v1.Field()
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
+ total_amount: typing.Optional[str] = pydantic.Field()
"""
The total amount being paid after taxes.
"""
- currency: typing.Optional[TransactionCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[TransactionCurrency] = pydantic.Field()
"""
The transaction's currency.
@@ -393,45 +398,36 @@ class Transaction(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The transaction's exchange rate.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the transaction belongs to.
"""
tracking_categories: typing.Optional[typing.List[typing.Optional[TransactionTrackingCategoriesItem]]]
line_items: typing.Optional[typing.List[TransactionLineItem]]
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- accounting_period: typing.Optional[TransactionAccountingPeriod] = pydantic_v1.Field()
+ accounting_period: typing.Optional[TransactionAccountingPeriod] = pydantic.Field()
"""
The accounting period that the Transaction was generated in.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/transaction_account.py b/src/merge/resources/accounting/types/transaction_account.py
index d52c48e8..d7b92b4f 100644
--- a/src/merge/resources/accounting/types/transaction_account.py
+++ b/src/merge/resources/accounting/types/transaction_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
TransactionAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/transaction_accounting_period.py b/src/merge/resources/accounting/types/transaction_accounting_period.py
index 7de59158..be08a3ef 100644
--- a/src/merge/resources/accounting/types/transaction_accounting_period.py
+++ b/src/merge/resources/accounting/types/transaction_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
TransactionAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/transaction_contact.py b/src/merge/resources/accounting/types/transaction_contact.py
index 424ca153..24039839 100644
--- a/src/merge/resources/accounting/types/transaction_contact.py
+++ b/src/merge/resources/accounting/types/transaction_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
TransactionContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/transaction_currency.py b/src/merge/resources/accounting/types/transaction_currency.py
index 588cdeb4..4dfea141 100644
--- a/src/merge/resources/accounting/types/transaction_currency.py
+++ b/src/merge/resources/accounting/types/transaction_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
TransactionCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/transaction_line_item.py b/src/merge/resources/accounting/types/transaction_line_item.py
index cc90a3e7..a0833561 100644
--- a/src/merge/resources/accounting/types/transaction_line_item.py
+++ b/src/merge/resources/accounting/types/transaction_line_item.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .transaction_line_item_currency import TransactionLineItemCurrency
+import pydantic
+import datetime as dt
from .transaction_line_item_item import TransactionLineItemItem
+from .transaction_line_item_currency import TransactionLineItemCurrency
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class TransactionLineItem(pydantic_v1.BaseModel):
+class TransactionLineItem(UniversalBaseModel):
"""
# The TransactionLineItem Object
@@ -23,59 +23,63 @@ class TransactionLineItem(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- memo: typing.Optional[str] = pydantic_v1.Field()
+ memo: typing.Optional[str] = pydantic.Field()
"""
An internal note used by the business to clarify purpose of the transaction.
"""
- unit_price: typing.Optional[str] = pydantic_v1.Field()
+ unit_price: typing.Optional[str] = pydantic.Field()
"""
The line item's unit price.
"""
- quantity: typing.Optional[str] = pydantic_v1.Field()
+ quantity: typing.Optional[str] = pydantic.Field()
"""
The line item's quantity.
"""
item: typing.Optional[TransactionLineItemItem]
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The line item's account.
"""
- tracking_category: typing.Optional[str] = pydantic_v1.Field()
+ tracking_category: typing.Optional[str] = pydantic.Field()
"""
The line's associated tracking category.
"""
- tracking_categories: typing.List[str] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
- The line's associated tracking categories.
+ The transaction line item's associated tracking categories.
"""
- total_line_amount: typing.Optional[str] = pydantic_v1.Field()
+ total_line_amount: typing.Optional[str] = pydantic.Field()
"""
The line item's total.
"""
- tax_rate: typing.Optional[str]
- currency: typing.Optional[TransactionLineItemCurrency] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
+ """
+ The tax rate that applies to this line item.
+ """
+
+ currency: typing.Optional[TransactionLineItemCurrency] = pydantic.Field()
"""
The line item's currency.
@@ -387,35 +391,26 @@ class TransactionLineItem(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The line item's exchange rate.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the line belongs to.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/transaction_line_item_currency.py b/src/merge/resources/accounting/types/transaction_line_item_currency.py
index 4d1cbffc..2f23120f 100644
--- a/src/merge/resources/accounting/types/transaction_line_item_currency.py
+++ b/src/merge/resources/accounting/types/transaction_line_item_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
TransactionLineItemCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/transaction_line_item_item.py b/src/merge/resources/accounting/types/transaction_line_item_item.py
index 88c664ff..ec961596 100644
--- a/src/merge/resources/accounting/types/transaction_line_item_item.py
+++ b/src/merge/resources/accounting/types/transaction_line_item_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .item import Item
TransactionLineItemItem = typing.Union[str, Item]
diff --git a/src/merge/resources/accounting/types/transaction_tracking_categories_item.py b/src/merge/resources/accounting/types/transaction_tracking_categories_item.py
index 08b778c9..aa33c1f9 100644
--- a/src/merge/resources/accounting/types/transaction_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/transaction_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
TransactionTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/validation_problem_source.py b/src/merge/resources/accounting/types/validation_problem_source.py
index fde15b40..d9a4a8fe 100644
--- a/src/merge/resources/accounting/types/validation_problem_source.py
+++ b/src/merge/resources/accounting/types/validation_problem_source.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ValidationProblemSource(pydantic_v1.BaseModel):
+class ValidationProblemSource(UniversalBaseModel):
pointer: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/vendor_credit.py b/src/merge/resources/accounting/types/vendor_credit.py
index 2b8d01b7..b630ba79 100644
--- a/src/merge/resources/accounting/types/vendor_credit.py
+++ b/src/merge/resources/accounting/types/vendor_credit.py
@@ -1,26 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
-from .vendor_credit_accounting_period import VendorCreditAccountingPeriod
-from .vendor_credit_company import VendorCreditCompany
+import pydantic
+import datetime as dt
+from .vendor_credit_vendor import VendorCreditVendor
from .vendor_credit_currency import VendorCreditCurrency
+from .vendor_credit_company import VendorCreditCompany
from .vendor_credit_line import VendorCreditLine
from .vendor_credit_tracking_categories_item import VendorCreditTrackingCategoriesItem
-from .vendor_credit_vendor import VendorCreditVendor
+from .vendor_credit_accounting_period import VendorCreditAccountingPeriod
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class VendorCredit(pydantic_v1.BaseModel):
+class VendorCredit(UniversalBaseModel):
"""
# The VendorCredit Object
### Description
- A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to _Accounts Payable_ Invoices to decrease the overall amount of the Invoice.
+ A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`.
### Usage Example
@@ -28,42 +28,42 @@ class VendorCredit(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- number: typing.Optional[str] = pydantic_v1.Field()
+ number: typing.Optional[str] = pydantic.Field()
"""
The vendor credit's number.
"""
- transaction_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ transaction_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The vendor credit's transaction date.
"""
- vendor: typing.Optional[VendorCreditVendor] = pydantic_v1.Field()
+ vendor: typing.Optional[VendorCreditVendor] = pydantic.Field()
"""
The vendor that owes the gift or refund.
"""
- total_amount: typing.Optional[float] = pydantic_v1.Field()
+ total_amount: typing.Optional[float] = pydantic.Field()
"""
The vendor credit's total amount.
"""
- currency: typing.Optional[VendorCreditCurrency] = pydantic_v1.Field()
+ currency: typing.Optional[VendorCreditCurrency] = pydantic.Field()
"""
The vendor credit's currency.
@@ -375,45 +375,41 @@ class VendorCredit(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
The vendor credit's exchange rate.
"""
- company: typing.Optional[VendorCreditCompany] = pydantic_v1.Field()
+ inclusive_of_tax: typing.Optional[bool] = pydantic.Field()
+ """
+ If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive.
+ """
+
+ company: typing.Optional[VendorCreditCompany] = pydantic.Field()
"""
The company the vendor credit belongs to.
"""
lines: typing.Optional[typing.List[VendorCreditLine]]
tracking_categories: typing.Optional[typing.List[typing.Optional[VendorCreditTrackingCategoriesItem]]]
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
"""
- accounting_period: typing.Optional[VendorCreditAccountingPeriod] = pydantic_v1.Field()
+ accounting_period: typing.Optional[VendorCreditAccountingPeriod] = pydantic.Field()
"""
The accounting period that the VendorCredit was generated in.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/vendor_credit_accounting_period.py b/src/merge/resources/accounting/types/vendor_credit_accounting_period.py
index 3ae13422..645425f0 100644
--- a/src/merge/resources/accounting/types/vendor_credit_accounting_period.py
+++ b/src/merge/resources/accounting/types/vendor_credit_accounting_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .accounting_period import AccountingPeriod
VendorCreditAccountingPeriod = typing.Union[str, AccountingPeriod]
diff --git a/src/merge/resources/accounting/types/vendor_credit_company.py b/src/merge/resources/accounting/types/vendor_credit_company.py
index 1219a0c8..f83d7fb8 100644
--- a/src/merge/resources/accounting/types/vendor_credit_company.py
+++ b/src/merge/resources/accounting/types/vendor_credit_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company_info import CompanyInfo
VendorCreditCompany = typing.Union[str, CompanyInfo]
diff --git a/src/merge/resources/accounting/types/vendor_credit_currency.py b/src/merge/resources/accounting/types/vendor_credit_currency.py
index cdddeb79..17a733d1 100644
--- a/src/merge/resources/accounting/types/vendor_credit_currency.py
+++ b/src/merge/resources/accounting/types/vendor_credit_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .currency_enum import CurrencyEnum
VendorCreditCurrency = typing.Union[CurrencyEnum, str]
diff --git a/src/merge/resources/accounting/types/vendor_credit_line.py b/src/merge/resources/accounting/types/vendor_credit_line.py
index d425a8a1..86b5be9f 100644
--- a/src/merge/resources/accounting/types/vendor_credit_line.py
+++ b/src/merge/resources/accounting/types/vendor_credit_line.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .vendor_credit_line_account import VendorCreditLineAccount
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class VendorCreditLine(pydantic_v1.BaseModel):
+class VendorCreditLine(UniversalBaseModel):
"""
# The VendorCreditLine Object
@@ -22,75 +22,71 @@ class VendorCreditLine(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- net_amount: typing.Optional[float] = pydantic_v1.Field()
+ net_amount: typing.Optional[float] = pydantic.Field()
"""
The full value of the credit.
"""
- tracking_category: typing.Optional[str] = pydantic_v1.Field()
+ tracking_category: typing.Optional[str] = pydantic.Field()
"""
The line's associated tracking category.
"""
- tracking_categories: typing.List[str] = pydantic_v1.Field()
+ tracking_categories: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
- The line's associated tracking categories.
+ The vendor credit line item's associated tracking categories.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The line's description.
"""
- account: typing.Optional[VendorCreditLineAccount] = pydantic_v1.Field()
+ account: typing.Optional[VendorCreditLineAccount] = pydantic.Field()
"""
The line's account.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The company the line belongs to.
"""
- exchange_rate: typing.Optional[str] = pydantic_v1.Field()
+ tax_rate: typing.Optional[str] = pydantic.Field()
"""
- The vendor credit line item's exchange rate.
+ The tax rate that applies to this line item.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ exchange_rate: typing.Optional[str] = pydantic.Field()
"""
- Indicates whether or not this object has been deleted in the third party platform.
+ The vendor credit line item's exchange rate.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
+ """
+ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
+ """
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/vendor_credit_line_account.py b/src/merge/resources/accounting/types/vendor_credit_line_account.py
index 22aad4ac..3698e92e 100644
--- a/src/merge/resources/accounting/types/vendor_credit_line_account.py
+++ b/src/merge/resources/accounting/types/vendor_credit_line_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
VendorCreditLineAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/accounting/types/vendor_credit_tracking_categories_item.py b/src/merge/resources/accounting/types/vendor_credit_tracking_categories_item.py
index f43c7cbe..04668f2f 100644
--- a/src/merge/resources/accounting/types/vendor_credit_tracking_categories_item.py
+++ b/src/merge/resources/accounting/types/vendor_credit_tracking_categories_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .tracking_category import TrackingCategory
VendorCreditTrackingCategoriesItem = typing.Union[str, TrackingCategory]
diff --git a/src/merge/resources/accounting/types/vendor_credit_vendor.py b/src/merge/resources/accounting/types/vendor_credit_vendor.py
index 6e8012e7..fc5d0729 100644
--- a/src/merge/resources/accounting/types/vendor_credit_vendor.py
+++ b/src/merge/resources/accounting/types/vendor_credit_vendor.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
VendorCreditVendor = typing.Union[str, Contact]
diff --git a/src/merge/resources/accounting/types/warning_validation_problem.py b/src/merge/resources/accounting/types/warning_validation_problem.py
index 6baf9600..d508bb6d 100644
--- a/src/merge/resources/accounting/types/warning_validation_problem.py
+++ b/src/merge/resources/accounting/types/warning_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class WarningValidationProblem(pydantic_v1.BaseModel):
+class WarningValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/accounting/types/webhook_receiver.py b/src/merge/resources/accounting/types/webhook_receiver.py
index 0544f256..e8cd17aa 100644
--- a/src/merge/resources/accounting/types/webhook_receiver.py
+++ b/src/merge/resources/accounting/types/webhook_receiver.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class WebhookReceiver(pydantic_v1.BaseModel):
+class WebhookReceiver(UniversalBaseModel):
event: str
is_active: bool
key: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/client.py b/src/merge/resources/ats/client.py
index 280e6eff..b8789340 100644
--- a/src/merge/resources/ats/client.py
+++ b/src/merge/resources/ats/client.py
@@ -1,45 +1,77 @@
# This file was auto-generated by Fern from our API Definition.
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .resources.account_details.client import AccountDetailsClient, AsyncAccountDetailsClient
-from .resources.account_token.client import AccountTokenClient, AsyncAccountTokenClient
-from .resources.activities.client import ActivitiesClient, AsyncActivitiesClient
-from .resources.applications.client import ApplicationsClient, AsyncApplicationsClient
-from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from ...core.client_wrapper import SyncClientWrapper
+from .resources.account_details.client import AccountDetailsClient
+from .resources.account_token.client import AccountTokenClient
+from .resources.activities.client import ActivitiesClient
+from .resources.applications.client import ApplicationsClient
from .resources.async_passthrough.client import (
AsyncPassthroughClient as resources_ats_resources_async_passthrough_client_AsyncPassthroughClient,
)
-from .resources.attachments.client import AsyncAttachmentsClient, AttachmentsClient
-from .resources.audit_trail.client import AsyncAuditTrailClient, AuditTrailClient
-from .resources.available_actions.client import AsyncAvailableActionsClient, AvailableActionsClient
-from .resources.candidates.client import AsyncCandidatesClient, CandidatesClient
-from .resources.delete_account.client import AsyncDeleteAccountClient, DeleteAccountClient
-from .resources.departments.client import AsyncDepartmentsClient, DepartmentsClient
-from .resources.eeocs.client import AsyncEeocsClient, EeocsClient
-from .resources.field_mapping.client import AsyncFieldMappingClient, FieldMappingClient
-from .resources.force_resync.client import AsyncForceResyncClient, ForceResyncClient
-from .resources.generate_key.client import AsyncGenerateKeyClient, GenerateKeyClient
-from .resources.interviews.client import AsyncInterviewsClient, InterviewsClient
-from .resources.issues.client import AsyncIssuesClient, IssuesClient
-from .resources.job_interview_stages.client import AsyncJobInterviewStagesClient, JobInterviewStagesClient
-from .resources.job_postings.client import AsyncJobPostingsClient, JobPostingsClient
-from .resources.jobs.client import AsyncJobsClient, JobsClient
-from .resources.link_token.client import AsyncLinkTokenClient, LinkTokenClient
-from .resources.linked_accounts.client import AsyncLinkedAccountsClient, LinkedAccountsClient
-from .resources.offers.client import AsyncOffersClient, OffersClient
-from .resources.offices.client import AsyncOfficesClient, OfficesClient
+from .resources.attachments.client import AttachmentsClient
+from .resources.audit_trail.client import AuditTrailClient
+from .resources.available_actions.client import AvailableActionsClient
+from .resources.candidates.client import CandidatesClient
+from .resources.scopes.client import ScopesClient
+from .resources.delete_account.client import DeleteAccountClient
+from .resources.departments.client import DepartmentsClient
+from .resources.eeocs.client import EeocsClient
+from .resources.field_mapping.client import FieldMappingClient
+from .resources.generate_key.client import GenerateKeyClient
+from .resources.interviews.client import InterviewsClient
+from .resources.issues.client import IssuesClient
+from .resources.job_interview_stages.client import JobInterviewStagesClient
+from .resources.job_postings.client import JobPostingsClient
+from .resources.jobs.client import JobsClient
+from .resources.link_token.client import LinkTokenClient
+from .resources.linked_accounts.client import LinkedAccountsClient
+from .resources.offers.client import OffersClient
+from .resources.offices.client import OfficesClient
+from .resources.passthrough.client import PassthroughClient
+from .resources.regenerate_key.client import RegenerateKeyClient
+from .resources.reject_reasons.client import RejectReasonsClient
+from .resources.scorecards.client import ScorecardsClient
+from .resources.sync_status.client import SyncStatusClient
+from .resources.force_resync.client import ForceResyncClient
+from .resources.tags.client import TagsClient
+from .resources.users.client import UsersClient
+from .resources.webhook_receivers.client import WebhookReceiversClient
+from ...core.client_wrapper import AsyncClientWrapper
+from .resources.account_details.client import AsyncAccountDetailsClient
+from .resources.account_token.client import AsyncAccountTokenClient
+from .resources.activities.client import AsyncActivitiesClient
+from .resources.applications.client import AsyncApplicationsClient
+from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from .resources.attachments.client import AsyncAttachmentsClient
+from .resources.audit_trail.client import AsyncAuditTrailClient
+from .resources.available_actions.client import AsyncAvailableActionsClient
+from .resources.candidates.client import AsyncCandidatesClient
+from .resources.scopes.client import AsyncScopesClient
+from .resources.delete_account.client import AsyncDeleteAccountClient
+from .resources.departments.client import AsyncDepartmentsClient
+from .resources.eeocs.client import AsyncEeocsClient
+from .resources.field_mapping.client import AsyncFieldMappingClient
+from .resources.generate_key.client import AsyncGenerateKeyClient
+from .resources.interviews.client import AsyncInterviewsClient
+from .resources.issues.client import AsyncIssuesClient
+from .resources.job_interview_stages.client import AsyncJobInterviewStagesClient
+from .resources.job_postings.client import AsyncJobPostingsClient
+from .resources.jobs.client import AsyncJobsClient
+from .resources.link_token.client import AsyncLinkTokenClient
+from .resources.linked_accounts.client import AsyncLinkedAccountsClient
+from .resources.offers.client import AsyncOffersClient
+from .resources.offices.client import AsyncOfficesClient
from .resources.passthrough.client import (
AsyncPassthroughClient as resources_ats_resources_passthrough_client_AsyncPassthroughClient,
)
-from .resources.passthrough.client import PassthroughClient
-from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient
-from .resources.reject_reasons.client import AsyncRejectReasonsClient, RejectReasonsClient
-from .resources.scopes.client import AsyncScopesClient, ScopesClient
-from .resources.scorecards.client import AsyncScorecardsClient, ScorecardsClient
-from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient
-from .resources.tags.client import AsyncTagsClient, TagsClient
-from .resources.users.client import AsyncUsersClient, UsersClient
-from .resources.webhook_receivers.client import AsyncWebhookReceiversClient, WebhookReceiversClient
+from .resources.regenerate_key.client import AsyncRegenerateKeyClient
+from .resources.reject_reasons.client import AsyncRejectReasonsClient
+from .resources.scorecards.client import AsyncScorecardsClient
+from .resources.sync_status.client import AsyncSyncStatusClient
+from .resources.force_resync.client import AsyncForceResyncClient
+from .resources.tags.client import AsyncTagsClient
+from .resources.users.client import AsyncUsersClient
+from .resources.webhook_receivers.client import AsyncWebhookReceiversClient
class AtsClient:
diff --git a/src/merge/resources/ats/resources/account_details/client.py b/src/merge/resources/ats/resources/account_details/client.py
index 314ddb78..58a70a20 100644
--- a/src/merge/resources/ats/resources/account_details/client.py
+++ b/src/merge/resources/ats/resources/account_details/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_details import AccountDetails
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountDetailsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.ats.account_details.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/account-details", method="GET", request_options=request_options
+ "ats/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.account_details.retrieve()
+
+
+ async def main() -> None:
+ await client.ats.account_details.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/account-details", method="GET", request_options=request_options
+ "ats/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/account_token/client.py b/src/merge/resources/ats/resources/account_token/client.py
index fb1e8e11..0e3da8ce 100644
--- a/src/merge/resources/ats/resources/account_token/client.py
+++ b/src/merge/resources/ats/resources/account_token/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_token import AccountToken
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountTokenClient:
@@ -33,7 +33,7 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -44,11 +44,19 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"ats/v1/account-token/{jsonable_encoder(public_token)}", method="GET", request_options=request_options
+ f"ats/v1/account-token/{jsonable_encoder(public_token)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -79,22 +87,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.account_token.retrieve(
- public_token="public_token",
- )
+
+
+ async def main() -> None:
+ await client.ats.account_token.retrieve(
+ public_token="public_token",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"ats/v1/account-token/{jsonable_encoder(public_token)}", method="GET", request_options=request_options
+ f"ats/v1/account-token/{jsonable_encoder(public_token)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/activities/client.py b/src/merge/resources/ats/resources/activities/client.py
index b90ac796..f7eede42 100644
--- a/src/merge/resources/ats/resources/activities/client.py
+++ b/src/merge/resources/ats/resources/activities/client.py
@@ -1,24 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.activities_list_request_remote_fields import ActivitiesListRequestRemoteFields
+from .types.activities_list_request_show_enum_origins import ActivitiesListRequestShowEnumOrigins
+from .....core.request_options import RequestOptions
+from ...types.paginated_activity_list import PaginatedActivityList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.activity import Activity
from ...types.activity_request import ActivityRequest
from ...types.activity_response import ActivityResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_activity_list import PaginatedActivityList
-from .types.activities_list_request_remote_fields import ActivitiesListRequestRemoteFields
-from .types.activities_list_request_show_enum_origins import ActivitiesListRequestShowEnumOrigins
from .types.activities_retrieve_request_remote_fields import ActivitiesRetrieveRequestRemoteFields
from .types.activities_retrieve_request_show_enum_origins import ActivitiesRetrieveRequestShowEnumOrigins
+from ...types.activity import Activity
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -100,7 +100,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -128,9 +128,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedActivityList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedActivityList,
+ parse_obj_as(
+ type_=PaginatedActivityList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -170,7 +176,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ats import ActivityRequest
client = Merge(
@@ -185,14 +191,26 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/activities",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ActivityResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ActivityResponse,
+ parse_obj_as(
+ type_=ActivityResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -237,7 +255,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -258,9 +276,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Activity, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Activity,
+ parse_obj_as(
+ type_=Activity, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -282,7 +306,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -291,11 +315,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.ats.activities.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/activities/meta/post", method="GET", request_options=request_options
+ "ats/v1/activities/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -378,13 +410,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.activities.list()
+
+
+ async def main() -> None:
+ await client.ats.activities.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/activities",
@@ -406,9 +446,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedActivityList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedActivityList,
+ parse_obj_as(
+ type_=PaginatedActivityList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -448,29 +494,49 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ats import ActivityRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.activities.create(
- model=ActivityRequest(),
- remote_user_id="remote_user_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.activities.create(
+ model=ActivityRequest(),
+ remote_user_id="remote_user_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/activities",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ActivityResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ActivityResponse,
+ parse_obj_as(
+ type_=ActivityResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -515,15 +581,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.activities.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.activities.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/activities/{jsonable_encoder(id)}",
@@ -536,9 +610,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Activity, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Activity,
+ parse_obj_as(
+ type_=Activity, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -560,20 +640,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.activities.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.activities.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/activities/meta/post", method="GET", request_options=request_options
+ "ats/v1/activities/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/activities/types/activities_list_request_remote_fields.py b/src/merge/resources/ats/resources/activities/types/activities_list_request_remote_fields.py
index bd203f38..d37644b0 100644
--- a/src/merge/resources/ats/resources/activities/types/activities_list_request_remote_fields.py
+++ b/src/merge/resources/ats/resources/activities/types/activities_list_request_remote_fields.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ActivitiesListRequestRemoteFields(str, enum.Enum):
- ACTIVITY_TYPE = "activity_type"
- ACTIVITY_TYPE_VISIBILITY = "activity_type,visibility"
- VISIBILITY = "visibility"
-
- def visit(
- self,
- activity_type: typing.Callable[[], T_Result],
- activity_type_visibility: typing.Callable[[], T_Result],
- visibility: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ActivitiesListRequestRemoteFields.ACTIVITY_TYPE:
- return activity_type()
- if self is ActivitiesListRequestRemoteFields.ACTIVITY_TYPE_VISIBILITY:
- return activity_type_visibility()
- if self is ActivitiesListRequestRemoteFields.VISIBILITY:
- return visibility()
+ActivitiesListRequestRemoteFields = typing.Union[
+ typing.Literal["activity_type", "activity_type,visibility", "visibility"], typing.Any
+]
diff --git a/src/merge/resources/ats/resources/activities/types/activities_list_request_show_enum_origins.py b/src/merge/resources/ats/resources/activities/types/activities_list_request_show_enum_origins.py
index c38d72ac..4b52a98b 100644
--- a/src/merge/resources/ats/resources/activities/types/activities_list_request_show_enum_origins.py
+++ b/src/merge/resources/ats/resources/activities/types/activities_list_request_show_enum_origins.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ActivitiesListRequestShowEnumOrigins(str, enum.Enum):
- ACTIVITY_TYPE = "activity_type"
- ACTIVITY_TYPE_VISIBILITY = "activity_type,visibility"
- VISIBILITY = "visibility"
-
- def visit(
- self,
- activity_type: typing.Callable[[], T_Result],
- activity_type_visibility: typing.Callable[[], T_Result],
- visibility: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ActivitiesListRequestShowEnumOrigins.ACTIVITY_TYPE:
- return activity_type()
- if self is ActivitiesListRequestShowEnumOrigins.ACTIVITY_TYPE_VISIBILITY:
- return activity_type_visibility()
- if self is ActivitiesListRequestShowEnumOrigins.VISIBILITY:
- return visibility()
+ActivitiesListRequestShowEnumOrigins = typing.Union[
+ typing.Literal["activity_type", "activity_type,visibility", "visibility"], typing.Any
+]
diff --git a/src/merge/resources/ats/resources/activities/types/activities_retrieve_request_remote_fields.py b/src/merge/resources/ats/resources/activities/types/activities_retrieve_request_remote_fields.py
index 3290370e..c39df851 100644
--- a/src/merge/resources/ats/resources/activities/types/activities_retrieve_request_remote_fields.py
+++ b/src/merge/resources/ats/resources/activities/types/activities_retrieve_request_remote_fields.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ActivitiesRetrieveRequestRemoteFields(str, enum.Enum):
- ACTIVITY_TYPE = "activity_type"
- ACTIVITY_TYPE_VISIBILITY = "activity_type,visibility"
- VISIBILITY = "visibility"
-
- def visit(
- self,
- activity_type: typing.Callable[[], T_Result],
- activity_type_visibility: typing.Callable[[], T_Result],
- visibility: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ActivitiesRetrieveRequestRemoteFields.ACTIVITY_TYPE:
- return activity_type()
- if self is ActivitiesRetrieveRequestRemoteFields.ACTIVITY_TYPE_VISIBILITY:
- return activity_type_visibility()
- if self is ActivitiesRetrieveRequestRemoteFields.VISIBILITY:
- return visibility()
+ActivitiesRetrieveRequestRemoteFields = typing.Union[
+ typing.Literal["activity_type", "activity_type,visibility", "visibility"], typing.Any
+]
diff --git a/src/merge/resources/ats/resources/activities/types/activities_retrieve_request_show_enum_origins.py b/src/merge/resources/ats/resources/activities/types/activities_retrieve_request_show_enum_origins.py
index 26439eb1..140031ef 100644
--- a/src/merge/resources/ats/resources/activities/types/activities_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/ats/resources/activities/types/activities_retrieve_request_show_enum_origins.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ActivitiesRetrieveRequestShowEnumOrigins(str, enum.Enum):
- ACTIVITY_TYPE = "activity_type"
- ACTIVITY_TYPE_VISIBILITY = "activity_type,visibility"
- VISIBILITY = "visibility"
-
- def visit(
- self,
- activity_type: typing.Callable[[], T_Result],
- activity_type_visibility: typing.Callable[[], T_Result],
- visibility: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ActivitiesRetrieveRequestShowEnumOrigins.ACTIVITY_TYPE:
- return activity_type()
- if self is ActivitiesRetrieveRequestShowEnumOrigins.ACTIVITY_TYPE_VISIBILITY:
- return activity_type_visibility()
- if self is ActivitiesRetrieveRequestShowEnumOrigins.VISIBILITY:
- return visibility()
+ActivitiesRetrieveRequestShowEnumOrigins = typing.Union[
+ typing.Literal["activity_type", "activity_type,visibility", "visibility"], typing.Any
+]
diff --git a/src/merge/resources/ats/resources/applications/client.py b/src/merge/resources/ats/resources/applications/client.py
index d04961ee..634dd4c1 100644
--- a/src/merge/resources/ats/resources/applications/client.py
+++ b/src/merge/resources/ats/resources/applications/client.py
@@ -1,22 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.applications_list_request_expand import ApplicationsListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_application_list import PaginatedApplicationList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.application import Application
from ...types.application_request import ApplicationRequest
from ...types.application_response import ApplicationResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_application_list import PaginatedApplicationList
-from .types.applications_list_request_expand import ApplicationsListRequestExpand
from .types.applications_retrieve_request_expand import ApplicationsRetrieveRequestExpand
+from ...types.application import Application
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -110,7 +110,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -141,9 +141,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedApplicationList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedApplicationList,
+ parse_obj_as(
+ type_=PaginatedApplicationList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -183,7 +189,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ats import ApplicationRequest
client = Merge(
@@ -198,14 +204,26 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/applications",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ApplicationResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ApplicationResponse,
+ parse_obj_as(
+ type_=ApplicationResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -242,7 +260,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -255,12 +273,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/applications/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Application, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Application,
+ parse_obj_as(
+ type_=Application, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -304,7 +331,7 @@ def change_stage_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -317,14 +344,26 @@ def change_stage_create(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/applications/{jsonable_encoder(id)}/change-stage",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"job_interview_stage": job_interview_stage, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "job_interview_stage": job_interview_stage,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ApplicationResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ApplicationResponse,
+ parse_obj_as(
+ type_=ApplicationResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -354,7 +393,7 @@ def meta_post_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -365,12 +404,20 @@ def meta_post_retrieve(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/applications/meta/post",
method="GET",
- params={"application_remote_template_id": application_remote_template_id},
+ params={
+ "application_remote_template_id": application_remote_template_id,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -465,13 +512,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.applications.list()
+
+
+ async def main() -> None:
+ await client.ats.applications.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/applications",
@@ -496,9 +551,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedApplicationList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedApplicationList,
+ parse_obj_as(
+ type_=PaginatedApplicationList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -538,29 +599,49 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ats import ApplicationRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.applications.create(
- model=ApplicationRequest(),
- remote_user_id="remote_user_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.applications.create(
+ model=ApplicationRequest(),
+ remote_user_id="remote_user_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/applications",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ApplicationResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ApplicationResponse,
+ parse_obj_as(
+ type_=ApplicationResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -597,25 +678,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.applications.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.applications.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/applications/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Application, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Application,
+ parse_obj_as(
+ type_=Application, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -659,27 +757,47 @@ async def change_stage_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.applications.change_stage_create(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.applications.change_stage_create(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/applications/{jsonable_encoder(id)}/change-stage",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"job_interview_stage": job_interview_stage, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "job_interview_stage": job_interview_stage,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ApplicationResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ApplicationResponse,
+ parse_obj_as(
+ type_=ApplicationResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -709,23 +827,39 @@ async def meta_post_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.applications.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.applications.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/applications/meta/post",
method="GET",
- params={"application_remote_template_id": application_remote_template_id},
+ params={
+ "application_remote_template_id": application_remote_template_id,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/applications/types/applications_list_request_expand.py b/src/merge/resources/ats/resources/applications/types/applications_list_request_expand.py
index 81481bbb..fdde2bc9 100644
--- a/src/merge/resources/ats/resources/applications/types/applications_list_request_expand.py
+++ b/src/merge/resources/ats/resources/applications/types/applications_list_request_expand.py
@@ -1,1765 +1,264 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ApplicationsListRequestExpand(str, enum.Enum):
- CANDIDATE = "candidate"
- CANDIDATE_CREDITED_TO = "candidate,credited_to"
- CANDIDATE_CREDITED_TO_CURRENT_STAGE = "candidate,credited_to,current_stage"
- CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "candidate,credited_to,current_stage,reject_reason"
- CANDIDATE_CREDITED_TO_REJECT_REASON = "candidate,credited_to,reject_reason"
- CANDIDATE_CURRENT_STAGE = "candidate,current_stage"
- CANDIDATE_CURRENT_STAGE_REJECT_REASON = "candidate,current_stage,reject_reason"
- CANDIDATE_JOB = "candidate,job"
- CANDIDATE_JOB_CREDITED_TO = "candidate,job,credited_to"
- CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = "candidate,job,credited_to,current_stage"
- CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "candidate,job,credited_to,current_stage,reject_reason"
- CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = "candidate,job,credited_to,reject_reason"
- CANDIDATE_JOB_CURRENT_STAGE = "candidate,job,current_stage"
- CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = "candidate,job,current_stage,reject_reason"
- CANDIDATE_JOB_REJECT_REASON = "candidate,job,reject_reason"
- CANDIDATE_REJECT_REASON = "candidate,reject_reason"
- CREDITED_TO = "credited_to"
- CREDITED_TO_CURRENT_STAGE = "credited_to,current_stage"
- CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "credited_to,current_stage,reject_reason"
- CREDITED_TO_REJECT_REASON = "credited_to,reject_reason"
- CURRENT_STAGE = "current_stage"
- CURRENT_STAGE_REJECT_REASON = "current_stage,reject_reason"
- JOB = "job"
- JOB_CREDITED_TO = "job,credited_to"
- JOB_CREDITED_TO_CURRENT_STAGE = "job,credited_to,current_stage"
- JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "job,credited_to,current_stage,reject_reason"
- JOB_CREDITED_TO_REJECT_REASON = "job,credited_to,reject_reason"
- JOB_CURRENT_STAGE = "job,current_stage"
- JOB_CURRENT_STAGE_REJECT_REASON = "job,current_stage,reject_reason"
- JOB_REJECT_REASON = "job,reject_reason"
- OFFERS = "offers"
- OFFERS_CANDIDATE = "offers,candidate"
- OFFERS_CANDIDATE_CREDITED_TO = "offers,candidate,credited_to"
- OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE = "offers,candidate,credited_to,current_stage"
- OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,candidate,credited_to,current_stage,reject_reason"
- )
- OFFERS_CANDIDATE_CREDITED_TO_REJECT_REASON = "offers,candidate,credited_to,reject_reason"
- OFFERS_CANDIDATE_CURRENT_STAGE = "offers,candidate,current_stage"
- OFFERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON = "offers,candidate,current_stage,reject_reason"
- OFFERS_CANDIDATE_JOB = "offers,candidate,job"
- OFFERS_CANDIDATE_JOB_CREDITED_TO = "offers,candidate,job,credited_to"
- OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = "offers,candidate,job,credited_to,current_stage"
- OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,candidate,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = "offers,candidate,job,credited_to,reject_reason"
- OFFERS_CANDIDATE_JOB_CURRENT_STAGE = "offers,candidate,job,current_stage"
- OFFERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = "offers,candidate,job,current_stage,reject_reason"
- OFFERS_CANDIDATE_JOB_REJECT_REASON = "offers,candidate,job,reject_reason"
- OFFERS_CANDIDATE_REJECT_REASON = "offers,candidate,reject_reason"
- OFFERS_CREDITED_TO = "offers,credited_to"
- OFFERS_CREDITED_TO_CURRENT_STAGE = "offers,credited_to,current_stage"
- OFFERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,credited_to,current_stage,reject_reason"
- OFFERS_CREDITED_TO_REJECT_REASON = "offers,credited_to,reject_reason"
- OFFERS_CURRENT_STAGE = "offers,current_stage"
- OFFERS_CURRENT_STAGE_REJECT_REASON = "offers,current_stage,reject_reason"
- OFFERS_JOB = "offers,job"
- OFFERS_JOB_CREDITED_TO = "offers,job,credited_to"
- OFFERS_JOB_CREDITED_TO_CURRENT_STAGE = "offers,job,credited_to,current_stage"
- OFFERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,job,credited_to,current_stage,reject_reason"
- OFFERS_JOB_CREDITED_TO_REJECT_REASON = "offers,job,credited_to,reject_reason"
- OFFERS_JOB_CURRENT_STAGE = "offers,job,current_stage"
- OFFERS_JOB_CURRENT_STAGE_REJECT_REASON = "offers,job,current_stage,reject_reason"
- OFFERS_JOB_REJECT_REASON = "offers,job,reject_reason"
- OFFERS_REJECT_REASON = "offers,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS = "offers,screening_question_answers"
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE = "offers,screening_question_answers,candidate"
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO = "offers,screening_question_answers,candidate,credited_to"
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,candidate,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,candidate,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE = (
- "offers,screening_question_answers,candidate,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB = "offers,screening_question_answers,candidate,job"
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO = (
- "offers,screening_question_answers,candidate,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,candidate,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,candidate,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers,candidate,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_REJECT_REASON = (
- "offers,screening_question_answers,candidate,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO = "offers,screening_question_answers,credited_to"
- OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CURRENT_STAGE = "offers,screening_question_answers,current_stage"
- OFFERS_SCREENING_QUESTION_ANSWERS_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB = "offers,screening_question_answers,job"
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO = "offers,screening_question_answers,job,credited_to"
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE = "offers,screening_question_answers,job,current_stage"
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_REJECT_REASON = "offers,screening_question_answers,job,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_REJECT_REASON = "offers,screening_question_answers,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION = (
- "offers,screening_question_answers,screening_question_answers.question"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO = (
- "offers,screening_question_answers,screening_question_answers.question,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB = (
- "offers,screening_question_answers,screening_question_answers.question,job"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO = (
- "offers,screening_question_answers,screening_question_answers.question,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION = "offers,screening_question_answers.question"
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE = "offers,screening_question_answers.question,candidate"
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO = (
- "offers,screening_question_answers.question,candidate,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers.question,candidate,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE = (
- "offers,screening_question_answers.question,candidate,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB = (
- "offers,screening_question_answers.question,candidate,job"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO = (
- "offers,screening_question_answers.question,candidate,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers.question,candidate,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers.question,candidate,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO = "offers,screening_question_answers.question,credited_to"
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers.question,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers.question,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE = (
- "offers,screening_question_answers.question,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB = "offers,screening_question_answers.question,job"
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO = (
- "offers,screening_question_answers.question,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers.question,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers.question,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers.question,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON = (
- "offers,screening_question_answers.question,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON = (
- "offers,screening_question_answers.question,reject_reason"
- )
- REJECT_REASON = "reject_reason"
- SCREENING_QUESTION_ANSWERS = "screening_question_answers"
- SCREENING_QUESTION_ANSWERS_CANDIDATE = "screening_question_answers,candidate"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO = "screening_question_answers,candidate,credited_to"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,candidate,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,candidate,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,candidate,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE = "screening_question_answers,candidate,current_stage"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,candidate,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB = "screening_question_answers,candidate,job"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO = "screening_question_answers,candidate,job,credited_to"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,candidate,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,candidate,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,candidate,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE = "screening_question_answers,candidate,job,current_stage"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,candidate,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_REJECT_REASON = "screening_question_answers,candidate,job,reject_reason"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_REJECT_REASON = "screening_question_answers,candidate,reject_reason"
- SCREENING_QUESTION_ANSWERS_CREDITED_TO = "screening_question_answers,credited_to"
- SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE = "screening_question_answers,credited_to,current_stage"
- SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CREDITED_TO_REJECT_REASON = "screening_question_answers,credited_to,reject_reason"
- SCREENING_QUESTION_ANSWERS_CURRENT_STAGE = "screening_question_answers,current_stage"
- SCREENING_QUESTION_ANSWERS_CURRENT_STAGE_REJECT_REASON = "screening_question_answers,current_stage,reject_reason"
- SCREENING_QUESTION_ANSWERS_JOB = "screening_question_answers,job"
- SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO = "screening_question_answers,job,credited_to"
- SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE = "screening_question_answers,job,current_stage"
- SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_JOB_REJECT_REASON = "screening_question_answers,job,reject_reason"
- SCREENING_QUESTION_ANSWERS_REJECT_REASON = "screening_question_answers,reject_reason"
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION = (
- "screening_question_answers,screening_question_answers.question"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE = (
- "screening_question_answers,screening_question_answers.question,candidate"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO = (
- "screening_question_answers,screening_question_answers.question,candidate,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason"
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,candidate,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB = (
- "screening_question_answers,screening_question_answers.question,candidate,job"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO = (
- "screening_question_answers,screening_question_answers.question,candidate,job,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason"
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,candidate,job,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,job,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO = (
- "screening_question_answers,screening_question_answers.question,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB = (
- "screening_question_answers,screening_question_answers.question,job"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO = (
- "screening_question_answers,screening_question_answers.question,job,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,job,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,job,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION = "screening_question_answers.question"
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE = "screening_question_answers.question,candidate"
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO = (
- "screening_question_answers.question,candidate,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers.question,candidate,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,candidate,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers.question,candidate,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE = (
- "screening_question_answers.question,candidate,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,candidate,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB = "screening_question_answers.question,candidate,job"
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO = (
- "screening_question_answers.question,candidate,job,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers.question,candidate,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers.question,candidate,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE = (
- "screening_question_answers.question,candidate,job,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,candidate,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON = (
- "screening_question_answers.question,candidate,job,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON = (
- "screening_question_answers.question,candidate,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO = "screening_question_answers.question,credited_to"
- SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers.question,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers.question,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE = "screening_question_answers.question,current_stage"
- SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB = "screening_question_answers.question,job"
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO = "screening_question_answers.question,job,credited_to"
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers.question,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers.question,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE = "screening_question_answers.question,job,current_stage"
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON = "screening_question_answers.question,job,reject_reason"
- SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON = "screening_question_answers.question,reject_reason"
-
- def visit(
- self,
- candidate: typing.Callable[[], T_Result],
- candidate_credited_to: typing.Callable[[], T_Result],
- candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- candidate_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- candidate_current_stage: typing.Callable[[], T_Result],
- candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- candidate_job: typing.Callable[[], T_Result],
- candidate_job_credited_to: typing.Callable[[], T_Result],
- candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- candidate_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- candidate_job_current_stage: typing.Callable[[], T_Result],
- candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- candidate_job_reject_reason: typing.Callable[[], T_Result],
- candidate_reject_reason: typing.Callable[[], T_Result],
- credited_to: typing.Callable[[], T_Result],
- credited_to_current_stage: typing.Callable[[], T_Result],
- credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- credited_to_reject_reason: typing.Callable[[], T_Result],
- current_stage: typing.Callable[[], T_Result],
- current_stage_reject_reason: typing.Callable[[], T_Result],
- job: typing.Callable[[], T_Result],
- job_credited_to: typing.Callable[[], T_Result],
- job_credited_to_current_stage: typing.Callable[[], T_Result],
- job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- job_credited_to_reject_reason: typing.Callable[[], T_Result],
- job_current_stage: typing.Callable[[], T_Result],
- job_current_stage_reject_reason: typing.Callable[[], T_Result],
- job_reject_reason: typing.Callable[[], T_Result],
- offers: typing.Callable[[], T_Result],
- offers_candidate: typing.Callable[[], T_Result],
- offers_candidate_credited_to: typing.Callable[[], T_Result],
- offers_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_candidate_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_current_stage: typing.Callable[[], T_Result],
- offers_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_job: typing.Callable[[], T_Result],
- offers_candidate_job_credited_to: typing.Callable[[], T_Result],
- offers_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_job_current_stage: typing.Callable[[], T_Result],
- offers_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_job_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_reject_reason: typing.Callable[[], T_Result],
- offers_credited_to: typing.Callable[[], T_Result],
- offers_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_current_stage: typing.Callable[[], T_Result],
- offers_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_job: typing.Callable[[], T_Result],
- offers_job_credited_to: typing.Callable[[], T_Result],
- offers_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_job_current_stage: typing.Callable[[], T_Result],
- offers_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_job_reject_reason: typing.Callable[[], T_Result],
- offers_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_screening_question_answers_question: typing.Callable[[], T_Result],
- offers_screening_question_answers_screening_question_answers_question_candidate: typing.Callable[[], T_Result],
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_credited_to: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_screening_question_answers_question_job_credited_to: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_job_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_job_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_job_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_reject_reason: typing.Callable[[], T_Result],
- reject_reason: typing.Callable[[], T_Result],
- screening_question_answers: typing.Callable[[], T_Result],
- screening_question_answers_candidate: typing.Callable[[], T_Result],
- screening_question_answers_candidate_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_candidate_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_job: typing.Callable[[], T_Result],
- screening_question_answers_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_job_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_candidate: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_candidate_credited_to: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_question_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_question_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_question_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_job: typing.Callable[[], T_Result],
- screening_question_answers_question_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_question_job_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_reject_reason: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ApplicationsListRequestExpand.CANDIDATE:
- return candidate()
- if self is ApplicationsListRequestExpand.CANDIDATE_CREDITED_TO:
- return candidate_credited_to()
- if self is ApplicationsListRequestExpand.CANDIDATE_CREDITED_TO_CURRENT_STAGE:
- return candidate_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return candidate_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.CANDIDATE_CREDITED_TO_REJECT_REASON:
- return candidate_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.CANDIDATE_CURRENT_STAGE:
- return candidate_current_stage()
- if self is ApplicationsListRequestExpand.CANDIDATE_CURRENT_STAGE_REJECT_REASON:
- return candidate_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.CANDIDATE_JOB:
- return candidate_job()
- if self is ApplicationsListRequestExpand.CANDIDATE_JOB_CREDITED_TO:
- return candidate_job_credited_to()
- if self is ApplicationsListRequestExpand.CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE:
- return candidate_job_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return candidate_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.CANDIDATE_JOB_CREDITED_TO_REJECT_REASON:
- return candidate_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.CANDIDATE_JOB_CURRENT_STAGE:
- return candidate_job_current_stage()
- if self is ApplicationsListRequestExpand.CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON:
- return candidate_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.CANDIDATE_JOB_REJECT_REASON:
- return candidate_job_reject_reason()
- if self is ApplicationsListRequestExpand.CANDIDATE_REJECT_REASON:
- return candidate_reject_reason()
- if self is ApplicationsListRequestExpand.CREDITED_TO:
- return credited_to()
- if self is ApplicationsListRequestExpand.CREDITED_TO_CURRENT_STAGE:
- return credited_to_current_stage()
- if self is ApplicationsListRequestExpand.CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.CREDITED_TO_REJECT_REASON:
- return credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.CURRENT_STAGE:
- return current_stage()
- if self is ApplicationsListRequestExpand.CURRENT_STAGE_REJECT_REASON:
- return current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.JOB:
- return job()
- if self is ApplicationsListRequestExpand.JOB_CREDITED_TO:
- return job_credited_to()
- if self is ApplicationsListRequestExpand.JOB_CREDITED_TO_CURRENT_STAGE:
- return job_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return job_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.JOB_CREDITED_TO_REJECT_REASON:
- return job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.JOB_CURRENT_STAGE:
- return job_current_stage()
- if self is ApplicationsListRequestExpand.JOB_CURRENT_STAGE_REJECT_REASON:
- return job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.JOB_REJECT_REASON:
- return job_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS:
- return offers()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE:
- return offers_candidate()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CREDITED_TO:
- return offers_candidate_credited_to()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE:
- return offers_candidate_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return offers_candidate_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_REJECT_REASON:
- return offers_candidate_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CURRENT_STAGE:
- return offers_candidate_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON:
- return offers_candidate_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB:
- return offers_candidate_job()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO:
- return offers_candidate_job_credited_to()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE:
- return offers_candidate_job_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return offers_candidate_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON:
- return offers_candidate_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CURRENT_STAGE:
- return offers_candidate_job_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON:
- return offers_candidate_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_REJECT_REASON:
- return offers_candidate_job_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_REJECT_REASON:
- return offers_candidate_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CREDITED_TO:
- return offers_credited_to()
- if self is ApplicationsListRequestExpand.OFFERS_CREDITED_TO_CURRENT_STAGE:
- return offers_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return offers_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CREDITED_TO_REJECT_REASON:
- return offers_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_CURRENT_STAGE:
- return offers_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_CURRENT_STAGE_REJECT_REASON:
- return offers_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_JOB:
- return offers_job()
- if self is ApplicationsListRequestExpand.OFFERS_JOB_CREDITED_TO:
- return offers_job_credited_to()
- if self is ApplicationsListRequestExpand.OFFERS_JOB_CREDITED_TO_CURRENT_STAGE:
- return offers_job_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return offers_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_JOB_CREDITED_TO_REJECT_REASON:
- return offers_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_JOB_CURRENT_STAGE:
- return offers_job_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_JOB_CURRENT_STAGE_REJECT_REASON:
- return offers_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_JOB_REJECT_REASON:
- return offers_job_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_REJECT_REASON:
- return offers_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS:
- return offers_screening_question_answers()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE:
- return offers_screening_question_answers_candidate()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO:
- return offers_screening_question_answers_candidate_credited_to()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE:
- return offers_screening_question_answers_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_REJECT_REASON:
- return offers_screening_question_answers_candidate_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE:
- return offers_screening_question_answers_candidate_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB:
- return offers_screening_question_answers_candidate_job()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO:
- return offers_screening_question_answers_candidate_job_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_candidate_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_job_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE:
- return offers_screening_question_answers_candidate_job_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_REJECT_REASON:
- return offers_screening_question_answers_candidate_job_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_REJECT_REASON:
- return offers_screening_question_answers_candidate_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO:
- return offers_screening_question_answers_credited_to()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE:
- return offers_screening_question_answers_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_REJECT_REASON:
- return offers_screening_question_answers_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CURRENT_STAGE:
- return offers_screening_question_answers_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CURRENT_STAGE_REJECT_REASON:
- return offers_screening_question_answers_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB:
- return offers_screening_question_answers_job()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO:
- return offers_screening_question_answers_job_credited_to()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE:
- return offers_screening_question_answers_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_REJECT_REASON:
- return offers_screening_question_answers_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE:
- return offers_screening_question_answers_job_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE_REJECT_REASON:
- return offers_screening_question_answers_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_REJECT_REASON:
- return offers_screening_question_answers_job_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_REJECT_REASON:
- return offers_screening_question_answers_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION:
- return offers_screening_question_answers_screening_question_answers_question()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_job()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_job_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_job_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_job_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO
- ):
- return offers_screening_question_answers_screening_question_answers_question_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_credited_to_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_current_stage_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB
- ):
- return offers_screening_question_answers_screening_question_answers_question_job()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_job_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_credited_to_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_job_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION:
- return offers_screening_question_answers_question()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE:
- return offers_screening_question_answers_question_candidate()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO:
- return offers_screening_question_answers_question_candidate_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_question_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE:
- return offers_screening_question_answers_question_candidate_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB:
- return offers_screening_question_answers_question_candidate_job()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO:
- return offers_screening_question_answers_question_candidate_job_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_question_candidate_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE:
- return offers_screening_question_answers_question_candidate_job_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON:
- return offers_screening_question_answers_question_candidate_job_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON:
- return offers_screening_question_answers_question_candidate_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO:
- return offers_screening_question_answers_question_credited_to()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE:
- return offers_screening_question_answers_question_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON:
- return offers_screening_question_answers_question_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE:
- return offers_screening_question_answers_question_current_stage()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON:
- return offers_screening_question_answers_question_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB:
- return offers_screening_question_answers_question_job()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO:
- return offers_screening_question_answers_question_job_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_question_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_job_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_question_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE:
- return offers_screening_question_answers_question_job_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON:
- return offers_screening_question_answers_question_job_reject_reason()
- if self is ApplicationsListRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON:
- return offers_screening_question_answers_question_reject_reason()
- if self is ApplicationsListRequestExpand.REJECT_REASON:
- return reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS:
- return screening_question_answers()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE:
- return screening_question_answers_candidate()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO:
- return screening_question_answers_candidate_credited_to()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_candidate_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_candidate_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE:
- return screening_question_answers_candidate_current_stage()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_candidate_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB:
- return screening_question_answers_candidate_job()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO:
- return screening_question_answers_candidate_job_credited_to()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_candidate_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_candidate_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_candidate_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE:
- return screening_question_answers_candidate_job_current_stage()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_candidate_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_REJECT_REASON:
- return screening_question_answers_candidate_job_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_REJECT_REASON:
- return screening_question_answers_candidate_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CREDITED_TO:
- return screening_question_answers_credited_to()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CURRENT_STAGE:
- return screening_question_answers_current_stage()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_JOB:
- return screening_question_answers_job()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO:
- return screening_question_answers_job_credited_to()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_job_credited_to_current_stage()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE:
- return screening_question_answers_job_current_stage()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_REJECT_REASON:
- return screening_question_answers_job_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_REJECT_REASON:
- return screening_question_answers_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION:
- return screening_question_answers_screening_question_answers_question()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE
- ):
- return screening_question_answers_screening_question_answers_question_candidate()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO
- ):
- return screening_question_answers_screening_question_answers_question_candidate_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_candidate_credited_to_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_candidate_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB
- ):
- return screening_question_answers_screening_question_answers_question_candidate_job()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO
- ):
- return screening_question_answers_screening_question_answers_question_candidate_job_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage()
- )
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_candidate_job_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_job_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_candidate_job_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_candidate_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO
- ):
- return screening_question_answers_screening_question_answers_question_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_credited_to_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB:
- return screening_question_answers_screening_question_answers_question_job()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO
- ):
- return screening_question_answers_screening_question_answers_question_job_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_job_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_job_credited_to_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_job_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_job_current_stage_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_job_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION:
- return screening_question_answers_question()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE:
- return screening_question_answers_question_candidate()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO:
- return screening_question_answers_question_candidate_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_question_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE:
- return screening_question_answers_question_candidate_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB:
- return screening_question_answers_question_candidate_job()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO:
- return screening_question_answers_question_candidate_job_credited_to()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_question_candidate_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE:
- return screening_question_answers_question_candidate_job_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON:
- return screening_question_answers_question_candidate_job_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON:
- return screening_question_answers_question_candidate_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO:
- return screening_question_answers_question_credited_to()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_question_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_question_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE:
- return screening_question_answers_question_current_stage()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_question_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB:
- return screening_question_answers_question_job()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO:
- return screening_question_answers_question_job_credited_to()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_question_job_credited_to_current_stage()
- if (
- self
- is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_question_job_credited_to_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE:
- return screening_question_answers_question_job_current_stage()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_question_job_current_stage_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON:
- return screening_question_answers_question_job_reject_reason()
- if self is ApplicationsListRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON:
- return screening_question_answers_question_reject_reason()
+ApplicationsListRequestExpand = typing.Union[
+ typing.Literal[
+ "candidate",
+ "candidate,credited_to",
+ "candidate,credited_to,current_stage",
+ "candidate,credited_to,current_stage,reject_reason",
+ "candidate,credited_to,reject_reason",
+ "candidate,current_stage",
+ "candidate,current_stage,reject_reason",
+ "candidate,job",
+ "candidate,job,credited_to",
+ "candidate,job,credited_to,current_stage",
+ "candidate,job,credited_to,current_stage,reject_reason",
+ "candidate,job,credited_to,reject_reason",
+ "candidate,job,current_stage",
+ "candidate,job,current_stage,reject_reason",
+ "candidate,job,reject_reason",
+ "candidate,reject_reason",
+ "credited_to",
+ "credited_to,current_stage",
+ "credited_to,current_stage,reject_reason",
+ "credited_to,reject_reason",
+ "current_stage",
+ "current_stage,reject_reason",
+ "job",
+ "job,credited_to",
+ "job,credited_to,current_stage",
+ "job,credited_to,current_stage,reject_reason",
+ "job,credited_to,reject_reason",
+ "job,current_stage",
+ "job,current_stage,reject_reason",
+ "job,reject_reason",
+ "offers",
+ "offers,candidate",
+ "offers,candidate,credited_to",
+ "offers,candidate,credited_to,current_stage",
+ "offers,candidate,credited_to,current_stage,reject_reason",
+ "offers,candidate,credited_to,reject_reason",
+ "offers,candidate,current_stage",
+ "offers,candidate,current_stage,reject_reason",
+ "offers,candidate,job",
+ "offers,candidate,job,credited_to",
+ "offers,candidate,job,credited_to,current_stage",
+ "offers,candidate,job,credited_to,current_stage,reject_reason",
+ "offers,candidate,job,credited_to,reject_reason",
+ "offers,candidate,job,current_stage",
+ "offers,candidate,job,current_stage,reject_reason",
+ "offers,candidate,job,reject_reason",
+ "offers,candidate,reject_reason",
+ "offers,credited_to",
+ "offers,credited_to,current_stage",
+ "offers,credited_to,current_stage,reject_reason",
+ "offers,credited_to,reject_reason",
+ "offers,current_stage",
+ "offers,current_stage,reject_reason",
+ "offers,job",
+ "offers,job,credited_to",
+ "offers,job,credited_to,current_stage",
+ "offers,job,credited_to,current_stage,reject_reason",
+ "offers,job,credited_to,reject_reason",
+ "offers,job,current_stage",
+ "offers,job,current_stage,reject_reason",
+ "offers,job,reject_reason",
+ "offers,reject_reason",
+ "offers,screening_question_answers",
+ "offers,screening_question_answers,candidate",
+ "offers,screening_question_answers,candidate,credited_to",
+ "offers,screening_question_answers,candidate,credited_to,current_stage",
+ "offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,candidate,credited_to,reject_reason",
+ "offers,screening_question_answers,candidate,current_stage",
+ "offers,screening_question_answers,candidate,current_stage,reject_reason",
+ "offers,screening_question_answers,candidate,job",
+ "offers,screening_question_answers,candidate,job,credited_to",
+ "offers,screening_question_answers,candidate,job,credited_to,current_stage",
+ "offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,candidate,job,credited_to,reject_reason",
+ "offers,screening_question_answers,candidate,job,current_stage",
+ "offers,screening_question_answers,candidate,job,current_stage,reject_reason",
+ "offers,screening_question_answers,candidate,job,reject_reason",
+ "offers,screening_question_answers,candidate,reject_reason",
+ "offers,screening_question_answers,credited_to",
+ "offers,screening_question_answers,credited_to,current_stage",
+ "offers,screening_question_answers,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,credited_to,reject_reason",
+ "offers,screening_question_answers,current_stage",
+ "offers,screening_question_answers,current_stage,reject_reason",
+ "offers,screening_question_answers,job",
+ "offers,screening_question_answers,job,credited_to",
+ "offers,screening_question_answers,job,credited_to,current_stage",
+ "offers,screening_question_answers,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,job,credited_to,reject_reason",
+ "offers,screening_question_answers,job,current_stage",
+ "offers,screening_question_answers,job,current_stage,reject_reason",
+ "offers,screening_question_answers,job,reject_reason",
+ "offers,screening_question_answers,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question",
+ "offers,screening_question_answers,screening_question_answers.question,candidate",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,credited_to",
+ "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,job",
+ "offers,screening_question_answers,screening_question_answers.question,job,credited_to",
+ "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,job,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,job,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,reject_reason",
+ "offers,screening_question_answers.question",
+ "offers,screening_question_answers.question,candidate",
+ "offers,screening_question_answers.question,candidate,credited_to",
+ "offers,screening_question_answers.question,candidate,credited_to,current_stage",
+ "offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers.question,candidate,credited_to,reject_reason",
+ "offers,screening_question_answers.question,candidate,current_stage",
+ "offers,screening_question_answers.question,candidate,current_stage,reject_reason",
+ "offers,screening_question_answers.question,candidate,job",
+ "offers,screening_question_answers.question,candidate,job,credited_to",
+ "offers,screening_question_answers.question,candidate,job,credited_to,current_stage",
+ "offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers.question,candidate,job,credited_to,reject_reason",
+ "offers,screening_question_answers.question,candidate,job,current_stage",
+ "offers,screening_question_answers.question,candidate,job,current_stage,reject_reason",
+ "offers,screening_question_answers.question,candidate,job,reject_reason",
+ "offers,screening_question_answers.question,candidate,reject_reason",
+ "offers,screening_question_answers.question,credited_to",
+ "offers,screening_question_answers.question,credited_to,current_stage",
+ "offers,screening_question_answers.question,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers.question,credited_to,reject_reason",
+ "offers,screening_question_answers.question,current_stage",
+ "offers,screening_question_answers.question,current_stage,reject_reason",
+ "offers,screening_question_answers.question,job",
+ "offers,screening_question_answers.question,job,credited_to",
+ "offers,screening_question_answers.question,job,credited_to,current_stage",
+ "offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers.question,job,credited_to,reject_reason",
+ "offers,screening_question_answers.question,job,current_stage",
+ "offers,screening_question_answers.question,job,current_stage,reject_reason",
+ "offers,screening_question_answers.question,job,reject_reason",
+ "offers,screening_question_answers.question,reject_reason",
+ "reject_reason",
+ "screening_question_answers",
+ "screening_question_answers,candidate",
+ "screening_question_answers,candidate,credited_to",
+ "screening_question_answers,candidate,credited_to,current_stage",
+ "screening_question_answers,candidate,credited_to,current_stage,reject_reason",
+ "screening_question_answers,candidate,credited_to,reject_reason",
+ "screening_question_answers,candidate,current_stage",
+ "screening_question_answers,candidate,current_stage,reject_reason",
+ "screening_question_answers,candidate,job",
+ "screening_question_answers,candidate,job,credited_to",
+ "screening_question_answers,candidate,job,credited_to,current_stage",
+ "screening_question_answers,candidate,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers,candidate,job,credited_to,reject_reason",
+ "screening_question_answers,candidate,job,current_stage",
+ "screening_question_answers,candidate,job,current_stage,reject_reason",
+ "screening_question_answers,candidate,job,reject_reason",
+ "screening_question_answers,candidate,reject_reason",
+ "screening_question_answers,credited_to",
+ "screening_question_answers,credited_to,current_stage",
+ "screening_question_answers,credited_to,current_stage,reject_reason",
+ "screening_question_answers,credited_to,reject_reason",
+ "screening_question_answers,current_stage",
+ "screening_question_answers,current_stage,reject_reason",
+ "screening_question_answers,job",
+ "screening_question_answers,job,credited_to",
+ "screening_question_answers,job,credited_to,current_stage",
+ "screening_question_answers,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers,job,credited_to,reject_reason",
+ "screening_question_answers,job,current_stage",
+ "screening_question_answers,job,current_stage,reject_reason",
+ "screening_question_answers,job,reject_reason",
+ "screening_question_answers,reject_reason",
+ "screening_question_answers,screening_question_answers.question",
+ "screening_question_answers,screening_question_answers.question,candidate",
+ "screening_question_answers,screening_question_answers.question,candidate,credited_to",
+ "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage",
+ "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,current_stage",
+ "screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,job",
+ "screening_question_answers,screening_question_answers.question,candidate,job,credited_to",
+ "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage",
+ "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,job,current_stage",
+ "screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,job,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,reject_reason",
+ "screening_question_answers,screening_question_answers.question,credited_to",
+ "screening_question_answers,screening_question_answers.question,credited_to,current_stage",
+ "screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,credited_to,reject_reason",
+ "screening_question_answers,screening_question_answers.question,current_stage",
+ "screening_question_answers,screening_question_answers.question,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,job",
+ "screening_question_answers,screening_question_answers.question,job,credited_to",
+ "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage",
+ "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason",
+ "screening_question_answers,screening_question_answers.question,job,current_stage",
+ "screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,job,reject_reason",
+ "screening_question_answers,screening_question_answers.question,reject_reason",
+ "screening_question_answers.question",
+ "screening_question_answers.question,candidate",
+ "screening_question_answers.question,candidate,credited_to",
+ "screening_question_answers.question,candidate,credited_to,current_stage",
+ "screening_question_answers.question,candidate,credited_to,current_stage,reject_reason",
+ "screening_question_answers.question,candidate,credited_to,reject_reason",
+ "screening_question_answers.question,candidate,current_stage",
+ "screening_question_answers.question,candidate,current_stage,reject_reason",
+ "screening_question_answers.question,candidate,job",
+ "screening_question_answers.question,candidate,job,credited_to",
+ "screening_question_answers.question,candidate,job,credited_to,current_stage",
+ "screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers.question,candidate,job,credited_to,reject_reason",
+ "screening_question_answers.question,candidate,job,current_stage",
+ "screening_question_answers.question,candidate,job,current_stage,reject_reason",
+ "screening_question_answers.question,candidate,job,reject_reason",
+ "screening_question_answers.question,candidate,reject_reason",
+ "screening_question_answers.question,credited_to",
+ "screening_question_answers.question,credited_to,current_stage",
+ "screening_question_answers.question,credited_to,current_stage,reject_reason",
+ "screening_question_answers.question,credited_to,reject_reason",
+ "screening_question_answers.question,current_stage",
+ "screening_question_answers.question,current_stage,reject_reason",
+ "screening_question_answers.question,job",
+ "screening_question_answers.question,job,credited_to",
+ "screening_question_answers.question,job,credited_to,current_stage",
+ "screening_question_answers.question,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers.question,job,credited_to,reject_reason",
+ "screening_question_answers.question,job,current_stage",
+ "screening_question_answers.question,job,current_stage,reject_reason",
+ "screening_question_answers.question,job,reject_reason",
+ "screening_question_answers.question,reject_reason",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/applications/types/applications_retrieve_request_expand.py b/src/merge/resources/ats/resources/applications/types/applications_retrieve_request_expand.py
index fc812acd..252b353a 100644
--- a/src/merge/resources/ats/resources/applications/types/applications_retrieve_request_expand.py
+++ b/src/merge/resources/ats/resources/applications/types/applications_retrieve_request_expand.py
@@ -1,1801 +1,264 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ApplicationsRetrieveRequestExpand(str, enum.Enum):
- CANDIDATE = "candidate"
- CANDIDATE_CREDITED_TO = "candidate,credited_to"
- CANDIDATE_CREDITED_TO_CURRENT_STAGE = "candidate,credited_to,current_stage"
- CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "candidate,credited_to,current_stage,reject_reason"
- CANDIDATE_CREDITED_TO_REJECT_REASON = "candidate,credited_to,reject_reason"
- CANDIDATE_CURRENT_STAGE = "candidate,current_stage"
- CANDIDATE_CURRENT_STAGE_REJECT_REASON = "candidate,current_stage,reject_reason"
- CANDIDATE_JOB = "candidate,job"
- CANDIDATE_JOB_CREDITED_TO = "candidate,job,credited_to"
- CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = "candidate,job,credited_to,current_stage"
- CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "candidate,job,credited_to,current_stage,reject_reason"
- CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = "candidate,job,credited_to,reject_reason"
- CANDIDATE_JOB_CURRENT_STAGE = "candidate,job,current_stage"
- CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = "candidate,job,current_stage,reject_reason"
- CANDIDATE_JOB_REJECT_REASON = "candidate,job,reject_reason"
- CANDIDATE_REJECT_REASON = "candidate,reject_reason"
- CREDITED_TO = "credited_to"
- CREDITED_TO_CURRENT_STAGE = "credited_to,current_stage"
- CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "credited_to,current_stage,reject_reason"
- CREDITED_TO_REJECT_REASON = "credited_to,reject_reason"
- CURRENT_STAGE = "current_stage"
- CURRENT_STAGE_REJECT_REASON = "current_stage,reject_reason"
- JOB = "job"
- JOB_CREDITED_TO = "job,credited_to"
- JOB_CREDITED_TO_CURRENT_STAGE = "job,credited_to,current_stage"
- JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "job,credited_to,current_stage,reject_reason"
- JOB_CREDITED_TO_REJECT_REASON = "job,credited_to,reject_reason"
- JOB_CURRENT_STAGE = "job,current_stage"
- JOB_CURRENT_STAGE_REJECT_REASON = "job,current_stage,reject_reason"
- JOB_REJECT_REASON = "job,reject_reason"
- OFFERS = "offers"
- OFFERS_CANDIDATE = "offers,candidate"
- OFFERS_CANDIDATE_CREDITED_TO = "offers,candidate,credited_to"
- OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE = "offers,candidate,credited_to,current_stage"
- OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,candidate,credited_to,current_stage,reject_reason"
- )
- OFFERS_CANDIDATE_CREDITED_TO_REJECT_REASON = "offers,candidate,credited_to,reject_reason"
- OFFERS_CANDIDATE_CURRENT_STAGE = "offers,candidate,current_stage"
- OFFERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON = "offers,candidate,current_stage,reject_reason"
- OFFERS_CANDIDATE_JOB = "offers,candidate,job"
- OFFERS_CANDIDATE_JOB_CREDITED_TO = "offers,candidate,job,credited_to"
- OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = "offers,candidate,job,credited_to,current_stage"
- OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,candidate,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = "offers,candidate,job,credited_to,reject_reason"
- OFFERS_CANDIDATE_JOB_CURRENT_STAGE = "offers,candidate,job,current_stage"
- OFFERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = "offers,candidate,job,current_stage,reject_reason"
- OFFERS_CANDIDATE_JOB_REJECT_REASON = "offers,candidate,job,reject_reason"
- OFFERS_CANDIDATE_REJECT_REASON = "offers,candidate,reject_reason"
- OFFERS_CREDITED_TO = "offers,credited_to"
- OFFERS_CREDITED_TO_CURRENT_STAGE = "offers,credited_to,current_stage"
- OFFERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,credited_to,current_stage,reject_reason"
- OFFERS_CREDITED_TO_REJECT_REASON = "offers,credited_to,reject_reason"
- OFFERS_CURRENT_STAGE = "offers,current_stage"
- OFFERS_CURRENT_STAGE_REJECT_REASON = "offers,current_stage,reject_reason"
- OFFERS_JOB = "offers,job"
- OFFERS_JOB_CREDITED_TO = "offers,job,credited_to"
- OFFERS_JOB_CREDITED_TO_CURRENT_STAGE = "offers,job,credited_to,current_stage"
- OFFERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,job,credited_to,current_stage,reject_reason"
- OFFERS_JOB_CREDITED_TO_REJECT_REASON = "offers,job,credited_to,reject_reason"
- OFFERS_JOB_CURRENT_STAGE = "offers,job,current_stage"
- OFFERS_JOB_CURRENT_STAGE_REJECT_REASON = "offers,job,current_stage,reject_reason"
- OFFERS_JOB_REJECT_REASON = "offers,job,reject_reason"
- OFFERS_REJECT_REASON = "offers,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS = "offers,screening_question_answers"
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE = "offers,screening_question_answers,candidate"
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO = "offers,screening_question_answers,candidate,credited_to"
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,candidate,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,candidate,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE = (
- "offers,screening_question_answers,candidate,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB = "offers,screening_question_answers,candidate,job"
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO = (
- "offers,screening_question_answers,candidate,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,candidate,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,candidate,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers,candidate,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_REJECT_REASON = (
- "offers,screening_question_answers,candidate,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_REJECT_REASON = (
- "offers,screening_question_answers,candidate,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO = "offers,screening_question_answers,credited_to"
- OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_CURRENT_STAGE = "offers,screening_question_answers,current_stage"
- OFFERS_SCREENING_QUESTION_ANSWERS_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB = "offers,screening_question_answers,job"
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO = "offers,screening_question_answers,job,credited_to"
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE = "offers,screening_question_answers,job,current_stage"
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_JOB_REJECT_REASON = "offers,screening_question_answers,job,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_REJECT_REASON = "offers,screening_question_answers,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION = (
- "offers,screening_question_answers,screening_question_answers.question"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO = (
- "offers,screening_question_answers,screening_question_answers.question,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB = (
- "offers,screening_question_answers,screening_question_answers.question,job"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO = (
- "offers,screening_question_answers,screening_question_answers.question,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason"
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers,screening_question_answers.question,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON = (
- "offers,screening_question_answers,screening_question_answers.question,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION = "offers,screening_question_answers.question"
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE = "offers,screening_question_answers.question,candidate"
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO = (
- "offers,screening_question_answers.question,candidate,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers.question,candidate,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE = (
- "offers,screening_question_answers.question,candidate,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB = (
- "offers,screening_question_answers.question,candidate,job"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO = (
- "offers,screening_question_answers.question,candidate,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers.question,candidate,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers.question,candidate,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON = (
- "offers,screening_question_answers.question,candidate,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO = "offers,screening_question_answers.question,credited_to"
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers.question,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers.question,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE = (
- "offers,screening_question_answers.question,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB = "offers,screening_question_answers.question,job"
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO = (
- "offers,screening_question_answers.question,job,credited_to"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE = (
- "offers,screening_question_answers.question,job,credited_to,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON = (
- "offers,screening_question_answers.question,job,credited_to,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE = (
- "offers,screening_question_answers.question,job,current_stage"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON = (
- "offers,screening_question_answers.question,job,current_stage,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON = (
- "offers,screening_question_answers.question,job,reject_reason"
- )
- OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON = (
- "offers,screening_question_answers.question,reject_reason"
- )
- REJECT_REASON = "reject_reason"
- SCREENING_QUESTION_ANSWERS = "screening_question_answers"
- SCREENING_QUESTION_ANSWERS_CANDIDATE = "screening_question_answers,candidate"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO = "screening_question_answers,candidate,credited_to"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,candidate,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,candidate,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,candidate,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE = "screening_question_answers,candidate,current_stage"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,candidate,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB = "screening_question_answers,candidate,job"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO = "screening_question_answers,candidate,job,credited_to"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,candidate,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,candidate,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,candidate,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE = "screening_question_answers,candidate,job,current_stage"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,candidate,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_REJECT_REASON = "screening_question_answers,candidate,job,reject_reason"
- SCREENING_QUESTION_ANSWERS_CANDIDATE_REJECT_REASON = "screening_question_answers,candidate,reject_reason"
- SCREENING_QUESTION_ANSWERS_CREDITED_TO = "screening_question_answers,credited_to"
- SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE = "screening_question_answers,credited_to,current_stage"
- SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_CREDITED_TO_REJECT_REASON = "screening_question_answers,credited_to,reject_reason"
- SCREENING_QUESTION_ANSWERS_CURRENT_STAGE = "screening_question_answers,current_stage"
- SCREENING_QUESTION_ANSWERS_CURRENT_STAGE_REJECT_REASON = "screening_question_answers,current_stage,reject_reason"
- SCREENING_QUESTION_ANSWERS_JOB = "screening_question_answers,job"
- SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO = "screening_question_answers,job,credited_to"
- SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE = "screening_question_answers,job,current_stage"
- SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_JOB_REJECT_REASON = "screening_question_answers,job,reject_reason"
- SCREENING_QUESTION_ANSWERS_REJECT_REASON = "screening_question_answers,reject_reason"
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION = (
- "screening_question_answers,screening_question_answers.question"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE = (
- "screening_question_answers,screening_question_answers.question,candidate"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO = (
- "screening_question_answers,screening_question_answers.question,candidate,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason"
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,candidate,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB = (
- "screening_question_answers,screening_question_answers.question,candidate,job"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO = (
- "screening_question_answers,screening_question_answers.question,candidate,job,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason"
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,candidate,job,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,job,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,candidate,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO = (
- "screening_question_answers,screening_question_answers.question,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB = (
- "screening_question_answers,screening_question_answers.question,job"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO = (
- "screening_question_answers,screening_question_answers.question,job,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE = (
- "screening_question_answers,screening_question_answers.question,job,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,job,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON = (
- "screening_question_answers,screening_question_answers.question,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION = "screening_question_answers.question"
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE = "screening_question_answers.question,candidate"
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO = (
- "screening_question_answers.question,candidate,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers.question,candidate,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,candidate,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers.question,candidate,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE = (
- "screening_question_answers.question,candidate,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,candidate,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB = "screening_question_answers.question,candidate,job"
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO = (
- "screening_question_answers.question,candidate,job,credited_to"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers.question,candidate,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers.question,candidate,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE = (
- "screening_question_answers.question,candidate,job,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,candidate,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON = (
- "screening_question_answers.question,candidate,job,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON = (
- "screening_question_answers.question,candidate,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO = "screening_question_answers.question,credited_to"
- SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers.question,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers.question,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE = "screening_question_answers.question,current_stage"
- SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB = "screening_question_answers.question,job"
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO = "screening_question_answers.question,job,credited_to"
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE = (
- "screening_question_answers.question,job,credited_to,current_stage"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,job,credited_to,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON = (
- "screening_question_answers.question,job,credited_to,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE = "screening_question_answers.question,job,current_stage"
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON = (
- "screening_question_answers.question,job,current_stage,reject_reason"
- )
- SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON = "screening_question_answers.question,job,reject_reason"
- SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON = "screening_question_answers.question,reject_reason"
-
- def visit(
- self,
- candidate: typing.Callable[[], T_Result],
- candidate_credited_to: typing.Callable[[], T_Result],
- candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- candidate_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- candidate_current_stage: typing.Callable[[], T_Result],
- candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- candidate_job: typing.Callable[[], T_Result],
- candidate_job_credited_to: typing.Callable[[], T_Result],
- candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- candidate_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- candidate_job_current_stage: typing.Callable[[], T_Result],
- candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- candidate_job_reject_reason: typing.Callable[[], T_Result],
- candidate_reject_reason: typing.Callable[[], T_Result],
- credited_to: typing.Callable[[], T_Result],
- credited_to_current_stage: typing.Callable[[], T_Result],
- credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- credited_to_reject_reason: typing.Callable[[], T_Result],
- current_stage: typing.Callable[[], T_Result],
- current_stage_reject_reason: typing.Callable[[], T_Result],
- job: typing.Callable[[], T_Result],
- job_credited_to: typing.Callable[[], T_Result],
- job_credited_to_current_stage: typing.Callable[[], T_Result],
- job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- job_credited_to_reject_reason: typing.Callable[[], T_Result],
- job_current_stage: typing.Callable[[], T_Result],
- job_current_stage_reject_reason: typing.Callable[[], T_Result],
- job_reject_reason: typing.Callable[[], T_Result],
- offers: typing.Callable[[], T_Result],
- offers_candidate: typing.Callable[[], T_Result],
- offers_candidate_credited_to: typing.Callable[[], T_Result],
- offers_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_candidate_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_current_stage: typing.Callable[[], T_Result],
- offers_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_job: typing.Callable[[], T_Result],
- offers_candidate_job_credited_to: typing.Callable[[], T_Result],
- offers_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_job_current_stage: typing.Callable[[], T_Result],
- offers_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_job_reject_reason: typing.Callable[[], T_Result],
- offers_candidate_reject_reason: typing.Callable[[], T_Result],
- offers_credited_to: typing.Callable[[], T_Result],
- offers_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_current_stage: typing.Callable[[], T_Result],
- offers_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_job: typing.Callable[[], T_Result],
- offers_job_credited_to: typing.Callable[[], T_Result],
- offers_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_job_current_stage: typing.Callable[[], T_Result],
- offers_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_job_reject_reason: typing.Callable[[], T_Result],
- offers_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_job_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_candidate_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_job_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_screening_question_answers_question: typing.Callable[[], T_Result],
- offers_screening_question_answers_screening_question_answers_question_candidate: typing.Callable[[], T_Result],
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_job_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_candidate_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_credited_to: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_screening_question_answers_question_job_credited_to: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_job_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_screening_question_answers_question_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_job_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_job_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_candidate_job_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_candidate_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_credited_to: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_credited_to_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- offers_screening_question_answers_question_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_current_stage: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_job_reject_reason: typing.Callable[[], T_Result],
- offers_screening_question_answers_question_reject_reason: typing.Callable[[], T_Result],
- reject_reason: typing.Callable[[], T_Result],
- screening_question_answers: typing.Callable[[], T_Result],
- screening_question_answers_candidate: typing.Callable[[], T_Result],
- screening_question_answers_candidate_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_candidate_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_candidate_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_job: typing.Callable[[], T_Result],
- screening_question_answers_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_job_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_candidate: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_candidate_credited_to: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_job_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_candidate_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_job_credited_to_current_stage: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job_credited_to_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_job_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_screening_question_answers_question_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_screening_question_answers_question_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_question_candidate_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[
- [], T_Result
- ],
- screening_question_answers_question_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_candidate_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_question_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_job: typing.Callable[[], T_Result],
- screening_question_answers_question_job_credited_to: typing.Callable[[], T_Result],
- screening_question_answers_question_job_credited_to_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_job_credited_to_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_job_current_stage: typing.Callable[[], T_Result],
- screening_question_answers_question_job_current_stage_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_job_reject_reason: typing.Callable[[], T_Result],
- screening_question_answers_question_reject_reason: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE:
- return candidate()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_CREDITED_TO:
- return candidate_credited_to()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_CREDITED_TO_CURRENT_STAGE:
- return candidate_credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return candidate_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_CREDITED_TO_REJECT_REASON:
- return candidate_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_CURRENT_STAGE:
- return candidate_current_stage()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_CURRENT_STAGE_REJECT_REASON:
- return candidate_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_JOB:
- return candidate_job()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_JOB_CREDITED_TO:
- return candidate_job_credited_to()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE:
- return candidate_job_credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return candidate_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_JOB_CREDITED_TO_REJECT_REASON:
- return candidate_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_JOB_CURRENT_STAGE:
- return candidate_job_current_stage()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON:
- return candidate_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_JOB_REJECT_REASON:
- return candidate_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CANDIDATE_REJECT_REASON:
- return candidate_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CREDITED_TO:
- return credited_to()
- if self is ApplicationsRetrieveRequestExpand.CREDITED_TO_CURRENT_STAGE:
- return credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CREDITED_TO_REJECT_REASON:
- return credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.CURRENT_STAGE:
- return current_stage()
- if self is ApplicationsRetrieveRequestExpand.CURRENT_STAGE_REJECT_REASON:
- return current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.JOB:
- return job()
- if self is ApplicationsRetrieveRequestExpand.JOB_CREDITED_TO:
- return job_credited_to()
- if self is ApplicationsRetrieveRequestExpand.JOB_CREDITED_TO_CURRENT_STAGE:
- return job_credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return job_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.JOB_CREDITED_TO_REJECT_REASON:
- return job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.JOB_CURRENT_STAGE:
- return job_current_stage()
- if self is ApplicationsRetrieveRequestExpand.JOB_CURRENT_STAGE_REJECT_REASON:
- return job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.JOB_REJECT_REASON:
- return job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS:
- return offers()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE:
- return offers_candidate()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CREDITED_TO:
- return offers_candidate_credited_to()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE:
- return offers_candidate_credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return offers_candidate_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_REJECT_REASON:
- return offers_candidate_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CURRENT_STAGE:
- return offers_candidate_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON:
- return offers_candidate_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB:
- return offers_candidate_job()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO:
- return offers_candidate_job_credited_to()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE:
- return offers_candidate_job_credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return offers_candidate_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON:
- return offers_candidate_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CURRENT_STAGE:
- return offers_candidate_job_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON:
- return offers_candidate_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_REJECT_REASON:
- return offers_candidate_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_REJECT_REASON:
- return offers_candidate_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CREDITED_TO:
- return offers_credited_to()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CREDITED_TO_CURRENT_STAGE:
- return offers_credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return offers_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CREDITED_TO_REJECT_REASON:
- return offers_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CURRENT_STAGE:
- return offers_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_CURRENT_STAGE_REJECT_REASON:
- return offers_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB:
- return offers_job()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CREDITED_TO:
- return offers_job_credited_to()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CREDITED_TO_CURRENT_STAGE:
- return offers_job_credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return offers_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CREDITED_TO_REJECT_REASON:
- return offers_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CURRENT_STAGE:
- return offers_job_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CURRENT_STAGE_REJECT_REASON:
- return offers_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_REJECT_REASON:
- return offers_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_REJECT_REASON:
- return offers_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS:
- return offers_screening_question_answers()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE:
- return offers_screening_question_answers_candidate()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO:
- return offers_screening_question_answers_candidate_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE:
- return offers_screening_question_answers_candidate_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB:
- return offers_screening_question_answers_candidate_job()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO:
- return offers_screening_question_answers_candidate_job_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_candidate_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_job_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE:
- return offers_screening_question_answers_candidate_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_candidate_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_REJECT_REASON:
- return offers_screening_question_answers_candidate_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CANDIDATE_REJECT_REASON:
- return offers_screening_question_answers_candidate_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO:
- return offers_screening_question_answers_credited_to()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE:
- return offers_screening_question_answers_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CREDITED_TO_REJECT_REASON:
- return offers_screening_question_answers_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CURRENT_STAGE:
- return offers_screening_question_answers_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_CURRENT_STAGE_REJECT_REASON:
- return offers_screening_question_answers_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB:
- return offers_screening_question_answers_job()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO:
- return offers_screening_question_answers_job_credited_to()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE:
- return offers_screening_question_answers_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_REJECT_REASON:
- return offers_screening_question_answers_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE:
- return offers_screening_question_answers_job_current_stage()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE_REJECT_REASON:
- return offers_screening_question_answers_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_JOB_REJECT_REASON:
- return offers_screening_question_answers_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_REJECT_REASON:
- return offers_screening_question_answers_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION
- ):
- return offers_screening_question_answers_screening_question_answers_question()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_credited_to_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_job()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_job_credited_to_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_candidate_job_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_job_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_candidate_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO
- ):
- return offers_screening_question_answers_screening_question_answers_question_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_credited_to_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB
- ):
- return offers_screening_question_answers_screening_question_answers_question_job()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_job_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_credited_to_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- offers_screening_question_answers_screening_question_answers_question_job_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_job_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON
- ):
- return offers_screening_question_answers_screening_question_answers_question_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION:
- return offers_screening_question_answers_question()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE:
- return offers_screening_question_answers_question_candidate()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO:
- return offers_screening_question_answers_question_candidate_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_question_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE:
- return offers_screening_question_answers_question_candidate_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB:
- return offers_screening_question_answers_question_candidate_job()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO
- ):
- return offers_screening_question_answers_question_candidate_job_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_question_candidate_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_job_credited_to_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE
- ):
- return offers_screening_question_answers_question_candidate_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_job_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON
- ):
- return offers_screening_question_answers_question_candidate_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON:
- return offers_screening_question_answers_question_candidate_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO:
- return offers_screening_question_answers_question_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_question_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_question_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE:
- return offers_screening_question_answers_question_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB:
- return offers_screening_question_answers_question_job()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO:
- return offers_screening_question_answers_question_job_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return offers_screening_question_answers_question_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_job_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON
- ):
- return offers_screening_question_answers_question_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE:
- return offers_screening_question_answers_question_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return offers_screening_question_answers_question_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON:
- return offers_screening_question_answers_question_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.OFFERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON:
- return offers_screening_question_answers_question_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.REJECT_REASON:
- return reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS:
- return screening_question_answers()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE:
- return screening_question_answers_candidate()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO:
- return screening_question_answers_candidate_credited_to()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_candidate_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_candidate_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE:
- return screening_question_answers_candidate_current_stage()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_candidate_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB:
- return screening_question_answers_candidate_job()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO:
- return screening_question_answers_candidate_job_credited_to()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_candidate_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_candidate_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_candidate_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE:
- return screening_question_answers_candidate_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_candidate_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_JOB_REJECT_REASON:
- return screening_question_answers_candidate_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CANDIDATE_REJECT_REASON:
- return screening_question_answers_candidate_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CREDITED_TO:
- return screening_question_answers_credited_to()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_credited_to_current_stage()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CURRENT_STAGE:
- return screening_question_answers_current_stage()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_JOB:
- return screening_question_answers_job()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO:
- return screening_question_answers_job_credited_to()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE:
- return screening_question_answers_job_current_stage()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_JOB_REJECT_REASON:
- return screening_question_answers_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_REJECT_REASON:
- return screening_question_answers_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION:
- return screening_question_answers_screening_question_answers_question()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE
- ):
- return screening_question_answers_screening_question_answers_question_candidate()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO
- ):
- return screening_question_answers_screening_question_answers_question_candidate_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_candidate_credited_to_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_candidate_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB
- ):
- return screening_question_answers_screening_question_answers_question_candidate_job()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO
- ):
- return screening_question_answers_screening_question_answers_question_candidate_job_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_job_credited_to_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_candidate_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_candidate_job_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_candidate_job_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_candidate_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO
- ):
- return screening_question_answers_screening_question_answers_question_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_credited_to_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB:
- return screening_question_answers_screening_question_answers_question_job()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO
- ):
- return screening_question_answers_screening_question_answers_question_job_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return (
- screening_question_answers_screening_question_answers_question_job_credited_to_current_stage_reject_reason()
- )
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_job_credited_to_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE
- ):
- return screening_question_answers_screening_question_answers_question_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_job_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_job_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON
- ):
- return screening_question_answers_screening_question_answers_question_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION:
- return screening_question_answers_question()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE:
- return screening_question_answers_question_candidate()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO:
- return screening_question_answers_question_candidate_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_question_candidate_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE:
- return screening_question_answers_question_candidate_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB:
- return screening_question_answers_question_candidate_job()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO:
- return screening_question_answers_question_candidate_job_credited_to()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE
- ):
- return screening_question_answers_question_candidate_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_job_credited_to_current_stage_reject_reason()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE:
- return screening_question_answers_question_candidate_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_candidate_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_JOB_REJECT_REASON:
- return screening_question_answers_question_candidate_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CANDIDATE_REJECT_REASON:
- return screening_question_answers_question_candidate_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO:
- return screening_question_answers_question_credited_to()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_question_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_question_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE:
- return screening_question_answers_question_current_stage()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_CURRENT_STAGE_REJECT_REASON:
- return screening_question_answers_question_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB:
- return screening_question_answers_question_job()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO:
- return screening_question_answers_question_job_credited_to()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE:
- return screening_question_answers_question_job_credited_to_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_job_credited_to_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CREDITED_TO_REJECT_REASON:
- return screening_question_answers_question_job_credited_to_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE:
- return screening_question_answers_question_job_current_stage()
- if (
- self
- is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_CURRENT_STAGE_REJECT_REASON
- ):
- return screening_question_answers_question_job_current_stage_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_JOB_REJECT_REASON:
- return screening_question_answers_question_job_reject_reason()
- if self is ApplicationsRetrieveRequestExpand.SCREENING_QUESTION_ANSWERS_QUESTION_REJECT_REASON:
- return screening_question_answers_question_reject_reason()
+ApplicationsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "candidate",
+ "candidate,credited_to",
+ "candidate,credited_to,current_stage",
+ "candidate,credited_to,current_stage,reject_reason",
+ "candidate,credited_to,reject_reason",
+ "candidate,current_stage",
+ "candidate,current_stage,reject_reason",
+ "candidate,job",
+ "candidate,job,credited_to",
+ "candidate,job,credited_to,current_stage",
+ "candidate,job,credited_to,current_stage,reject_reason",
+ "candidate,job,credited_to,reject_reason",
+ "candidate,job,current_stage",
+ "candidate,job,current_stage,reject_reason",
+ "candidate,job,reject_reason",
+ "candidate,reject_reason",
+ "credited_to",
+ "credited_to,current_stage",
+ "credited_to,current_stage,reject_reason",
+ "credited_to,reject_reason",
+ "current_stage",
+ "current_stage,reject_reason",
+ "job",
+ "job,credited_to",
+ "job,credited_to,current_stage",
+ "job,credited_to,current_stage,reject_reason",
+ "job,credited_to,reject_reason",
+ "job,current_stage",
+ "job,current_stage,reject_reason",
+ "job,reject_reason",
+ "offers",
+ "offers,candidate",
+ "offers,candidate,credited_to",
+ "offers,candidate,credited_to,current_stage",
+ "offers,candidate,credited_to,current_stage,reject_reason",
+ "offers,candidate,credited_to,reject_reason",
+ "offers,candidate,current_stage",
+ "offers,candidate,current_stage,reject_reason",
+ "offers,candidate,job",
+ "offers,candidate,job,credited_to",
+ "offers,candidate,job,credited_to,current_stage",
+ "offers,candidate,job,credited_to,current_stage,reject_reason",
+ "offers,candidate,job,credited_to,reject_reason",
+ "offers,candidate,job,current_stage",
+ "offers,candidate,job,current_stage,reject_reason",
+ "offers,candidate,job,reject_reason",
+ "offers,candidate,reject_reason",
+ "offers,credited_to",
+ "offers,credited_to,current_stage",
+ "offers,credited_to,current_stage,reject_reason",
+ "offers,credited_to,reject_reason",
+ "offers,current_stage",
+ "offers,current_stage,reject_reason",
+ "offers,job",
+ "offers,job,credited_to",
+ "offers,job,credited_to,current_stage",
+ "offers,job,credited_to,current_stage,reject_reason",
+ "offers,job,credited_to,reject_reason",
+ "offers,job,current_stage",
+ "offers,job,current_stage,reject_reason",
+ "offers,job,reject_reason",
+ "offers,reject_reason",
+ "offers,screening_question_answers",
+ "offers,screening_question_answers,candidate",
+ "offers,screening_question_answers,candidate,credited_to",
+ "offers,screening_question_answers,candidate,credited_to,current_stage",
+ "offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,candidate,credited_to,reject_reason",
+ "offers,screening_question_answers,candidate,current_stage",
+ "offers,screening_question_answers,candidate,current_stage,reject_reason",
+ "offers,screening_question_answers,candidate,job",
+ "offers,screening_question_answers,candidate,job,credited_to",
+ "offers,screening_question_answers,candidate,job,credited_to,current_stage",
+ "offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,candidate,job,credited_to,reject_reason",
+ "offers,screening_question_answers,candidate,job,current_stage",
+ "offers,screening_question_answers,candidate,job,current_stage,reject_reason",
+ "offers,screening_question_answers,candidate,job,reject_reason",
+ "offers,screening_question_answers,candidate,reject_reason",
+ "offers,screening_question_answers,credited_to",
+ "offers,screening_question_answers,credited_to,current_stage",
+ "offers,screening_question_answers,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,credited_to,reject_reason",
+ "offers,screening_question_answers,current_stage",
+ "offers,screening_question_answers,current_stage,reject_reason",
+ "offers,screening_question_answers,job",
+ "offers,screening_question_answers,job,credited_to",
+ "offers,screening_question_answers,job,credited_to,current_stage",
+ "offers,screening_question_answers,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,job,credited_to,reject_reason",
+ "offers,screening_question_answers,job,current_stage",
+ "offers,screening_question_answers,job,current_stage,reject_reason",
+ "offers,screening_question_answers,job,reject_reason",
+ "offers,screening_question_answers,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question",
+ "offers,screening_question_answers,screening_question_answers.question,candidate",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,credited_to",
+ "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,job",
+ "offers,screening_question_answers,screening_question_answers.question,job,credited_to",
+ "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,job,current_stage",
+ "offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,job,reject_reason",
+ "offers,screening_question_answers,screening_question_answers.question,reject_reason",
+ "offers,screening_question_answers.question",
+ "offers,screening_question_answers.question,candidate",
+ "offers,screening_question_answers.question,candidate,credited_to",
+ "offers,screening_question_answers.question,candidate,credited_to,current_stage",
+ "offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers.question,candidate,credited_to,reject_reason",
+ "offers,screening_question_answers.question,candidate,current_stage",
+ "offers,screening_question_answers.question,candidate,current_stage,reject_reason",
+ "offers,screening_question_answers.question,candidate,job",
+ "offers,screening_question_answers.question,candidate,job,credited_to",
+ "offers,screening_question_answers.question,candidate,job,credited_to,current_stage",
+ "offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers.question,candidate,job,credited_to,reject_reason",
+ "offers,screening_question_answers.question,candidate,job,current_stage",
+ "offers,screening_question_answers.question,candidate,job,current_stage,reject_reason",
+ "offers,screening_question_answers.question,candidate,job,reject_reason",
+ "offers,screening_question_answers.question,candidate,reject_reason",
+ "offers,screening_question_answers.question,credited_to",
+ "offers,screening_question_answers.question,credited_to,current_stage",
+ "offers,screening_question_answers.question,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers.question,credited_to,reject_reason",
+ "offers,screening_question_answers.question,current_stage",
+ "offers,screening_question_answers.question,current_stage,reject_reason",
+ "offers,screening_question_answers.question,job",
+ "offers,screening_question_answers.question,job,credited_to",
+ "offers,screening_question_answers.question,job,credited_to,current_stage",
+ "offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason",
+ "offers,screening_question_answers.question,job,credited_to,reject_reason",
+ "offers,screening_question_answers.question,job,current_stage",
+ "offers,screening_question_answers.question,job,current_stage,reject_reason",
+ "offers,screening_question_answers.question,job,reject_reason",
+ "offers,screening_question_answers.question,reject_reason",
+ "reject_reason",
+ "screening_question_answers",
+ "screening_question_answers,candidate",
+ "screening_question_answers,candidate,credited_to",
+ "screening_question_answers,candidate,credited_to,current_stage",
+ "screening_question_answers,candidate,credited_to,current_stage,reject_reason",
+ "screening_question_answers,candidate,credited_to,reject_reason",
+ "screening_question_answers,candidate,current_stage",
+ "screening_question_answers,candidate,current_stage,reject_reason",
+ "screening_question_answers,candidate,job",
+ "screening_question_answers,candidate,job,credited_to",
+ "screening_question_answers,candidate,job,credited_to,current_stage",
+ "screening_question_answers,candidate,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers,candidate,job,credited_to,reject_reason",
+ "screening_question_answers,candidate,job,current_stage",
+ "screening_question_answers,candidate,job,current_stage,reject_reason",
+ "screening_question_answers,candidate,job,reject_reason",
+ "screening_question_answers,candidate,reject_reason",
+ "screening_question_answers,credited_to",
+ "screening_question_answers,credited_to,current_stage",
+ "screening_question_answers,credited_to,current_stage,reject_reason",
+ "screening_question_answers,credited_to,reject_reason",
+ "screening_question_answers,current_stage",
+ "screening_question_answers,current_stage,reject_reason",
+ "screening_question_answers,job",
+ "screening_question_answers,job,credited_to",
+ "screening_question_answers,job,credited_to,current_stage",
+ "screening_question_answers,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers,job,credited_to,reject_reason",
+ "screening_question_answers,job,current_stage",
+ "screening_question_answers,job,current_stage,reject_reason",
+ "screening_question_answers,job,reject_reason",
+ "screening_question_answers,reject_reason",
+ "screening_question_answers,screening_question_answers.question",
+ "screening_question_answers,screening_question_answers.question,candidate",
+ "screening_question_answers,screening_question_answers.question,candidate,credited_to",
+ "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage",
+ "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,current_stage",
+ "screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,job",
+ "screening_question_answers,screening_question_answers.question,candidate,job,credited_to",
+ "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage",
+ "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,job,current_stage",
+ "screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,job,reject_reason",
+ "screening_question_answers,screening_question_answers.question,candidate,reject_reason",
+ "screening_question_answers,screening_question_answers.question,credited_to",
+ "screening_question_answers,screening_question_answers.question,credited_to,current_stage",
+ "screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,credited_to,reject_reason",
+ "screening_question_answers,screening_question_answers.question,current_stage",
+ "screening_question_answers,screening_question_answers.question,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,job",
+ "screening_question_answers,screening_question_answers.question,job,credited_to",
+ "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage",
+ "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason",
+ "screening_question_answers,screening_question_answers.question,job,current_stage",
+ "screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason",
+ "screening_question_answers,screening_question_answers.question,job,reject_reason",
+ "screening_question_answers,screening_question_answers.question,reject_reason",
+ "screening_question_answers.question",
+ "screening_question_answers.question,candidate",
+ "screening_question_answers.question,candidate,credited_to",
+ "screening_question_answers.question,candidate,credited_to,current_stage",
+ "screening_question_answers.question,candidate,credited_to,current_stage,reject_reason",
+ "screening_question_answers.question,candidate,credited_to,reject_reason",
+ "screening_question_answers.question,candidate,current_stage",
+ "screening_question_answers.question,candidate,current_stage,reject_reason",
+ "screening_question_answers.question,candidate,job",
+ "screening_question_answers.question,candidate,job,credited_to",
+ "screening_question_answers.question,candidate,job,credited_to,current_stage",
+ "screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers.question,candidate,job,credited_to,reject_reason",
+ "screening_question_answers.question,candidate,job,current_stage",
+ "screening_question_answers.question,candidate,job,current_stage,reject_reason",
+ "screening_question_answers.question,candidate,job,reject_reason",
+ "screening_question_answers.question,candidate,reject_reason",
+ "screening_question_answers.question,credited_to",
+ "screening_question_answers.question,credited_to,current_stage",
+ "screening_question_answers.question,credited_to,current_stage,reject_reason",
+ "screening_question_answers.question,credited_to,reject_reason",
+ "screening_question_answers.question,current_stage",
+ "screening_question_answers.question,current_stage,reject_reason",
+ "screening_question_answers.question,job",
+ "screening_question_answers.question,job,credited_to",
+ "screening_question_answers.question,job,credited_to,current_stage",
+ "screening_question_answers.question,job,credited_to,current_stage,reject_reason",
+ "screening_question_answers.question,job,credited_to,reject_reason",
+ "screening_question_answers.question,job,current_stage",
+ "screening_question_answers.question,job,current_stage,reject_reason",
+ "screening_question_answers.question,job,reject_reason",
+ "screening_question_answers.question,reject_reason",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/async_passthrough/client.py b/src/merge/resources/ats/resources/async_passthrough/client.py
index 6dee374e..818cc9ed 100644
--- a/src/merge/resources/ats/resources/async_passthrough/client.py
+++ b/src/merge/resources/ats/resources/async_passthrough/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+from ...types.data_passthrough_request import DataPassthroughRequest
from .....core.request_options import RequestOptions
from ...types.async_passthrough_reciept import AsyncPassthroughReciept
-from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.remote_response import RemoteResponse
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -40,8 +40,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.ats import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.ats import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,17 +49,27 @@ def create(
)
client.ats.async_passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "ats/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,7 +95,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -100,9 +110,15 @@ def retrieve(
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,26 +149,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.ats import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.ats import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.async_passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.ats.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "ats/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -178,24 +212,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.async_passthrough.retrieve(
- async_passthrough_receipt_id="async_passthrough_receipt_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/async-passthrough/{jsonable_encoder(async_passthrough_receipt_id)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/attachments/client.py b/src/merge/resources/ats/resources/attachments/client.py
index 11c5393b..5f968df1 100644
--- a/src/merge/resources/ats/resources/attachments/client.py
+++ b/src/merge/resources/ats/resources/attachments/client.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_attachment_list import PaginatedAttachmentList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.attachment import Attachment
from ...types.attachment_request import AttachmentRequest
from ...types.attachment_response import AttachmentResponse
+from ...types.attachment import Attachment
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.meta_response import MetaResponse
-from ...types.paginated_attachment_list import PaginatedAttachmentList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -96,7 +96,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -124,9 +124,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAttachmentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAttachmentList,
+ parse_obj_as(
+ type_=PaginatedAttachmentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -166,7 +172,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ats import AttachmentRequest
client = Merge(
@@ -181,14 +187,26 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/attachments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AttachmentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AttachmentResponse,
+ parse_obj_as(
+ type_=AttachmentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -233,7 +251,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -254,9 +272,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Attachment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Attachment,
+ parse_obj_as(
+ type_=Attachment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -278,7 +302,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -287,11 +311,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.ats.attachments.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/attachments/meta/post", method="GET", request_options=request_options
+ "ats/v1/attachments/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -374,13 +406,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.attachments.list()
+
+
+ async def main() -> None:
+ await client.ats.attachments.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/attachments",
@@ -402,9 +442,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAttachmentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAttachmentList,
+ parse_obj_as(
+ type_=PaginatedAttachmentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -444,29 +490,49 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ats import AttachmentRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.attachments.create(
- model=AttachmentRequest(),
- remote_user_id="remote_user_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.attachments.create(
+ model=AttachmentRequest(),
+ remote_user_id="remote_user_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/attachments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AttachmentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AttachmentResponse,
+ parse_obj_as(
+ type_=AttachmentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -511,15 +577,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.attachments.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.attachments.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/attachments/{jsonable_encoder(id)}",
@@ -532,9 +606,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Attachment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Attachment,
+ parse_obj_as(
+ type_=Attachment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -556,20 +636,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.attachments.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.attachments.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/attachments/meta/post", method="GET", request_options=request_options
+ "ats/v1/attachments/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/audit_trail/client.py b/src/merge/resources/ats/resources/audit_trail/client.py
index 5f431882..9c178d83 100644
--- a/src/merge/resources/ats/resources/audit_trail/client.py
+++ b/src/merge/resources/ats/resources/audit_trail/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AuditTrailClient:
@@ -23,7 +23,7 @@ def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -58,7 +58,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -79,9 +79,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -101,7 +107,7 @@ async def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -136,13 +142,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.audit_trail.list()
+
+
+ async def main() -> None:
+ await client.ats.audit_trail.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/audit-trail",
@@ -157,9 +171,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/available_actions/client.py b/src/merge/resources/ats/resources/available_actions/client.py
index fe2f1523..ec82dd01 100644
--- a/src/merge/resources/ats/resources/available_actions/client.py
+++ b/src/merge/resources/ats/resources/available_actions/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.available_actions import AvailableActions
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AvailableActionsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.ats.available_actions.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/available-actions", method="GET", request_options=request_options
+ "ats/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.available_actions.retrieve()
+
+
+ async def main() -> None:
+ await client.ats.available_actions.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/available-actions", method="GET", request_options=request_options
+ "ats/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/candidates/client.py b/src/merge/resources/ats/resources/candidates/client.py
index 4f462220..4c791961 100644
--- a/src/merge/resources/ats/resources/candidates/client.py
+++ b/src/merge/resources/ats/resources/candidates/client.py
@@ -1,24 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.candidates_list_request_expand import CandidatesListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_candidate_list import PaginatedCandidateList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.candidate import Candidate
from ...types.candidate_request import CandidateRequest
from ...types.candidate_response import CandidateResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_candidate_list import PaginatedCandidateList
+from .types.candidates_retrieve_request_expand import CandidatesRetrieveRequestExpand
+from ...types.candidate import Candidate
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.patched_candidate_request import PatchedCandidateRequest
from ...types.reason_enum import ReasonEnum
-from .types.candidates_list_request_expand import CandidatesListRequestExpand
-from .types.candidates_retrieve_request_expand import CandidatesRetrieveRequestExpand
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -104,7 +104,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -133,9 +133,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCandidateList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCandidateList,
+ parse_obj_as(
+ type_=PaginatedCandidateList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -175,7 +181,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ats import CandidateRequest
client = Merge(
@@ -190,14 +196,26 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/candidates",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CandidateResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CandidateResponse,
+ parse_obj_as(
+ type_=CandidateResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -234,7 +252,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -247,12 +265,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/candidates/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Candidate, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Candidate,
+ parse_obj_as(
+ type_=Candidate, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -295,7 +322,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ats import PatchedCandidateRequest
client = Merge(
@@ -311,14 +338,26 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/candidates/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CandidateResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CandidateResponse,
+ parse_obj_as(
+ type_=CandidateResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -352,8 +391,7 @@ def ignore_create(
Examples
--------
- from merge.client import Merge
- from merge.resources.ats import ReasonEnum
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -361,19 +399,22 @@ def ignore_create(
)
client.ats.candidates.ignore_create(
model_id="model_id",
- reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST,
+ reason="GENERAL_CUSTOMER_REQUEST",
)
"""
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/candidates/ignore/{jsonable_encoder(model_id)}",
method="POST",
- json={"reason": reason, "message": message},
+ json={
+ "reason": reason,
+ "message": message,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -397,7 +438,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -408,11 +449,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"ats/v1/candidates/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"ats/v1/candidates/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -434,7 +483,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -443,11 +492,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.ats.candidates.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/candidates/meta/post", method="GET", request_options=request_options
+ "ats/v1/candidates/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -534,13 +591,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.candidates.list()
+
+
+ async def main() -> None:
+ await client.ats.candidates.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/candidates",
@@ -563,9 +628,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCandidateList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCandidateList,
+ parse_obj_as(
+ type_=PaginatedCandidateList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -605,29 +676,49 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ats import CandidateRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.candidates.create(
- model=CandidateRequest(),
- remote_user_id="remote_user_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.candidates.create(
+ model=CandidateRequest(),
+ remote_user_id="remote_user_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/candidates",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CandidateResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CandidateResponse,
+ parse_obj_as(
+ type_=CandidateResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -664,25 +755,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.candidates.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.candidates.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/candidates/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Candidate, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Candidate,
+ parse_obj_as(
+ type_=Candidate, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -725,30 +833,50 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ats import PatchedCandidateRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.candidates.partial_update(
- id="id",
- model=PatchedCandidateRequest(),
- remote_user_id="remote_user_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.candidates.partial_update(
+ id="id",
+ model=PatchedCandidateRequest(),
+ remote_user_id="remote_user_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/candidates/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CandidateResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CandidateResponse,
+ parse_obj_as(
+ type_=CandidateResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -782,28 +910,38 @@ async def ignore_create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.ats import ReasonEnum
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.candidates.ignore_create(
- model_id="model_id",
- reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST,
- )
+
+
+ async def main() -> None:
+ await client.ats.candidates.ignore_create(
+ model_id="model_id",
+ reason="GENERAL_CUSTOMER_REQUEST",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/candidates/ignore/{jsonable_encoder(model_id)}",
method="POST",
- json={"reason": reason, "message": message},
+ json={
+ "reason": reason,
+ "message": message,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -829,22 +967,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.candidates.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.candidates.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"ats/v1/candidates/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"ats/v1/candidates/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -866,20 +1020,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.candidates.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.candidates.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/candidates/meta/post", method="GET", request_options=request_options
+ "ats/v1/candidates/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/candidates/types/candidates_list_request_expand.py b/src/merge/resources/ats/resources/candidates/types/candidates_list_request_expand.py
index 3d234138..e232edb1 100644
--- a/src/merge/resources/ats/resources/candidates/types/candidates_list_request_expand.py
+++ b/src/merge/resources/ats/resources/candidates/types/candidates_list_request_expand.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CandidatesListRequestExpand(str, enum.Enum):
- APPLICATIONS = "applications"
- APPLICATIONS_ATTACHMENTS = "applications,attachments"
- ATTACHMENTS = "attachments"
-
- def visit(
- self,
- applications: typing.Callable[[], T_Result],
- applications_attachments: typing.Callable[[], T_Result],
- attachments: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CandidatesListRequestExpand.APPLICATIONS:
- return applications()
- if self is CandidatesListRequestExpand.APPLICATIONS_ATTACHMENTS:
- return applications_attachments()
- if self is CandidatesListRequestExpand.ATTACHMENTS:
- return attachments()
+CandidatesListRequestExpand = typing.Union[
+ typing.Literal["applications", "applications,attachments", "attachments"], typing.Any
+]
diff --git a/src/merge/resources/ats/resources/candidates/types/candidates_retrieve_request_expand.py b/src/merge/resources/ats/resources/candidates/types/candidates_retrieve_request_expand.py
index 20a7a734..700a8f5a 100644
--- a/src/merge/resources/ats/resources/candidates/types/candidates_retrieve_request_expand.py
+++ b/src/merge/resources/ats/resources/candidates/types/candidates_retrieve_request_expand.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CandidatesRetrieveRequestExpand(str, enum.Enum):
- APPLICATIONS = "applications"
- APPLICATIONS_ATTACHMENTS = "applications,attachments"
- ATTACHMENTS = "attachments"
-
- def visit(
- self,
- applications: typing.Callable[[], T_Result],
- applications_attachments: typing.Callable[[], T_Result],
- attachments: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CandidatesRetrieveRequestExpand.APPLICATIONS:
- return applications()
- if self is CandidatesRetrieveRequestExpand.APPLICATIONS_ATTACHMENTS:
- return applications_attachments()
- if self is CandidatesRetrieveRequestExpand.ATTACHMENTS:
- return attachments()
+CandidatesRetrieveRequestExpand = typing.Union[
+ typing.Literal["applications", "applications,attachments", "attachments"], typing.Any
+]
diff --git a/src/merge/resources/ats/resources/delete_account/client.py b/src/merge/resources/ats/resources/delete_account/client.py
index 178b5f05..9b2967c5 100644
--- a/src/merge/resources/ats/resources/delete_account/client.py
+++ b/src/merge/resources/ats/resources/delete_account/client.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
+from .....core.request_options import RequestOptions
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import AsyncClientWrapper
class DeleteAccountClient:
@@ -27,7 +27,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -36,11 +36,13 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
client.ats.delete_account.delete()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/delete-account", method="POST", request_options=request_options
+ "ats/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -66,20 +68,30 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.delete_account.delete()
+
+
+ async def main() -> None:
+ await client.ats.delete_account.delete()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/delete-account", method="POST", request_options=request_options
+ "ats/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/departments/client.py b/src/merge/resources/ats/resources/departments/client.py
index 6d7ac2a1..832f45cf 100644
--- a/src/merge/resources/ats/resources/departments/client.py
+++ b/src/merge/resources/ats/resources/departments/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_department_list import PaginatedDepartmentList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.department import Department
-from ...types.paginated_department_list import PaginatedDepartmentList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class DepartmentsClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedDepartmentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedDepartmentList,
+ parse_obj_as(
+ type_=PaginatedDepartmentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/departments/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Department, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Department,
+ parse_obj_as(
+ type_=Department, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.departments.list()
+
+
+ async def main() -> None:
+ await client.ats.departments.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/departments",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedDepartmentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedDepartmentList,
+ parse_obj_as(
+ type_=PaginatedDepartmentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.departments.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.departments.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/departments/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Department, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Department,
+ parse_obj_as(
+ type_=Department, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/eeocs/client.py b/src/merge/resources/ats/resources/eeocs/client.py
index 7e3a1ced..54fc1165 100644
--- a/src/merge/resources/ats/resources/eeocs/client.py
+++ b/src/merge/resources/ats/resources/eeocs/client.py
@@ -1,21 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.eeoc import Eeoc
-from ...types.paginated_eeoc_list import PaginatedEeocList
+import datetime as dt
from .types.eeocs_list_request_remote_fields import EeocsListRequestRemoteFields
from .types.eeocs_list_request_show_enum_origins import EeocsListRequestShowEnumOrigins
+from .....core.request_options import RequestOptions
+from ...types.paginated_eeoc_list import PaginatedEeocList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.eeocs_retrieve_request_remote_fields import EeocsRetrieveRequestRemoteFields
from .types.eeocs_retrieve_request_show_enum_origins import EeocsRetrieveRequestShowEnumOrigins
+from ...types.eeoc import Eeoc
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class EeocsClient:
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -122,9 +122,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEeocList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEeocList,
+ parse_obj_as(
+ type_=PaginatedEeocList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -169,7 +175,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -190,9 +196,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Eeoc, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Eeoc,
+ parse_obj_as(
+ type_=Eeoc, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -275,13 +287,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.eeocs.list()
+
+
+ async def main() -> None:
+ await client.ats.eeocs.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/eeocs",
@@ -303,9 +323,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEeocList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEeocList,
+ parse_obj_as(
+ type_=PaginatedEeocList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -350,15 +376,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.eeocs.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.eeocs.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/eeocs/{jsonable_encoder(id)}",
@@ -371,9 +405,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Eeoc, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Eeoc,
+ parse_obj_as(
+ type_=Eeoc, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/eeocs/types/eeocs_list_request_remote_fields.py b/src/merge/resources/ats/resources/eeocs/types/eeocs_list_request_remote_fields.py
index 97aa5294..de12e4b5 100644
--- a/src/merge/resources/ats/resources/eeocs/types/eeocs_list_request_remote_fields.py
+++ b/src/merge/resources/ats/resources/eeocs/types/eeocs_list_request_remote_fields.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EeocsListRequestRemoteFields(str, enum.Enum):
- DISABILITY_STATUS = "disability_status"
- DISABILITY_STATUS_GENDER = "disability_status,gender"
- DISABILITY_STATUS_GENDER_RACE = "disability_status,gender,race"
- DISABILITY_STATUS_GENDER_RACE_VETERAN_STATUS = "disability_status,gender,race,veteran_status"
- DISABILITY_STATUS_GENDER_VETERAN_STATUS = "disability_status,gender,veteran_status"
- DISABILITY_STATUS_RACE = "disability_status,race"
- DISABILITY_STATUS_RACE_VETERAN_STATUS = "disability_status,race,veteran_status"
- DISABILITY_STATUS_VETERAN_STATUS = "disability_status,veteran_status"
- GENDER = "gender"
- GENDER_RACE = "gender,race"
- GENDER_RACE_VETERAN_STATUS = "gender,race,veteran_status"
- GENDER_VETERAN_STATUS = "gender,veteran_status"
- RACE = "race"
- RACE_VETERAN_STATUS = "race,veteran_status"
- VETERAN_STATUS = "veteran_status"
-
- def visit(
- self,
- disability_status: typing.Callable[[], T_Result],
- disability_status_gender: typing.Callable[[], T_Result],
- disability_status_gender_race: typing.Callable[[], T_Result],
- disability_status_gender_race_veteran_status: typing.Callable[[], T_Result],
- disability_status_gender_veteran_status: typing.Callable[[], T_Result],
- disability_status_race: typing.Callable[[], T_Result],
- disability_status_race_veteran_status: typing.Callable[[], T_Result],
- disability_status_veteran_status: typing.Callable[[], T_Result],
- gender: typing.Callable[[], T_Result],
- gender_race: typing.Callable[[], T_Result],
- gender_race_veteran_status: typing.Callable[[], T_Result],
- gender_veteran_status: typing.Callable[[], T_Result],
- race: typing.Callable[[], T_Result],
- race_veteran_status: typing.Callable[[], T_Result],
- veteran_status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EeocsListRequestRemoteFields.DISABILITY_STATUS:
- return disability_status()
- if self is EeocsListRequestRemoteFields.DISABILITY_STATUS_GENDER:
- return disability_status_gender()
- if self is EeocsListRequestRemoteFields.DISABILITY_STATUS_GENDER_RACE:
- return disability_status_gender_race()
- if self is EeocsListRequestRemoteFields.DISABILITY_STATUS_GENDER_RACE_VETERAN_STATUS:
- return disability_status_gender_race_veteran_status()
- if self is EeocsListRequestRemoteFields.DISABILITY_STATUS_GENDER_VETERAN_STATUS:
- return disability_status_gender_veteran_status()
- if self is EeocsListRequestRemoteFields.DISABILITY_STATUS_RACE:
- return disability_status_race()
- if self is EeocsListRequestRemoteFields.DISABILITY_STATUS_RACE_VETERAN_STATUS:
- return disability_status_race_veteran_status()
- if self is EeocsListRequestRemoteFields.DISABILITY_STATUS_VETERAN_STATUS:
- return disability_status_veteran_status()
- if self is EeocsListRequestRemoteFields.GENDER:
- return gender()
- if self is EeocsListRequestRemoteFields.GENDER_RACE:
- return gender_race()
- if self is EeocsListRequestRemoteFields.GENDER_RACE_VETERAN_STATUS:
- return gender_race_veteran_status()
- if self is EeocsListRequestRemoteFields.GENDER_VETERAN_STATUS:
- return gender_veteran_status()
- if self is EeocsListRequestRemoteFields.RACE:
- return race()
- if self is EeocsListRequestRemoteFields.RACE_VETERAN_STATUS:
- return race_veteran_status()
- if self is EeocsListRequestRemoteFields.VETERAN_STATUS:
- return veteran_status()
+EeocsListRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "disability_status",
+ "disability_status,gender",
+ "disability_status,gender,race",
+ "disability_status,gender,race,veteran_status",
+ "disability_status,gender,veteran_status",
+ "disability_status,race",
+ "disability_status,race,veteran_status",
+ "disability_status,veteran_status",
+ "gender",
+ "gender,race",
+ "gender,race,veteran_status",
+ "gender,veteran_status",
+ "race",
+ "race,veteran_status",
+ "veteran_status",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/eeocs/types/eeocs_list_request_show_enum_origins.py b/src/merge/resources/ats/resources/eeocs/types/eeocs_list_request_show_enum_origins.py
index 0955f416..32d3d2f3 100644
--- a/src/merge/resources/ats/resources/eeocs/types/eeocs_list_request_show_enum_origins.py
+++ b/src/merge/resources/ats/resources/eeocs/types/eeocs_list_request_show_enum_origins.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EeocsListRequestShowEnumOrigins(str, enum.Enum):
- DISABILITY_STATUS = "disability_status"
- DISABILITY_STATUS_GENDER = "disability_status,gender"
- DISABILITY_STATUS_GENDER_RACE = "disability_status,gender,race"
- DISABILITY_STATUS_GENDER_RACE_VETERAN_STATUS = "disability_status,gender,race,veteran_status"
- DISABILITY_STATUS_GENDER_VETERAN_STATUS = "disability_status,gender,veteran_status"
- DISABILITY_STATUS_RACE = "disability_status,race"
- DISABILITY_STATUS_RACE_VETERAN_STATUS = "disability_status,race,veteran_status"
- DISABILITY_STATUS_VETERAN_STATUS = "disability_status,veteran_status"
- GENDER = "gender"
- GENDER_RACE = "gender,race"
- GENDER_RACE_VETERAN_STATUS = "gender,race,veteran_status"
- GENDER_VETERAN_STATUS = "gender,veteran_status"
- RACE = "race"
- RACE_VETERAN_STATUS = "race,veteran_status"
- VETERAN_STATUS = "veteran_status"
-
- def visit(
- self,
- disability_status: typing.Callable[[], T_Result],
- disability_status_gender: typing.Callable[[], T_Result],
- disability_status_gender_race: typing.Callable[[], T_Result],
- disability_status_gender_race_veteran_status: typing.Callable[[], T_Result],
- disability_status_gender_veteran_status: typing.Callable[[], T_Result],
- disability_status_race: typing.Callable[[], T_Result],
- disability_status_race_veteran_status: typing.Callable[[], T_Result],
- disability_status_veteran_status: typing.Callable[[], T_Result],
- gender: typing.Callable[[], T_Result],
- gender_race: typing.Callable[[], T_Result],
- gender_race_veteran_status: typing.Callable[[], T_Result],
- gender_veteran_status: typing.Callable[[], T_Result],
- race: typing.Callable[[], T_Result],
- race_veteran_status: typing.Callable[[], T_Result],
- veteran_status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EeocsListRequestShowEnumOrigins.DISABILITY_STATUS:
- return disability_status()
- if self is EeocsListRequestShowEnumOrigins.DISABILITY_STATUS_GENDER:
- return disability_status_gender()
- if self is EeocsListRequestShowEnumOrigins.DISABILITY_STATUS_GENDER_RACE:
- return disability_status_gender_race()
- if self is EeocsListRequestShowEnumOrigins.DISABILITY_STATUS_GENDER_RACE_VETERAN_STATUS:
- return disability_status_gender_race_veteran_status()
- if self is EeocsListRequestShowEnumOrigins.DISABILITY_STATUS_GENDER_VETERAN_STATUS:
- return disability_status_gender_veteran_status()
- if self is EeocsListRequestShowEnumOrigins.DISABILITY_STATUS_RACE:
- return disability_status_race()
- if self is EeocsListRequestShowEnumOrigins.DISABILITY_STATUS_RACE_VETERAN_STATUS:
- return disability_status_race_veteran_status()
- if self is EeocsListRequestShowEnumOrigins.DISABILITY_STATUS_VETERAN_STATUS:
- return disability_status_veteran_status()
- if self is EeocsListRequestShowEnumOrigins.GENDER:
- return gender()
- if self is EeocsListRequestShowEnumOrigins.GENDER_RACE:
- return gender_race()
- if self is EeocsListRequestShowEnumOrigins.GENDER_RACE_VETERAN_STATUS:
- return gender_race_veteran_status()
- if self is EeocsListRequestShowEnumOrigins.GENDER_VETERAN_STATUS:
- return gender_veteran_status()
- if self is EeocsListRequestShowEnumOrigins.RACE:
- return race()
- if self is EeocsListRequestShowEnumOrigins.RACE_VETERAN_STATUS:
- return race_veteran_status()
- if self is EeocsListRequestShowEnumOrigins.VETERAN_STATUS:
- return veteran_status()
+EeocsListRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "disability_status",
+ "disability_status,gender",
+ "disability_status,gender,race",
+ "disability_status,gender,race,veteran_status",
+ "disability_status,gender,veteran_status",
+ "disability_status,race",
+ "disability_status,race,veteran_status",
+ "disability_status,veteran_status",
+ "gender",
+ "gender,race",
+ "gender,race,veteran_status",
+ "gender,veteran_status",
+ "race",
+ "race,veteran_status",
+ "veteran_status",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/eeocs/types/eeocs_retrieve_request_remote_fields.py b/src/merge/resources/ats/resources/eeocs/types/eeocs_retrieve_request_remote_fields.py
index 7c69e5bc..337c7aa3 100644
--- a/src/merge/resources/ats/resources/eeocs/types/eeocs_retrieve_request_remote_fields.py
+++ b/src/merge/resources/ats/resources/eeocs/types/eeocs_retrieve_request_remote_fields.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EeocsRetrieveRequestRemoteFields(str, enum.Enum):
- DISABILITY_STATUS = "disability_status"
- DISABILITY_STATUS_GENDER = "disability_status,gender"
- DISABILITY_STATUS_GENDER_RACE = "disability_status,gender,race"
- DISABILITY_STATUS_GENDER_RACE_VETERAN_STATUS = "disability_status,gender,race,veteran_status"
- DISABILITY_STATUS_GENDER_VETERAN_STATUS = "disability_status,gender,veteran_status"
- DISABILITY_STATUS_RACE = "disability_status,race"
- DISABILITY_STATUS_RACE_VETERAN_STATUS = "disability_status,race,veteran_status"
- DISABILITY_STATUS_VETERAN_STATUS = "disability_status,veteran_status"
- GENDER = "gender"
- GENDER_RACE = "gender,race"
- GENDER_RACE_VETERAN_STATUS = "gender,race,veteran_status"
- GENDER_VETERAN_STATUS = "gender,veteran_status"
- RACE = "race"
- RACE_VETERAN_STATUS = "race,veteran_status"
- VETERAN_STATUS = "veteran_status"
-
- def visit(
- self,
- disability_status: typing.Callable[[], T_Result],
- disability_status_gender: typing.Callable[[], T_Result],
- disability_status_gender_race: typing.Callable[[], T_Result],
- disability_status_gender_race_veteran_status: typing.Callable[[], T_Result],
- disability_status_gender_veteran_status: typing.Callable[[], T_Result],
- disability_status_race: typing.Callable[[], T_Result],
- disability_status_race_veteran_status: typing.Callable[[], T_Result],
- disability_status_veteran_status: typing.Callable[[], T_Result],
- gender: typing.Callable[[], T_Result],
- gender_race: typing.Callable[[], T_Result],
- gender_race_veteran_status: typing.Callable[[], T_Result],
- gender_veteran_status: typing.Callable[[], T_Result],
- race: typing.Callable[[], T_Result],
- race_veteran_status: typing.Callable[[], T_Result],
- veteran_status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS:
- return disability_status()
- if self is EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS_GENDER:
- return disability_status_gender()
- if self is EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS_GENDER_RACE:
- return disability_status_gender_race()
- if self is EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS_GENDER_RACE_VETERAN_STATUS:
- return disability_status_gender_race_veteran_status()
- if self is EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS_GENDER_VETERAN_STATUS:
- return disability_status_gender_veteran_status()
- if self is EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS_RACE:
- return disability_status_race()
- if self is EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS_RACE_VETERAN_STATUS:
- return disability_status_race_veteran_status()
- if self is EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS_VETERAN_STATUS:
- return disability_status_veteran_status()
- if self is EeocsRetrieveRequestRemoteFields.GENDER:
- return gender()
- if self is EeocsRetrieveRequestRemoteFields.GENDER_RACE:
- return gender_race()
- if self is EeocsRetrieveRequestRemoteFields.GENDER_RACE_VETERAN_STATUS:
- return gender_race_veteran_status()
- if self is EeocsRetrieveRequestRemoteFields.GENDER_VETERAN_STATUS:
- return gender_veteran_status()
- if self is EeocsRetrieveRequestRemoteFields.RACE:
- return race()
- if self is EeocsRetrieveRequestRemoteFields.RACE_VETERAN_STATUS:
- return race_veteran_status()
- if self is EeocsRetrieveRequestRemoteFields.VETERAN_STATUS:
- return veteran_status()
+EeocsRetrieveRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "disability_status",
+ "disability_status,gender",
+ "disability_status,gender,race",
+ "disability_status,gender,race,veteran_status",
+ "disability_status,gender,veteran_status",
+ "disability_status,race",
+ "disability_status,race,veteran_status",
+ "disability_status,veteran_status",
+ "gender",
+ "gender,race",
+ "gender,race,veteran_status",
+ "gender,veteran_status",
+ "race",
+ "race,veteran_status",
+ "veteran_status",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/eeocs/types/eeocs_retrieve_request_show_enum_origins.py b/src/merge/resources/ats/resources/eeocs/types/eeocs_retrieve_request_show_enum_origins.py
index 6ee784a3..7e338e41 100644
--- a/src/merge/resources/ats/resources/eeocs/types/eeocs_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/ats/resources/eeocs/types/eeocs_retrieve_request_show_enum_origins.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EeocsRetrieveRequestShowEnumOrigins(str, enum.Enum):
- DISABILITY_STATUS = "disability_status"
- DISABILITY_STATUS_GENDER = "disability_status,gender"
- DISABILITY_STATUS_GENDER_RACE = "disability_status,gender,race"
- DISABILITY_STATUS_GENDER_RACE_VETERAN_STATUS = "disability_status,gender,race,veteran_status"
- DISABILITY_STATUS_GENDER_VETERAN_STATUS = "disability_status,gender,veteran_status"
- DISABILITY_STATUS_RACE = "disability_status,race"
- DISABILITY_STATUS_RACE_VETERAN_STATUS = "disability_status,race,veteran_status"
- DISABILITY_STATUS_VETERAN_STATUS = "disability_status,veteran_status"
- GENDER = "gender"
- GENDER_RACE = "gender,race"
- GENDER_RACE_VETERAN_STATUS = "gender,race,veteran_status"
- GENDER_VETERAN_STATUS = "gender,veteran_status"
- RACE = "race"
- RACE_VETERAN_STATUS = "race,veteran_status"
- VETERAN_STATUS = "veteran_status"
-
- def visit(
- self,
- disability_status: typing.Callable[[], T_Result],
- disability_status_gender: typing.Callable[[], T_Result],
- disability_status_gender_race: typing.Callable[[], T_Result],
- disability_status_gender_race_veteran_status: typing.Callable[[], T_Result],
- disability_status_gender_veteran_status: typing.Callable[[], T_Result],
- disability_status_race: typing.Callable[[], T_Result],
- disability_status_race_veteran_status: typing.Callable[[], T_Result],
- disability_status_veteran_status: typing.Callable[[], T_Result],
- gender: typing.Callable[[], T_Result],
- gender_race: typing.Callable[[], T_Result],
- gender_race_veteran_status: typing.Callable[[], T_Result],
- gender_veteran_status: typing.Callable[[], T_Result],
- race: typing.Callable[[], T_Result],
- race_veteran_status: typing.Callable[[], T_Result],
- veteran_status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS:
- return disability_status()
- if self is EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS_GENDER:
- return disability_status_gender()
- if self is EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS_GENDER_RACE:
- return disability_status_gender_race()
- if self is EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS_GENDER_RACE_VETERAN_STATUS:
- return disability_status_gender_race_veteran_status()
- if self is EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS_GENDER_VETERAN_STATUS:
- return disability_status_gender_veteran_status()
- if self is EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS_RACE:
- return disability_status_race()
- if self is EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS_RACE_VETERAN_STATUS:
- return disability_status_race_veteran_status()
- if self is EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS_VETERAN_STATUS:
- return disability_status_veteran_status()
- if self is EeocsRetrieveRequestShowEnumOrigins.GENDER:
- return gender()
- if self is EeocsRetrieveRequestShowEnumOrigins.GENDER_RACE:
- return gender_race()
- if self is EeocsRetrieveRequestShowEnumOrigins.GENDER_RACE_VETERAN_STATUS:
- return gender_race_veteran_status()
- if self is EeocsRetrieveRequestShowEnumOrigins.GENDER_VETERAN_STATUS:
- return gender_veteran_status()
- if self is EeocsRetrieveRequestShowEnumOrigins.RACE:
- return race()
- if self is EeocsRetrieveRequestShowEnumOrigins.RACE_VETERAN_STATUS:
- return race_veteran_status()
- if self is EeocsRetrieveRequestShowEnumOrigins.VETERAN_STATUS:
- return veteran_status()
+EeocsRetrieveRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "disability_status",
+ "disability_status,gender",
+ "disability_status,gender,race",
+ "disability_status,gender,race,veteran_status",
+ "disability_status,gender,veteran_status",
+ "disability_status,race",
+ "disability_status,race,veteran_status",
+ "disability_status,veteran_status",
+ "gender",
+ "gender,race",
+ "gender,race,veteran_status",
+ "gender,veteran_status",
+ "race",
+ "race,veteran_status",
+ "veteran_status",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/field_mapping/client.py b/src/merge/resources/ats/resources/field_mapping/client.py
index 0869239c..2f96943b 100644
--- a/src/merge/resources/ats/resources/field_mapping/client.py
+++ b/src/merge/resources/ats/resources/field_mapping/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
-from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
from ...types.field_mapping_api_instance_response import FieldMappingApiInstanceResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.field_mapping_instance_response import FieldMappingInstanceResponse
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.remote_field_api_response import RemoteFieldApiResponse
+from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -39,7 +39,7 @@ def field_mappings_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,11 +48,19 @@ def field_mappings_retrieve(
client.ats.field_mapping.field_mappings_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/field-mappings", method="GET", request_options=request_options
+ "ats/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -63,7 +71,7 @@ def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -80,7 +88,7 @@ def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -102,7 +110,7 @@ def field_mappings_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -131,9 +139,15 @@ def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -159,7 +173,7 @@ def field_mappings_destroy(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -174,9 +188,15 @@ def field_mappings_destroy(
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,7 +206,7 @@ def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -198,7 +218,7 @@ def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -217,7 +237,7 @@ def field_mappings_partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -238,9 +258,15 @@ def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -274,7 +300,7 @@ def remote_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -285,12 +311,21 @@ def remote_fields_retrieve(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -314,7 +349,7 @@ def target_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -323,11 +358,19 @@ def target_fields_retrieve(
client.ats.field_mapping.target_fields_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/target-fields", method="GET", request_options=request_options
+ "ats/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -356,20 +399,36 @@ async def field_mappings_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.field_mapping.field_mappings_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.field_mapping.field_mappings_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/field-mappings", method="GET", request_options=request_options
+ "ats/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -380,7 +439,7 @@ async def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -397,7 +456,7 @@ async def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -419,20 +478,28 @@ async def field_mappings_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.field_mapping.field_mappings_create(
- target_field_name="example_target_field_name",
- target_field_description="this is a example description of the target field",
- remote_field_traversal_path=["example_remote_field"],
- remote_method="GET",
- remote_url_path="/example-url-path",
- common_model_name="ExampleCommonModel",
- )
+
+
+ async def main() -> None:
+ await client.ats.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/field-mappings",
@@ -448,9 +515,15 @@ async def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -476,24 +549,38 @@ async def field_mappings_destroy(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.field_mapping.field_mappings_destroy(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -503,7 +590,7 @@ async def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -515,7 +602,7 @@ async def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -534,15 +621,23 @@ async def field_mappings_partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.field_mapping.field_mappings_partial_update(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
@@ -555,9 +650,15 @@ async def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -591,23 +692,40 @@ async def remote_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.field_mapping.remote_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.field_mapping.remote_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -631,20 +749,36 @@ async def target_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.field_mapping.target_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.field_mapping.target_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/target-fields", method="GET", request_options=request_options
+ "ats/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/force_resync/client.py b/src/merge/resources/ats/resources/force_resync/client.py
index 7d89e48e..1a43f649 100644
--- a/src/merge/resources/ats/resources/force_resync/client.py
+++ b/src/merge/resources/ats/resources/force_resync/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.sync_status import SyncStatus
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class ForceResyncClient:
@@ -32,7 +32,7 @@ def sync_status_resync_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -41,11 +41,19 @@ def sync_status_resync_create(
client.ats.force_resync.sync_status_resync_create()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/sync-status/resync", method="POST", request_options=request_options
+ "ats/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,20 +82,36 @@ async def sync_status_resync_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.force_resync.sync_status_resync_create()
+
+
+ async def main() -> None:
+ await client.ats.force_resync.sync_status_resync_create()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/sync-status/resync", method="POST", request_options=request_options
+ "ats/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/generate_key/client.py b/src/merge/resources/ats/resources/generate_key/client.py
index d831f4e4..38f41b13 100644
--- a/src/merge/resources/ats/resources/generate_key/client.py
+++ b/src/merge/resources/ats/resources/generate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,11 +47,23 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "ats/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,22 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.generate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.ats.generate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "ats/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/interviews/client.py b/src/merge/resources/ats/resources/interviews/client.py
index c8bd88fd..6cea6dfe 100644
--- a/src/merge/resources/ats/resources/interviews/client.py
+++ b/src/merge/resources/ats/resources/interviews/client.py
@@ -1,22 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.interviews_list_request_expand import InterviewsListRequestExpand
from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
from ...types.paginated_scheduled_interview_list import PaginatedScheduledInterviewList
-from ...types.scheduled_interview import ScheduledInterview
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.scheduled_interview_request import ScheduledInterviewRequest
from ...types.scheduled_interview_response import ScheduledInterviewResponse
-from .types.interviews_list_request_expand import InterviewsListRequestExpand
from .types.interviews_retrieve_request_expand import InterviewsRetrieveRequestExpand
+from ...types.scheduled_interview import ScheduledInterview
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -110,7 +110,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -141,9 +141,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedScheduledInterviewList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedScheduledInterviewList,
+ parse_obj_as(
+ type_=PaginatedScheduledInterviewList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -183,7 +189,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ats import ScheduledInterviewRequest
client = Merge(
@@ -198,14 +204,26 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/interviews",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ScheduledInterviewResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ScheduledInterviewResponse,
+ parse_obj_as(
+ type_=ScheduledInterviewResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -250,7 +268,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -271,9 +289,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ScheduledInterview, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ScheduledInterview,
+ parse_obj_as(
+ type_=ScheduledInterview, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -295,7 +319,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -304,11 +328,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.ats.interviews.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/interviews/meta/post", method="GET", request_options=request_options
+ "ats/v1/interviews/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -403,13 +435,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.interviews.list()
+
+
+ async def main() -> None:
+ await client.ats.interviews.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/interviews",
@@ -434,9 +474,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedScheduledInterviewList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedScheduledInterviewList,
+ parse_obj_as(
+ type_=PaginatedScheduledInterviewList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -476,29 +522,49 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ats import ScheduledInterviewRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.interviews.create(
- model=ScheduledInterviewRequest(),
- remote_user_id="remote_user_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.interviews.create(
+ model=ScheduledInterviewRequest(),
+ remote_user_id="remote_user_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/interviews",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model, "remote_user_id": remote_user_id},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ "remote_user_id": remote_user_id,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ScheduledInterviewResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ScheduledInterviewResponse,
+ parse_obj_as(
+ type_=ScheduledInterviewResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -543,15 +609,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.interviews.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.interviews.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/interviews/{jsonable_encoder(id)}",
@@ -564,9 +638,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ScheduledInterview, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ScheduledInterview,
+ parse_obj_as(
+ type_=ScheduledInterview, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -588,20 +668,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.interviews.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.interviews.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/interviews/meta/post", method="GET", request_options=request_options
+ "ats/v1/interviews/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/interviews/types/interviews_list_request_expand.py b/src/merge/resources/ats/resources/interviews/types/interviews_list_request_expand.py
index b2883326..6e09236e 100644
--- a/src/merge/resources/ats/resources/interviews/types/interviews_list_request_expand.py
+++ b/src/merge/resources/ats/resources/interviews/types/interviews_list_request_expand.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class InterviewsListRequestExpand(str, enum.Enum):
- APPLICATION = "application"
- APPLICATION_JOB_INTERVIEW_STAGE = "application,job_interview_stage"
- INTERVIEWERS = "interviewers"
- INTERVIEWERS_APPLICATION = "interviewers,application"
- INTERVIEWERS_APPLICATION_JOB_INTERVIEW_STAGE = "interviewers,application,job_interview_stage"
- INTERVIEWERS_JOB_INTERVIEW_STAGE = "interviewers,job_interview_stage"
- INTERVIEWERS_ORGANIZER = "interviewers,organizer"
- INTERVIEWERS_ORGANIZER_APPLICATION = "interviewers,organizer,application"
- INTERVIEWERS_ORGANIZER_APPLICATION_JOB_INTERVIEW_STAGE = "interviewers,organizer,application,job_interview_stage"
- INTERVIEWERS_ORGANIZER_JOB_INTERVIEW_STAGE = "interviewers,organizer,job_interview_stage"
- JOB_INTERVIEW_STAGE = "job_interview_stage"
- ORGANIZER = "organizer"
- ORGANIZER_APPLICATION = "organizer,application"
- ORGANIZER_APPLICATION_JOB_INTERVIEW_STAGE = "organizer,application,job_interview_stage"
- ORGANIZER_JOB_INTERVIEW_STAGE = "organizer,job_interview_stage"
-
- def visit(
- self,
- application: typing.Callable[[], T_Result],
- application_job_interview_stage: typing.Callable[[], T_Result],
- interviewers: typing.Callable[[], T_Result],
- interviewers_application: typing.Callable[[], T_Result],
- interviewers_application_job_interview_stage: typing.Callable[[], T_Result],
- interviewers_job_interview_stage: typing.Callable[[], T_Result],
- interviewers_organizer: typing.Callable[[], T_Result],
- interviewers_organizer_application: typing.Callable[[], T_Result],
- interviewers_organizer_application_job_interview_stage: typing.Callable[[], T_Result],
- interviewers_organizer_job_interview_stage: typing.Callable[[], T_Result],
- job_interview_stage: typing.Callable[[], T_Result],
- organizer: typing.Callable[[], T_Result],
- organizer_application: typing.Callable[[], T_Result],
- organizer_application_job_interview_stage: typing.Callable[[], T_Result],
- organizer_job_interview_stage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is InterviewsListRequestExpand.APPLICATION:
- return application()
- if self is InterviewsListRequestExpand.APPLICATION_JOB_INTERVIEW_STAGE:
- return application_job_interview_stage()
- if self is InterviewsListRequestExpand.INTERVIEWERS:
- return interviewers()
- if self is InterviewsListRequestExpand.INTERVIEWERS_APPLICATION:
- return interviewers_application()
- if self is InterviewsListRequestExpand.INTERVIEWERS_APPLICATION_JOB_INTERVIEW_STAGE:
- return interviewers_application_job_interview_stage()
- if self is InterviewsListRequestExpand.INTERVIEWERS_JOB_INTERVIEW_STAGE:
- return interviewers_job_interview_stage()
- if self is InterviewsListRequestExpand.INTERVIEWERS_ORGANIZER:
- return interviewers_organizer()
- if self is InterviewsListRequestExpand.INTERVIEWERS_ORGANIZER_APPLICATION:
- return interviewers_organizer_application()
- if self is InterviewsListRequestExpand.INTERVIEWERS_ORGANIZER_APPLICATION_JOB_INTERVIEW_STAGE:
- return interviewers_organizer_application_job_interview_stage()
- if self is InterviewsListRequestExpand.INTERVIEWERS_ORGANIZER_JOB_INTERVIEW_STAGE:
- return interviewers_organizer_job_interview_stage()
- if self is InterviewsListRequestExpand.JOB_INTERVIEW_STAGE:
- return job_interview_stage()
- if self is InterviewsListRequestExpand.ORGANIZER:
- return organizer()
- if self is InterviewsListRequestExpand.ORGANIZER_APPLICATION:
- return organizer_application()
- if self is InterviewsListRequestExpand.ORGANIZER_APPLICATION_JOB_INTERVIEW_STAGE:
- return organizer_application_job_interview_stage()
- if self is InterviewsListRequestExpand.ORGANIZER_JOB_INTERVIEW_STAGE:
- return organizer_job_interview_stage()
+InterviewsListRequestExpand = typing.Union[
+ typing.Literal[
+ "application",
+ "application,job_interview_stage",
+ "interviewers",
+ "interviewers,application",
+ "interviewers,application,job_interview_stage",
+ "interviewers,job_interview_stage",
+ "interviewers,organizer",
+ "interviewers,organizer,application",
+ "interviewers,organizer,application,job_interview_stage",
+ "interviewers,organizer,job_interview_stage",
+ "job_interview_stage",
+ "organizer",
+ "organizer,application",
+ "organizer,application,job_interview_stage",
+ "organizer,job_interview_stage",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/interviews/types/interviews_retrieve_request_expand.py b/src/merge/resources/ats/resources/interviews/types/interviews_retrieve_request_expand.py
index 874440e0..9fa2db2a 100644
--- a/src/merge/resources/ats/resources/interviews/types/interviews_retrieve_request_expand.py
+++ b/src/merge/resources/ats/resources/interviews/types/interviews_retrieve_request_expand.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class InterviewsRetrieveRequestExpand(str, enum.Enum):
- APPLICATION = "application"
- APPLICATION_JOB_INTERVIEW_STAGE = "application,job_interview_stage"
- INTERVIEWERS = "interviewers"
- INTERVIEWERS_APPLICATION = "interviewers,application"
- INTERVIEWERS_APPLICATION_JOB_INTERVIEW_STAGE = "interviewers,application,job_interview_stage"
- INTERVIEWERS_JOB_INTERVIEW_STAGE = "interviewers,job_interview_stage"
- INTERVIEWERS_ORGANIZER = "interviewers,organizer"
- INTERVIEWERS_ORGANIZER_APPLICATION = "interviewers,organizer,application"
- INTERVIEWERS_ORGANIZER_APPLICATION_JOB_INTERVIEW_STAGE = "interviewers,organizer,application,job_interview_stage"
- INTERVIEWERS_ORGANIZER_JOB_INTERVIEW_STAGE = "interviewers,organizer,job_interview_stage"
- JOB_INTERVIEW_STAGE = "job_interview_stage"
- ORGANIZER = "organizer"
- ORGANIZER_APPLICATION = "organizer,application"
- ORGANIZER_APPLICATION_JOB_INTERVIEW_STAGE = "organizer,application,job_interview_stage"
- ORGANIZER_JOB_INTERVIEW_STAGE = "organizer,job_interview_stage"
-
- def visit(
- self,
- application: typing.Callable[[], T_Result],
- application_job_interview_stage: typing.Callable[[], T_Result],
- interviewers: typing.Callable[[], T_Result],
- interviewers_application: typing.Callable[[], T_Result],
- interviewers_application_job_interview_stage: typing.Callable[[], T_Result],
- interviewers_job_interview_stage: typing.Callable[[], T_Result],
- interviewers_organizer: typing.Callable[[], T_Result],
- interviewers_organizer_application: typing.Callable[[], T_Result],
- interviewers_organizer_application_job_interview_stage: typing.Callable[[], T_Result],
- interviewers_organizer_job_interview_stage: typing.Callable[[], T_Result],
- job_interview_stage: typing.Callable[[], T_Result],
- organizer: typing.Callable[[], T_Result],
- organizer_application: typing.Callable[[], T_Result],
- organizer_application_job_interview_stage: typing.Callable[[], T_Result],
- organizer_job_interview_stage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is InterviewsRetrieveRequestExpand.APPLICATION:
- return application()
- if self is InterviewsRetrieveRequestExpand.APPLICATION_JOB_INTERVIEW_STAGE:
- return application_job_interview_stage()
- if self is InterviewsRetrieveRequestExpand.INTERVIEWERS:
- return interviewers()
- if self is InterviewsRetrieveRequestExpand.INTERVIEWERS_APPLICATION:
- return interviewers_application()
- if self is InterviewsRetrieveRequestExpand.INTERVIEWERS_APPLICATION_JOB_INTERVIEW_STAGE:
- return interviewers_application_job_interview_stage()
- if self is InterviewsRetrieveRequestExpand.INTERVIEWERS_JOB_INTERVIEW_STAGE:
- return interviewers_job_interview_stage()
- if self is InterviewsRetrieveRequestExpand.INTERVIEWERS_ORGANIZER:
- return interviewers_organizer()
- if self is InterviewsRetrieveRequestExpand.INTERVIEWERS_ORGANIZER_APPLICATION:
- return interviewers_organizer_application()
- if self is InterviewsRetrieveRequestExpand.INTERVIEWERS_ORGANIZER_APPLICATION_JOB_INTERVIEW_STAGE:
- return interviewers_organizer_application_job_interview_stage()
- if self is InterviewsRetrieveRequestExpand.INTERVIEWERS_ORGANIZER_JOB_INTERVIEW_STAGE:
- return interviewers_organizer_job_interview_stage()
- if self is InterviewsRetrieveRequestExpand.JOB_INTERVIEW_STAGE:
- return job_interview_stage()
- if self is InterviewsRetrieveRequestExpand.ORGANIZER:
- return organizer()
- if self is InterviewsRetrieveRequestExpand.ORGANIZER_APPLICATION:
- return organizer_application()
- if self is InterviewsRetrieveRequestExpand.ORGANIZER_APPLICATION_JOB_INTERVIEW_STAGE:
- return organizer_application_job_interview_stage()
- if self is InterviewsRetrieveRequestExpand.ORGANIZER_JOB_INTERVIEW_STAGE:
- return organizer_job_interview_stage()
+InterviewsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "application",
+ "application,job_interview_stage",
+ "interviewers",
+ "interviewers,application",
+ "interviewers,application,job_interview_stage",
+ "interviewers,job_interview_stage",
+ "interviewers,organizer",
+ "interviewers,organizer,application",
+ "interviewers,organizer,application,job_interview_stage",
+ "interviewers,organizer,job_interview_stage",
+ "job_interview_stage",
+ "organizer",
+ "organizer,application",
+ "organizer,application,job_interview_stage",
+ "organizer,job_interview_stage",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/issues/client.py b/src/merge/resources/ats/resources/issues/client.py
index 5b1598dc..00be8c36 100644
--- a/src/merge/resources/ats/resources/issues/client.py
+++ b/src/merge/resources/ats/resources/issues/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_issue_list import PaginatedIssueList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.issue import Issue
-from ...types.paginated_issue_list import PaginatedIssueList
-from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class IssuesClient:
@@ -95,7 +95,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -132,9 +132,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -158,7 +164,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -169,11 +175,19 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"ats/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"ats/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -260,13 +274,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.issues.list()
+
+
+ async def main() -> None:
+ await client.ats.issues.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/issues",
@@ -297,9 +319,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -323,22 +351,38 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.issues.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.issues.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"ats/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"ats/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/issues/types/issues_list_request_status.py b/src/merge/resources/ats/resources/issues/types/issues_list_request_status.py
index 2bd3521e..3886423c 100644
--- a/src/merge/resources/ats/resources/issues/types/issues_list_request_status.py
+++ b/src/merge/resources/ats/resources/issues/types/issues_list_request_status.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssuesListRequestStatus(str, enum.Enum):
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssuesListRequestStatus.ONGOING:
- return ongoing()
- if self is IssuesListRequestStatus.RESOLVED:
- return resolved()
+IssuesListRequestStatus = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/ats/resources/job_interview_stages/client.py b/src/merge/resources/ats/resources/job_interview_stages/client.py
index 68d266d1..328c1265 100644
--- a/src/merge/resources/ats/resources/job_interview_stages/client.py
+++ b/src/merge/resources/ats/resources/job_interview_stages/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_job_interview_stage_list import PaginatedJobInterviewStageList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.job_interview_stage import JobInterviewStage
-from ...types.paginated_job_interview_stage_list import PaginatedJobInterviewStageList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class JobInterviewStagesClient:
@@ -82,7 +82,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -108,9 +108,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedJobInterviewStageList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedJobInterviewStageList,
+ parse_obj_as(
+ type_=PaginatedJobInterviewStageList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -147,7 +153,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,12 +166,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/job-interview-stages/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(JobInterviewStage, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ JobInterviewStage,
+ parse_obj_as(
+ type_=JobInterviewStage, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -240,13 +255,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.job_interview_stages.list()
+
+
+ async def main() -> None:
+ await client.ats.job_interview_stages.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/job-interview-stages",
@@ -266,9 +289,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedJobInterviewStageList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedJobInterviewStageList,
+ parse_obj_as(
+ type_=PaginatedJobInterviewStageList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,25 +334,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.job_interview_stages.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.job_interview_stages.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/job-interview-stages/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(JobInterviewStage, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ JobInterviewStage,
+ parse_obj_as(
+ type_=JobInterviewStage, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/job_postings/client.py b/src/merge/resources/ats/resources/job_postings/client.py
index f0ab99ae..503008ba 100644
--- a/src/merge/resources/ats/resources/job_postings/client.py
+++ b/src/merge/resources/ats/resources/job_postings/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .types.job_postings_list_request_status import JobPostingsListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_job_posting_list import PaginatedJobPostingList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.job_posting import JobPosting
-from ...types.paginated_job_posting_list import PaginatedJobPostingList
-from .types.job_postings_list_request_status import JobPostingsListRequestStatus
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class JobPostingsClient:
@@ -89,7 +89,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -115,9 +115,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedJobPostingList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedJobPostingList,
+ parse_obj_as(
+ type_=PaginatedJobPostingList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -154,7 +160,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -167,12 +173,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/job-postings/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(JobPosting, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ JobPosting,
+ parse_obj_as(
+ type_=JobPosting, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -253,13 +268,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.job_postings.list()
+
+
+ async def main() -> None:
+ await client.ats.job_postings.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/job-postings",
@@ -279,9 +302,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedJobPostingList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedJobPostingList,
+ parse_obj_as(
+ type_=PaginatedJobPostingList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -318,25 +347,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.job_postings.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.job_postings.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/job-postings/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(JobPosting, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ JobPosting,
+ parse_obj_as(
+ type_=JobPosting, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/job_postings/types/job_postings_list_request_status.py b/src/merge/resources/ats/resources/job_postings/types/job_postings_list_request_status.py
index adbba7ee..39069843 100644
--- a/src/merge/resources/ats/resources/job_postings/types/job_postings_list_request_status.py
+++ b/src/merge/resources/ats/resources/job_postings/types/job_postings_list_request_status.py
@@ -1,33 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JobPostingsListRequestStatus(str, enum.Enum):
- CLOSED = "CLOSED"
- DRAFT = "DRAFT"
- INTERNAL = "INTERNAL"
- PENDING = "PENDING"
- PUBLISHED = "PUBLISHED"
-
- def visit(
- self,
- closed: typing.Callable[[], T_Result],
- draft: typing.Callable[[], T_Result],
- internal: typing.Callable[[], T_Result],
- pending: typing.Callable[[], T_Result],
- published: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JobPostingsListRequestStatus.CLOSED:
- return closed()
- if self is JobPostingsListRequestStatus.DRAFT:
- return draft()
- if self is JobPostingsListRequestStatus.INTERNAL:
- return internal()
- if self is JobPostingsListRequestStatus.PENDING:
- return pending()
- if self is JobPostingsListRequestStatus.PUBLISHED:
- return published()
+JobPostingsListRequestStatus = typing.Union[
+ typing.Literal["CLOSED", "DRAFT", "INTERNAL", "PENDING", "PUBLISHED"], typing.Any
+]
diff --git a/src/merge/resources/ats/resources/jobs/client.py b/src/merge/resources/ats/resources/jobs/client.py
index 8b454c6b..51931857 100644
--- a/src/merge/resources/ats/resources/jobs/client.py
+++ b/src/merge/resources/ats/resources/jobs/client.py
@@ -1,22 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.job import Job
-from ...types.paginated_job_list import PaginatedJobList
-from ...types.paginated_screening_question_list import PaginatedScreeningQuestionList
+import datetime as dt
from .types.jobs_list_request_expand import JobsListRequestExpand
from .types.jobs_list_request_status import JobsListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_job_list import PaginatedJobList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.jobs_retrieve_request_expand import JobsRetrieveRequestExpand
+from ...types.job import Job
+from .....core.jsonable_encoder import jsonable_encoder
from .types.jobs_screening_questions_list_request_expand import JobsScreeningQuestionsListRequestExpand
+from ...types.paginated_screening_question_list import PaginatedScreeningQuestionList
+from .....core.client_wrapper import AsyncClientWrapper
class JobsClient:
@@ -109,7 +109,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -139,9 +139,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedJobList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedJobList,
+ parse_obj_as(
+ type_=PaginatedJobList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,7 +192,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -207,9 +213,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Job, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Job,
+ parse_obj_as(
+ type_=Job, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -258,7 +270,7 @@ def screening_questions_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -280,9 +292,15 @@ def screening_questions_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedScreeningQuestionList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedScreeningQuestionList,
+ parse_obj_as(
+ type_=PaginatedScreeningQuestionList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -379,13 +397,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.jobs.list()
+
+
+ async def main() -> None:
+ await client.ats.jobs.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/jobs",
@@ -409,9 +435,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedJobList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedJobList,
+ parse_obj_as(
+ type_=PaginatedJobList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -456,15 +488,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.jobs.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.jobs.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/jobs/{jsonable_encoder(id)}",
@@ -477,9 +517,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Job, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Job,
+ parse_obj_as(
+ type_=Job, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -528,15 +574,23 @@ async def screening_questions_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.jobs.screening_questions_list(
- job_id="job_id",
- )
+
+
+ async def main() -> None:
+ await client.ats.jobs.screening_questions_list(
+ job_id="job_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/jobs/{jsonable_encoder(job_id)}/screening-questions",
@@ -550,9 +604,15 @@ async def screening_questions_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedScreeningQuestionList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedScreeningQuestionList,
+ parse_obj_as(
+ type_=PaginatedScreeningQuestionList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/jobs/types/jobs_list_request_expand.py b/src/merge/resources/ats/resources/jobs/types/jobs_list_request_expand.py
index c6d97321..441dbdfa 100644
--- a/src/merge/resources/ats/resources/jobs/types/jobs_list_request_expand.py
+++ b/src/merge/resources/ats/resources/jobs/types/jobs_list_request_expand.py
@@ -1,139 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JobsListRequestExpand(str, enum.Enum):
- DEPARTMENTS = "departments"
- DEPARTMENTS_HIRING_MANAGERS = "departments,hiring_managers"
- DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS = "departments,hiring_managers,job_postings"
- DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "departments,hiring_managers,job_postings,recruiters"
- DEPARTMENTS_HIRING_MANAGERS_RECRUITERS = "departments,hiring_managers,recruiters"
- DEPARTMENTS_JOB_POSTINGS = "departments,job_postings"
- DEPARTMENTS_JOB_POSTINGS_RECRUITERS = "departments,job_postings,recruiters"
- DEPARTMENTS_OFFICES = "departments,offices"
- DEPARTMENTS_OFFICES_HIRING_MANAGERS = "departments,offices,hiring_managers"
- DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS = "departments,offices,hiring_managers,job_postings"
- DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = (
- "departments,offices,hiring_managers,job_postings,recruiters"
- )
- DEPARTMENTS_OFFICES_HIRING_MANAGERS_RECRUITERS = "departments,offices,hiring_managers,recruiters"
- DEPARTMENTS_OFFICES_JOB_POSTINGS = "departments,offices,job_postings"
- DEPARTMENTS_OFFICES_JOB_POSTINGS_RECRUITERS = "departments,offices,job_postings,recruiters"
- DEPARTMENTS_OFFICES_RECRUITERS = "departments,offices,recruiters"
- DEPARTMENTS_RECRUITERS = "departments,recruiters"
- HIRING_MANAGERS = "hiring_managers"
- HIRING_MANAGERS_JOB_POSTINGS = "hiring_managers,job_postings"
- HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "hiring_managers,job_postings,recruiters"
- HIRING_MANAGERS_RECRUITERS = "hiring_managers,recruiters"
- JOB_POSTINGS = "job_postings"
- JOB_POSTINGS_RECRUITERS = "job_postings,recruiters"
- OFFICES = "offices"
- OFFICES_HIRING_MANAGERS = "offices,hiring_managers"
- OFFICES_HIRING_MANAGERS_JOB_POSTINGS = "offices,hiring_managers,job_postings"
- OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "offices,hiring_managers,job_postings,recruiters"
- OFFICES_HIRING_MANAGERS_RECRUITERS = "offices,hiring_managers,recruiters"
- OFFICES_JOB_POSTINGS = "offices,job_postings"
- OFFICES_JOB_POSTINGS_RECRUITERS = "offices,job_postings,recruiters"
- OFFICES_RECRUITERS = "offices,recruiters"
- RECRUITERS = "recruiters"
-
- def visit(
- self,
- departments: typing.Callable[[], T_Result],
- departments_hiring_managers: typing.Callable[[], T_Result],
- departments_hiring_managers_job_postings: typing.Callable[[], T_Result],
- departments_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result],
- departments_hiring_managers_recruiters: typing.Callable[[], T_Result],
- departments_job_postings: typing.Callable[[], T_Result],
- departments_job_postings_recruiters: typing.Callable[[], T_Result],
- departments_offices: typing.Callable[[], T_Result],
- departments_offices_hiring_managers: typing.Callable[[], T_Result],
- departments_offices_hiring_managers_job_postings: typing.Callable[[], T_Result],
- departments_offices_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result],
- departments_offices_hiring_managers_recruiters: typing.Callable[[], T_Result],
- departments_offices_job_postings: typing.Callable[[], T_Result],
- departments_offices_job_postings_recruiters: typing.Callable[[], T_Result],
- departments_offices_recruiters: typing.Callable[[], T_Result],
- departments_recruiters: typing.Callable[[], T_Result],
- hiring_managers: typing.Callable[[], T_Result],
- hiring_managers_job_postings: typing.Callable[[], T_Result],
- hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result],
- hiring_managers_recruiters: typing.Callable[[], T_Result],
- job_postings: typing.Callable[[], T_Result],
- job_postings_recruiters: typing.Callable[[], T_Result],
- offices: typing.Callable[[], T_Result],
- offices_hiring_managers: typing.Callable[[], T_Result],
- offices_hiring_managers_job_postings: typing.Callable[[], T_Result],
- offices_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result],
- offices_hiring_managers_recruiters: typing.Callable[[], T_Result],
- offices_job_postings: typing.Callable[[], T_Result],
- offices_job_postings_recruiters: typing.Callable[[], T_Result],
- offices_recruiters: typing.Callable[[], T_Result],
- recruiters: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JobsListRequestExpand.DEPARTMENTS:
- return departments()
- if self is JobsListRequestExpand.DEPARTMENTS_HIRING_MANAGERS:
- return departments_hiring_managers()
- if self is JobsListRequestExpand.DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS:
- return departments_hiring_managers_job_postings()
- if self is JobsListRequestExpand.DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS:
- return departments_hiring_managers_job_postings_recruiters()
- if self is JobsListRequestExpand.DEPARTMENTS_HIRING_MANAGERS_RECRUITERS:
- return departments_hiring_managers_recruiters()
- if self is JobsListRequestExpand.DEPARTMENTS_JOB_POSTINGS:
- return departments_job_postings()
- if self is JobsListRequestExpand.DEPARTMENTS_JOB_POSTINGS_RECRUITERS:
- return departments_job_postings_recruiters()
- if self is JobsListRequestExpand.DEPARTMENTS_OFFICES:
- return departments_offices()
- if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS:
- return departments_offices_hiring_managers()
- if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS:
- return departments_offices_hiring_managers_job_postings()
- if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS:
- return departments_offices_hiring_managers_job_postings_recruiters()
- if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_RECRUITERS:
- return departments_offices_hiring_managers_recruiters()
- if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_JOB_POSTINGS:
- return departments_offices_job_postings()
- if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_JOB_POSTINGS_RECRUITERS:
- return departments_offices_job_postings_recruiters()
- if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_RECRUITERS:
- return departments_offices_recruiters()
- if self is JobsListRequestExpand.DEPARTMENTS_RECRUITERS:
- return departments_recruiters()
- if self is JobsListRequestExpand.HIRING_MANAGERS:
- return hiring_managers()
- if self is JobsListRequestExpand.HIRING_MANAGERS_JOB_POSTINGS:
- return hiring_managers_job_postings()
- if self is JobsListRequestExpand.HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS:
- return hiring_managers_job_postings_recruiters()
- if self is JobsListRequestExpand.HIRING_MANAGERS_RECRUITERS:
- return hiring_managers_recruiters()
- if self is JobsListRequestExpand.JOB_POSTINGS:
- return job_postings()
- if self is JobsListRequestExpand.JOB_POSTINGS_RECRUITERS:
- return job_postings_recruiters()
- if self is JobsListRequestExpand.OFFICES:
- return offices()
- if self is JobsListRequestExpand.OFFICES_HIRING_MANAGERS:
- return offices_hiring_managers()
- if self is JobsListRequestExpand.OFFICES_HIRING_MANAGERS_JOB_POSTINGS:
- return offices_hiring_managers_job_postings()
- if self is JobsListRequestExpand.OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS:
- return offices_hiring_managers_job_postings_recruiters()
- if self is JobsListRequestExpand.OFFICES_HIRING_MANAGERS_RECRUITERS:
- return offices_hiring_managers_recruiters()
- if self is JobsListRequestExpand.OFFICES_JOB_POSTINGS:
- return offices_job_postings()
- if self is JobsListRequestExpand.OFFICES_JOB_POSTINGS_RECRUITERS:
- return offices_job_postings_recruiters()
- if self is JobsListRequestExpand.OFFICES_RECRUITERS:
- return offices_recruiters()
- if self is JobsListRequestExpand.RECRUITERS:
- return recruiters()
+JobsListRequestExpand = typing.Union[
+ typing.Literal[
+ "departments",
+ "departments,hiring_managers",
+ "departments,hiring_managers,job_postings",
+ "departments,hiring_managers,job_postings,recruiters",
+ "departments,hiring_managers,recruiters",
+ "departments,job_postings",
+ "departments,job_postings,recruiters",
+ "departments,offices",
+ "departments,offices,hiring_managers",
+ "departments,offices,hiring_managers,job_postings",
+ "departments,offices,hiring_managers,job_postings,recruiters",
+ "departments,offices,hiring_managers,recruiters",
+ "departments,offices,job_postings",
+ "departments,offices,job_postings,recruiters",
+ "departments,offices,recruiters",
+ "departments,recruiters",
+ "hiring_managers",
+ "hiring_managers,job_postings",
+ "hiring_managers,job_postings,recruiters",
+ "hiring_managers,recruiters",
+ "job_postings",
+ "job_postings,recruiters",
+ "offices",
+ "offices,hiring_managers",
+ "offices,hiring_managers,job_postings",
+ "offices,hiring_managers,job_postings,recruiters",
+ "offices,hiring_managers,recruiters",
+ "offices,job_postings",
+ "offices,job_postings,recruiters",
+ "offices,recruiters",
+ "recruiters",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/jobs/types/jobs_list_request_status.py b/src/merge/resources/ats/resources/jobs/types/jobs_list_request_status.py
index 08fec15e..3d85100c 100644
--- a/src/merge/resources/ats/resources/jobs/types/jobs_list_request_status.py
+++ b/src/merge/resources/ats/resources/jobs/types/jobs_list_request_status.py
@@ -1,33 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JobsListRequestStatus(str, enum.Enum):
- ARCHIVED = "ARCHIVED"
- CLOSED = "CLOSED"
- DRAFT = "DRAFT"
- OPEN = "OPEN"
- PENDING = "PENDING"
-
- def visit(
- self,
- archived: typing.Callable[[], T_Result],
- closed: typing.Callable[[], T_Result],
- draft: typing.Callable[[], T_Result],
- open: typing.Callable[[], T_Result],
- pending: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JobsListRequestStatus.ARCHIVED:
- return archived()
- if self is JobsListRequestStatus.CLOSED:
- return closed()
- if self is JobsListRequestStatus.DRAFT:
- return draft()
- if self is JobsListRequestStatus.OPEN:
- return open()
- if self is JobsListRequestStatus.PENDING:
- return pending()
+JobsListRequestStatus = typing.Union[typing.Literal["ARCHIVED", "CLOSED", "DRAFT", "OPEN", "PENDING"], typing.Any]
diff --git a/src/merge/resources/ats/resources/jobs/types/jobs_retrieve_request_expand.py b/src/merge/resources/ats/resources/jobs/types/jobs_retrieve_request_expand.py
index 8075a8c9..859a2fec 100644
--- a/src/merge/resources/ats/resources/jobs/types/jobs_retrieve_request_expand.py
+++ b/src/merge/resources/ats/resources/jobs/types/jobs_retrieve_request_expand.py
@@ -1,139 +1,40 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JobsRetrieveRequestExpand(str, enum.Enum):
- DEPARTMENTS = "departments"
- DEPARTMENTS_HIRING_MANAGERS = "departments,hiring_managers"
- DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS = "departments,hiring_managers,job_postings"
- DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "departments,hiring_managers,job_postings,recruiters"
- DEPARTMENTS_HIRING_MANAGERS_RECRUITERS = "departments,hiring_managers,recruiters"
- DEPARTMENTS_JOB_POSTINGS = "departments,job_postings"
- DEPARTMENTS_JOB_POSTINGS_RECRUITERS = "departments,job_postings,recruiters"
- DEPARTMENTS_OFFICES = "departments,offices"
- DEPARTMENTS_OFFICES_HIRING_MANAGERS = "departments,offices,hiring_managers"
- DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS = "departments,offices,hiring_managers,job_postings"
- DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = (
- "departments,offices,hiring_managers,job_postings,recruiters"
- )
- DEPARTMENTS_OFFICES_HIRING_MANAGERS_RECRUITERS = "departments,offices,hiring_managers,recruiters"
- DEPARTMENTS_OFFICES_JOB_POSTINGS = "departments,offices,job_postings"
- DEPARTMENTS_OFFICES_JOB_POSTINGS_RECRUITERS = "departments,offices,job_postings,recruiters"
- DEPARTMENTS_OFFICES_RECRUITERS = "departments,offices,recruiters"
- DEPARTMENTS_RECRUITERS = "departments,recruiters"
- HIRING_MANAGERS = "hiring_managers"
- HIRING_MANAGERS_JOB_POSTINGS = "hiring_managers,job_postings"
- HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "hiring_managers,job_postings,recruiters"
- HIRING_MANAGERS_RECRUITERS = "hiring_managers,recruiters"
- JOB_POSTINGS = "job_postings"
- JOB_POSTINGS_RECRUITERS = "job_postings,recruiters"
- OFFICES = "offices"
- OFFICES_HIRING_MANAGERS = "offices,hiring_managers"
- OFFICES_HIRING_MANAGERS_JOB_POSTINGS = "offices,hiring_managers,job_postings"
- OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "offices,hiring_managers,job_postings,recruiters"
- OFFICES_HIRING_MANAGERS_RECRUITERS = "offices,hiring_managers,recruiters"
- OFFICES_JOB_POSTINGS = "offices,job_postings"
- OFFICES_JOB_POSTINGS_RECRUITERS = "offices,job_postings,recruiters"
- OFFICES_RECRUITERS = "offices,recruiters"
- RECRUITERS = "recruiters"
-
- def visit(
- self,
- departments: typing.Callable[[], T_Result],
- departments_hiring_managers: typing.Callable[[], T_Result],
- departments_hiring_managers_job_postings: typing.Callable[[], T_Result],
- departments_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result],
- departments_hiring_managers_recruiters: typing.Callable[[], T_Result],
- departments_job_postings: typing.Callable[[], T_Result],
- departments_job_postings_recruiters: typing.Callable[[], T_Result],
- departments_offices: typing.Callable[[], T_Result],
- departments_offices_hiring_managers: typing.Callable[[], T_Result],
- departments_offices_hiring_managers_job_postings: typing.Callable[[], T_Result],
- departments_offices_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result],
- departments_offices_hiring_managers_recruiters: typing.Callable[[], T_Result],
- departments_offices_job_postings: typing.Callable[[], T_Result],
- departments_offices_job_postings_recruiters: typing.Callable[[], T_Result],
- departments_offices_recruiters: typing.Callable[[], T_Result],
- departments_recruiters: typing.Callable[[], T_Result],
- hiring_managers: typing.Callable[[], T_Result],
- hiring_managers_job_postings: typing.Callable[[], T_Result],
- hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result],
- hiring_managers_recruiters: typing.Callable[[], T_Result],
- job_postings: typing.Callable[[], T_Result],
- job_postings_recruiters: typing.Callable[[], T_Result],
- offices: typing.Callable[[], T_Result],
- offices_hiring_managers: typing.Callable[[], T_Result],
- offices_hiring_managers_job_postings: typing.Callable[[], T_Result],
- offices_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result],
- offices_hiring_managers_recruiters: typing.Callable[[], T_Result],
- offices_job_postings: typing.Callable[[], T_Result],
- offices_job_postings_recruiters: typing.Callable[[], T_Result],
- offices_recruiters: typing.Callable[[], T_Result],
- recruiters: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JobsRetrieveRequestExpand.DEPARTMENTS:
- return departments()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_HIRING_MANAGERS:
- return departments_hiring_managers()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS:
- return departments_hiring_managers_job_postings()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS:
- return departments_hiring_managers_job_postings_recruiters()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_HIRING_MANAGERS_RECRUITERS:
- return departments_hiring_managers_recruiters()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_JOB_POSTINGS:
- return departments_job_postings()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_JOB_POSTINGS_RECRUITERS:
- return departments_job_postings_recruiters()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES:
- return departments_offices()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS:
- return departments_offices_hiring_managers()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS:
- return departments_offices_hiring_managers_job_postings()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS:
- return departments_offices_hiring_managers_job_postings_recruiters()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_RECRUITERS:
- return departments_offices_hiring_managers_recruiters()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_JOB_POSTINGS:
- return departments_offices_job_postings()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_JOB_POSTINGS_RECRUITERS:
- return departments_offices_job_postings_recruiters()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_RECRUITERS:
- return departments_offices_recruiters()
- if self is JobsRetrieveRequestExpand.DEPARTMENTS_RECRUITERS:
- return departments_recruiters()
- if self is JobsRetrieveRequestExpand.HIRING_MANAGERS:
- return hiring_managers()
- if self is JobsRetrieveRequestExpand.HIRING_MANAGERS_JOB_POSTINGS:
- return hiring_managers_job_postings()
- if self is JobsRetrieveRequestExpand.HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS:
- return hiring_managers_job_postings_recruiters()
- if self is JobsRetrieveRequestExpand.HIRING_MANAGERS_RECRUITERS:
- return hiring_managers_recruiters()
- if self is JobsRetrieveRequestExpand.JOB_POSTINGS:
- return job_postings()
- if self is JobsRetrieveRequestExpand.JOB_POSTINGS_RECRUITERS:
- return job_postings_recruiters()
- if self is JobsRetrieveRequestExpand.OFFICES:
- return offices()
- if self is JobsRetrieveRequestExpand.OFFICES_HIRING_MANAGERS:
- return offices_hiring_managers()
- if self is JobsRetrieveRequestExpand.OFFICES_HIRING_MANAGERS_JOB_POSTINGS:
- return offices_hiring_managers_job_postings()
- if self is JobsRetrieveRequestExpand.OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS:
- return offices_hiring_managers_job_postings_recruiters()
- if self is JobsRetrieveRequestExpand.OFFICES_HIRING_MANAGERS_RECRUITERS:
- return offices_hiring_managers_recruiters()
- if self is JobsRetrieveRequestExpand.OFFICES_JOB_POSTINGS:
- return offices_job_postings()
- if self is JobsRetrieveRequestExpand.OFFICES_JOB_POSTINGS_RECRUITERS:
- return offices_job_postings_recruiters()
- if self is JobsRetrieveRequestExpand.OFFICES_RECRUITERS:
- return offices_recruiters()
- if self is JobsRetrieveRequestExpand.RECRUITERS:
- return recruiters()
+JobsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "departments",
+ "departments,hiring_managers",
+ "departments,hiring_managers,job_postings",
+ "departments,hiring_managers,job_postings,recruiters",
+ "departments,hiring_managers,recruiters",
+ "departments,job_postings",
+ "departments,job_postings,recruiters",
+ "departments,offices",
+ "departments,offices,hiring_managers",
+ "departments,offices,hiring_managers,job_postings",
+ "departments,offices,hiring_managers,job_postings,recruiters",
+ "departments,offices,hiring_managers,recruiters",
+ "departments,offices,job_postings",
+ "departments,offices,job_postings,recruiters",
+ "departments,offices,recruiters",
+ "departments,recruiters",
+ "hiring_managers",
+ "hiring_managers,job_postings",
+ "hiring_managers,job_postings,recruiters",
+ "hiring_managers,recruiters",
+ "job_postings",
+ "job_postings,recruiters",
+ "offices",
+ "offices,hiring_managers",
+ "offices,hiring_managers,job_postings",
+ "offices,hiring_managers,job_postings,recruiters",
+ "offices,hiring_managers,recruiters",
+ "offices,job_postings",
+ "offices,job_postings,recruiters",
+ "offices,recruiters",
+ "recruiters",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/jobs/types/jobs_screening_questions_list_request_expand.py b/src/merge/resources/ats/resources/jobs/types/jobs_screening_questions_list_request_expand.py
index 8fa46bd6..9ca8c5a5 100644
--- a/src/merge/resources/ats/resources/jobs/types/jobs_screening_questions_list_request_expand.py
+++ b/src/merge/resources/ats/resources/jobs/types/jobs_screening_questions_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JobsScreeningQuestionsListRequestExpand(str, enum.Enum):
- JOB = "job"
- OPTIONS = "options"
- OPTIONS_JOB = "options,job"
-
- def visit(
- self,
- job: typing.Callable[[], T_Result],
- options: typing.Callable[[], T_Result],
- options_job: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JobsScreeningQuestionsListRequestExpand.JOB:
- return job()
- if self is JobsScreeningQuestionsListRequestExpand.OPTIONS:
- return options()
- if self is JobsScreeningQuestionsListRequestExpand.OPTIONS_JOB:
- return options_job()
+JobsScreeningQuestionsListRequestExpand = typing.Union[typing.Literal["job", "options", "options,job"], typing.Any]
diff --git a/src/merge/resources/ats/resources/link_token/client.py b/src/merge/resources/ats/resources/link_token/client.py
index 873c00b2..f033c1ec 100644
--- a/src/merge/resources/ats/resources/link_token/client.py
+++ b/src/merge/resources/ats/resources/link_token/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.categories_enum import CategoriesEnum
from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.request_options import RequestOptions
from ...types.link_token import LinkToken
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,8 +36,8 @@ def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -77,7 +77,7 @@ def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -90,8 +90,7 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.ats import CategoriesEnum
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,7 +100,7 @@ def create(
end_user_email_address="example@gmail.com",
end_user_organization_name="Test Organization",
end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
+ categories=["hris", "ats"],
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -124,9 +123,15 @@ def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,8 +158,8 @@ async def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -194,7 +199,7 @@ async def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -207,19 +212,26 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.ats import CategoriesEnum
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.link_token.create(
- end_user_email_address="example@gmail.com",
- end_user_organization_name="Test Organization",
- end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
- )
+
+
+ async def main() -> None:
+ await client.ats.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/link-token",
@@ -241,9 +253,15 @@ async def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/linked_accounts/client.py b/src/merge/resources/ats/resources/linked_accounts/client.py
index 4a016f17..4a769934 100644
--- a/src/merge/resources/ats/resources/linked_accounts/client.py
+++ b/src/merge/resources/ats/resources/linked_accounts/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
from .....core.request_options import RequestOptions
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
-from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class LinkedAccountsClient:
@@ -31,7 +31,7 @@ def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -122,9 +122,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -151,7 +157,7 @@ async def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -214,13 +220,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.linked_accounts.list()
+
+
+ async def main() -> None:
+ await client.ats.linked_accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/linked-accounts",
@@ -242,9 +256,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/linked_accounts/types/linked_accounts_list_request_category.py b/src/merge/resources/ats/resources/linked_accounts/types/linked_accounts_list_request_category.py
index bd873ea8..531279d5 100644
--- a/src/merge/resources/ats/resources/linked_accounts/types/linked_accounts_list_request_category.py
+++ b/src/merge/resources/ats/resources/linked_accounts/types/linked_accounts_list_request_category.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LinkedAccountsListRequestCategory(str, enum.Enum):
- ACCOUNTING = "accounting"
- ATS = "ats"
- CRM = "crm"
- FILESTORAGE = "filestorage"
- HRIS = "hris"
- MKTG = "mktg"
- TICKETING = "ticketing"
-
- def visit(
- self,
- accounting: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- hris: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is LinkedAccountsListRequestCategory.ACCOUNTING:
- return accounting()
- if self is LinkedAccountsListRequestCategory.ATS:
- return ats()
- if self is LinkedAccountsListRequestCategory.CRM:
- return crm()
- if self is LinkedAccountsListRequestCategory.FILESTORAGE:
- return filestorage()
- if self is LinkedAccountsListRequestCategory.HRIS:
- return hris()
- if self is LinkedAccountsListRequestCategory.MKTG:
- return mktg()
- if self is LinkedAccountsListRequestCategory.TICKETING:
- return ticketing()
+LinkedAccountsListRequestCategory = typing.Union[
+ typing.Literal["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"], typing.Any
+]
diff --git a/src/merge/resources/ats/resources/offers/client.py b/src/merge/resources/ats/resources/offers/client.py
index c5d8dd52..2388874f 100644
--- a/src/merge/resources/ats/resources/offers/client.py
+++ b/src/merge/resources/ats/resources/offers/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.offers_list_request_expand import OffersListRequestExpand
from .....core.request_options import RequestOptions
-from ...types.offer import Offer
from ...types.paginated_offer_list import PaginatedOfferList
-from .types.offers_list_request_expand import OffersListRequestExpand
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.offers_retrieve_request_expand import OffersRetrieveRequestExpand
+from ...types.offer import Offer
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class OffersClient:
@@ -96,7 +96,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -125,9 +125,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedOfferList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedOfferList,
+ parse_obj_as(
+ type_=PaginatedOfferList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -172,7 +178,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -193,9 +199,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Offer, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Offer,
+ parse_obj_as(
+ type_=Offer, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -282,13 +294,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.offers.list()
+
+
+ async def main() -> None:
+ await client.ats.offers.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/offers",
@@ -311,9 +331,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedOfferList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedOfferList,
+ parse_obj_as(
+ type_=PaginatedOfferList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -358,15 +384,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.offers.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.offers.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/offers/{jsonable_encoder(id)}",
@@ -379,9 +413,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Offer, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Offer,
+ parse_obj_as(
+ type_=Offer, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/offers/types/offers_list_request_expand.py b/src/merge/resources/ats/resources/offers/types/offers_list_request_expand.py
index 385eba96..514ef59c 100644
--- a/src/merge/resources/ats/resources/offers/types/offers_list_request_expand.py
+++ b/src/merge/resources/ats/resources/offers/types/offers_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OffersListRequestExpand(str, enum.Enum):
- APPLICATION = "application"
- APPLICATION_CREATOR = "application,creator"
- CREATOR = "creator"
-
- def visit(
- self,
- application: typing.Callable[[], T_Result],
- application_creator: typing.Callable[[], T_Result],
- creator: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OffersListRequestExpand.APPLICATION:
- return application()
- if self is OffersListRequestExpand.APPLICATION_CREATOR:
- return application_creator()
- if self is OffersListRequestExpand.CREATOR:
- return creator()
+OffersListRequestExpand = typing.Union[typing.Literal["application", "application,creator", "creator"], typing.Any]
diff --git a/src/merge/resources/ats/resources/offers/types/offers_retrieve_request_expand.py b/src/merge/resources/ats/resources/offers/types/offers_retrieve_request_expand.py
index 38a7c9d1..f6bb0615 100644
--- a/src/merge/resources/ats/resources/offers/types/offers_retrieve_request_expand.py
+++ b/src/merge/resources/ats/resources/offers/types/offers_retrieve_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OffersRetrieveRequestExpand(str, enum.Enum):
- APPLICATION = "application"
- APPLICATION_CREATOR = "application,creator"
- CREATOR = "creator"
-
- def visit(
- self,
- application: typing.Callable[[], T_Result],
- application_creator: typing.Callable[[], T_Result],
- creator: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OffersRetrieveRequestExpand.APPLICATION:
- return application()
- if self is OffersRetrieveRequestExpand.APPLICATION_CREATOR:
- return application_creator()
- if self is OffersRetrieveRequestExpand.CREATOR:
- return creator()
+OffersRetrieveRequestExpand = typing.Union[typing.Literal["application", "application,creator", "creator"], typing.Any]
diff --git a/src/merge/resources/ats/resources/offices/client.py b/src/merge/resources/ats/resources/offices/client.py
index 08813066..bda0e599 100644
--- a/src/merge/resources/ats/resources/offices/client.py
+++ b/src/merge/resources/ats/resources/offices/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_office_list import PaginatedOfficeList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.office import Office
-from ...types.paginated_office_list import PaginatedOfficeList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class OfficesClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedOfficeList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedOfficeList,
+ parse_obj_as(
+ type_=PaginatedOfficeList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/offices/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Office, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Office,
+ parse_obj_as(
+ type_=Office, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.offices.list()
+
+
+ async def main() -> None:
+ await client.ats.offices.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/offices",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedOfficeList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedOfficeList,
+ parse_obj_as(
+ type_=PaginatedOfficeList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.offices.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.offices.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/offices/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Office, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Office,
+ parse_obj_as(
+ type_=Office, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/passthrough/client.py b/src/merge/resources/ats/resources/passthrough/client.py
index a04e3f4c..677a2ac9 100644
--- a/src/merge/resources/ats/resources/passthrough/client.py
+++ b/src/merge/resources/ats/resources/passthrough/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.request_options import RequestOptions
from ...types.remote_response import RemoteResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -38,8 +38,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.ats import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.ats import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,17 +47,27 @@ def create(
)
client.ats.passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "ats/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -88,26 +98,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.ats import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.ats import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.ats.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "ats/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/regenerate_key/client.py b/src/merge/resources/ats/resources/regenerate_key/client.py
index cb0739d9..d31f4f42 100644
--- a/src/merge/resources/ats/resources/regenerate_key/client.py
+++ b/src/merge/resources/ats/resources/regenerate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,11 +47,23 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/regenerate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "ats/v1/regenerate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,22 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.regenerate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.ats.regenerate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/regenerate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "ats/v1/regenerate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/reject_reasons/client.py b/src/merge/resources/ats/resources/reject_reasons/client.py
index af3b42a5..64f19684 100644
--- a/src/merge/resources/ats/resources/reject_reasons/client.py
+++ b/src/merge/resources/ats/resources/reject_reasons/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_reject_reason_list import PaginatedRejectReasonList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.reject_reason import RejectReason
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class RejectReasonsClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRejectReasonList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRejectReasonList,
+ parse_obj_as(
+ type_=PaginatedRejectReasonList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ats/v1/reject-reasons/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RejectReason, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RejectReason,
+ parse_obj_as(
+ type_=RejectReason, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.reject_reasons.list()
+
+
+ async def main() -> None:
+ await client.ats.reject_reasons.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/reject-reasons",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRejectReasonList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRejectReasonList,
+ parse_obj_as(
+ type_=PaginatedRejectReasonList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.reject_reasons.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.reject_reasons.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/reject-reasons/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RejectReason, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RejectReason,
+ parse_obj_as(
+ type_=RejectReason, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/scopes/client.py b/src/merge/resources/ats/resources/scopes/client.py
index c695d9dc..ea20ef3b 100644
--- a/src/merge/resources/ats/resources/scopes/client.py
+++ b/src/merge/resources/ats/resources/scopes/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.common_model_scope_api import CommonModelScopeApi
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def default_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -45,11 +45,19 @@ def default_scopes_retrieve(
client.ats.scopes.default_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/default-scopes", method="GET", request_options=request_options
+ "ats/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -73,7 +81,7 @@ def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -82,11 +90,19 @@ def linked_account_scopes_retrieve(
client.ats.scopes.linked_account_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/linked-account-scopes", method="GET", request_options=request_options
+ "ats/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -96,7 +112,7 @@ def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -116,7 +132,7 @@ def linked_account_scopes_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ats import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -153,13 +169,21 @@ def linked_account_scopes_create(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -188,20 +212,36 @@ async def default_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.scopes.default_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.scopes.default_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/default-scopes", method="GET", request_options=request_options
+ "ats/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -225,20 +265,36 @@ async def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.scopes.linked_account_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.ats.scopes.linked_account_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/linked-account-scopes", method="GET", request_options=request_options
+ "ats/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -248,7 +304,7 @@ async def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -268,7 +324,9 @@ async def linked_account_scopes_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ats import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -278,40 +336,54 @@ async def linked_account_scopes_create(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.scopes.linked_account_scopes_create(
- common_models=[
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Employee",
- model_permissions={
- "READ": ModelPermissionDeserializerRequest(
- is_enabled=True,
- ),
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- ),
- },
- ),
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Benefit",
- model_permissions={
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- )
- },
- ),
- ],
- )
+
+
+ async def main() -> None:
+ await client.ats.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/scorecards/client.py b/src/merge/resources/ats/resources/scorecards/client.py
index caa59646..6eb95cb7 100644
--- a/src/merge/resources/ats/resources/scorecards/client.py
+++ b/src/merge/resources/ats/resources/scorecards/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.scorecards_list_request_expand import ScorecardsListRequestExpand
from .....core.request_options import RequestOptions
from ...types.paginated_scorecard_list import PaginatedScorecardList
-from ...types.scorecard import Scorecard
-from .types.scorecards_list_request_expand import ScorecardsListRequestExpand
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.scorecards_retrieve_request_expand import ScorecardsRetrieveRequestExpand
+from ...types.scorecard import Scorecard
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class ScorecardsClient:
@@ -100,7 +100,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -130,9 +130,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedScorecardList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedScorecardList,
+ parse_obj_as(
+ type_=PaginatedScorecardList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -177,7 +183,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -198,9 +204,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Scorecard, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Scorecard,
+ parse_obj_as(
+ type_=Scorecard, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -291,13 +303,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.scorecards.list()
+
+
+ async def main() -> None:
+ await client.ats.scorecards.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/scorecards",
@@ -321,9 +341,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedScorecardList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedScorecardList,
+ parse_obj_as(
+ type_=PaginatedScorecardList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -368,15 +394,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.scorecards.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.scorecards.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/scorecards/{jsonable_encoder(id)}",
@@ -389,9 +423,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Scorecard, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Scorecard,
+ parse_obj_as(
+ type_=Scorecard, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/scorecards/types/scorecards_list_request_expand.py b/src/merge/resources/ats/resources/scorecards/types/scorecards_list_request_expand.py
index 0c9598b4..a5820336 100644
--- a/src/merge/resources/ats/resources/scorecards/types/scorecards_list_request_expand.py
+++ b/src/merge/resources/ats/resources/scorecards/types/scorecards_list_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ScorecardsListRequestExpand(str, enum.Enum):
- APPLICATION = "application"
- APPLICATION_INTERVIEW = "application,interview"
- APPLICATION_INTERVIEW_INTERVIEWER = "application,interview,interviewer"
- APPLICATION_INTERVIEWER = "application,interviewer"
- INTERVIEW = "interview"
- INTERVIEW_INTERVIEWER = "interview,interviewer"
- INTERVIEWER = "interviewer"
-
- def visit(
- self,
- application: typing.Callable[[], T_Result],
- application_interview: typing.Callable[[], T_Result],
- application_interview_interviewer: typing.Callable[[], T_Result],
- application_interviewer: typing.Callable[[], T_Result],
- interview: typing.Callable[[], T_Result],
- interview_interviewer: typing.Callable[[], T_Result],
- interviewer: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ScorecardsListRequestExpand.APPLICATION:
- return application()
- if self is ScorecardsListRequestExpand.APPLICATION_INTERVIEW:
- return application_interview()
- if self is ScorecardsListRequestExpand.APPLICATION_INTERVIEW_INTERVIEWER:
- return application_interview_interviewer()
- if self is ScorecardsListRequestExpand.APPLICATION_INTERVIEWER:
- return application_interviewer()
- if self is ScorecardsListRequestExpand.INTERVIEW:
- return interview()
- if self is ScorecardsListRequestExpand.INTERVIEW_INTERVIEWER:
- return interview_interviewer()
- if self is ScorecardsListRequestExpand.INTERVIEWER:
- return interviewer()
+ScorecardsListRequestExpand = typing.Union[
+ typing.Literal[
+ "application",
+ "application,interview",
+ "application,interview,interviewer",
+ "application,interviewer",
+ "interview",
+ "interview,interviewer",
+ "interviewer",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/scorecards/types/scorecards_retrieve_request_expand.py b/src/merge/resources/ats/resources/scorecards/types/scorecards_retrieve_request_expand.py
index 980629df..1e63a20c 100644
--- a/src/merge/resources/ats/resources/scorecards/types/scorecards_retrieve_request_expand.py
+++ b/src/merge/resources/ats/resources/scorecards/types/scorecards_retrieve_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ScorecardsRetrieveRequestExpand(str, enum.Enum):
- APPLICATION = "application"
- APPLICATION_INTERVIEW = "application,interview"
- APPLICATION_INTERVIEW_INTERVIEWER = "application,interview,interviewer"
- APPLICATION_INTERVIEWER = "application,interviewer"
- INTERVIEW = "interview"
- INTERVIEW_INTERVIEWER = "interview,interviewer"
- INTERVIEWER = "interviewer"
-
- def visit(
- self,
- application: typing.Callable[[], T_Result],
- application_interview: typing.Callable[[], T_Result],
- application_interview_interviewer: typing.Callable[[], T_Result],
- application_interviewer: typing.Callable[[], T_Result],
- interview: typing.Callable[[], T_Result],
- interview_interviewer: typing.Callable[[], T_Result],
- interviewer: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ScorecardsRetrieveRequestExpand.APPLICATION:
- return application()
- if self is ScorecardsRetrieveRequestExpand.APPLICATION_INTERVIEW:
- return application_interview()
- if self is ScorecardsRetrieveRequestExpand.APPLICATION_INTERVIEW_INTERVIEWER:
- return application_interview_interviewer()
- if self is ScorecardsRetrieveRequestExpand.APPLICATION_INTERVIEWER:
- return application_interviewer()
- if self is ScorecardsRetrieveRequestExpand.INTERVIEW:
- return interview()
- if self is ScorecardsRetrieveRequestExpand.INTERVIEW_INTERVIEWER:
- return interview_interviewer()
- if self is ScorecardsRetrieveRequestExpand.INTERVIEWER:
- return interviewer()
+ScorecardsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "application",
+ "application,interview",
+ "application,interview,interviewer",
+ "application,interviewer",
+ "interview",
+ "interview,interviewer",
+ "interviewer",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/resources/sync_status/client.py b/src/merge/resources/ats/resources/sync_status/client.py
index 9892adb4..b49ef1cb 100644
--- a/src/merge/resources/ats/resources/sync_status/client.py
+++ b/src/merge/resources/ats/resources/sync_status/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_sync_status_list import PaginatedSyncStatusList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class SyncStatusClient:
@@ -19,7 +19,7 @@ def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -42,7 +42,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -53,12 +53,21 @@ def list(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,7 +83,7 @@ async def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -97,23 +106,40 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.sync_status.list()
+
+
+ async def main() -> None:
+ await client.ats.sync_status.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/tags/client.py b/src/merge/resources/ats/resources/tags/client.py
index dc195a35..ce7e57f9 100644
--- a/src/merge/resources/ats/resources/tags/client.py
+++ b/src/merge/resources/ats/resources/tags/client.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_tag_list import PaginatedTagList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class TagsClient:
@@ -28,7 +28,7 @@ def list(
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
remote_id: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedTagList:
"""
Returns a list of `Tag` objects.
@@ -72,7 +72,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -96,9 +96,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTagList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTagList,
+ parse_obj_as(
+ type_=PaginatedTagList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -121,7 +127,7 @@ async def list(
modified_before: typing.Optional[dt.datetime] = None,
page_size: typing.Optional[int] = None,
remote_id: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedTagList:
"""
Returns a list of `Tag` objects.
@@ -165,13 +171,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.tags.list()
+
+
+ async def main() -> None:
+ await client.ats.tags.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/tags",
@@ -189,9 +203,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTagList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTagList,
+ parse_obj_as(
+ type_=PaginatedTagList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/users/client.py b/src/merge/resources/ats/resources/users/client.py
index f3beb83d..e6d4eb5d 100644
--- a/src/merge/resources/ats/resources/users/client.py
+++ b/src/merge/resources/ats/resources/users/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_remote_user_list import PaginatedRemoteUserList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.remote_user import RemoteUser
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class UsersClient:
@@ -86,7 +86,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -113,9 +113,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteUserList,
+ parse_obj_as(
+ type_=PaginatedRemoteUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -156,7 +162,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -176,9 +182,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteUser, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteUser,
+ parse_obj_as(
+ type_=RemoteUser, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -257,13 +269,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.users.list()
+
+
+ async def main() -> None:
+ await client.ats.users.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/users",
@@ -284,9 +304,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteUserList,
+ parse_obj_as(
+ type_=PaginatedRemoteUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -327,15 +353,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.users.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ats.users.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ats/v1/users/{jsonable_encoder(id)}",
@@ -347,9 +381,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteUser, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteUser,
+ parse_obj_as(
+ type_=RemoteUser, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/resources/webhook_receivers/client.py b/src/merge/resources/ats/resources/webhook_receivers/client.py
index f4db28e5..8156400d 100644
--- a/src/merge/resources/ats/resources/webhook_receivers/client.py
+++ b/src/merge/resources/ats/resources/webhook_receivers/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.webhook_receiver import WebhookReceiver
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -33,7 +33,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -42,11 +42,19 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
client.ats.webhook_receivers.list()
"""
_response = self._client_wrapper.httpx_client.request(
- "ats/v1/webhook-receivers", method="GET", request_options=request_options
+ "ats/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -58,7 +66,7 @@ def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -81,7 +89,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -95,13 +103,23 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ats/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -128,20 +146,36 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None)
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.webhook_receivers.list()
+
+
+ async def main() -> None:
+ await client.ats.webhook_receivers.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ats/v1/webhook-receivers", method="GET", request_options=request_options
+ "ats/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,7 +187,7 @@ async def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -176,27 +210,45 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ats.webhook_receivers.create(
- event="event",
- is_active=True,
- )
+
+
+ async def main() -> None:
+ await client.ats.webhook_receivers.create(
+ event="event",
+ is_active=True,
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ats/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ats/types/access_role_enum.py b/src/merge/resources/ats/types/access_role_enum.py
index 09aadd52..d3953aca 100644
--- a/src/merge/resources/ats/types/access_role_enum.py
+++ b/src/merge/resources/ats/types/access_role_enum.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccessRoleEnum(str, enum.Enum):
- """
- - `SUPER_ADMIN` - SUPER_ADMIN
- - `ADMIN` - ADMIN
- - `TEAM_MEMBER` - TEAM_MEMBER
- - `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER
- - `INTERVIEWER` - INTERVIEWER
- """
-
- SUPER_ADMIN = "SUPER_ADMIN"
- ADMIN = "ADMIN"
- TEAM_MEMBER = "TEAM_MEMBER"
- LIMITED_TEAM_MEMBER = "LIMITED_TEAM_MEMBER"
- INTERVIEWER = "INTERVIEWER"
-
- def visit(
- self,
- super_admin: typing.Callable[[], T_Result],
- admin: typing.Callable[[], T_Result],
- team_member: typing.Callable[[], T_Result],
- limited_team_member: typing.Callable[[], T_Result],
- interviewer: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccessRoleEnum.SUPER_ADMIN:
- return super_admin()
- if self is AccessRoleEnum.ADMIN:
- return admin()
- if self is AccessRoleEnum.TEAM_MEMBER:
- return team_member()
- if self is AccessRoleEnum.LIMITED_TEAM_MEMBER:
- return limited_team_member()
- if self is AccessRoleEnum.INTERVIEWER:
- return interviewer()
+AccessRoleEnum = typing.Union[
+ typing.Literal["SUPER_ADMIN", "ADMIN", "TEAM_MEMBER", "LIMITED_TEAM_MEMBER", "INTERVIEWER"], typing.Any
+]
diff --git a/src/merge/resources/ats/types/account_details.py b/src/merge/resources/ats/types/account_details.py
index 81f9587b..50a3736a 100644
--- a/src/merge/resources/ats/types/account_details.py
+++ b/src/merge/resources/ats/types/account_details.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .category_enum import CategoryEnum
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetails(pydantic_v1.BaseModel):
+class AccountDetails(UniversalBaseModel):
id: typing.Optional[str]
integration: typing.Optional[str]
integration_slug: typing.Optional[str]
@@ -18,27 +17,18 @@ class AccountDetails(pydantic_v1.BaseModel):
end_user_email_address: typing.Optional[str]
status: typing.Optional[str]
webhook_listener_url: typing.Optional[str]
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
account_type: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/account_details_and_actions.py b/src/merge/resources/ats/types/account_details_and_actions.py
index 6a1b2874..39a7b0da 100644
--- a/src/merge/resources/ats/types/account_details_and_actions.py
+++ b/src/merge/resources/ats/types/account_details_and_actions.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
-from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
from .category_enum import CategoryEnum
+from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
+import pydantic
+from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetailsAndActions(pydantic_v1.BaseModel):
+class AccountDetailsAndActions(UniversalBaseModel):
"""
# The LinkedAccount Object
@@ -30,13 +29,13 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
end_user_origin_id: typing.Optional[str]
end_user_organization_name: str
end_user_email_address: str
- subdomain: typing.Optional[str] = pydantic_v1.Field()
+ subdomain: typing.Optional[str] = pydantic.Field()
"""
The tenant or domain the customer has provided access to.
"""
webhook_listener_url: str
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
@@ -44,20 +43,11 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
integration: typing.Optional[AccountDetailsAndActionsIntegration]
account_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/account_details_and_actions_integration.py b/src/merge/resources/ats/types/account_details_and_actions_integration.py
index 7c300a2b..5779ac5b 100644
--- a/src/merge/resources/ats/types/account_details_and_actions_integration.py
+++ b/src/merge/resources/ats/types/account_details_and_actions_integration.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
+class AccountDetailsAndActionsIntegration(UniversalBaseModel):
name: str
categories: typing.List[CategoriesEnum]
image: typing.Optional[str]
@@ -19,20 +18,11 @@ class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/account_details_and_actions_status_enum.py b/src/merge/resources/ats/types/account_details_and_actions_status_enum.py
index a904e550..47a6e845 100644
--- a/src/merge/resources/ats/types/account_details_and_actions_status_enum.py
+++ b/src/merge/resources/ats/types/account_details_and_actions_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountDetailsAndActionsStatusEnum(str, enum.Enum):
- """
- - `COMPLETE` - COMPLETE
- - `INCOMPLETE` - INCOMPLETE
- - `RELINK_NEEDED` - RELINK_NEEDED
- """
-
- COMPLETE = "COMPLETE"
- INCOMPLETE = "INCOMPLETE"
- RELINK_NEEDED = "RELINK_NEEDED"
-
- def visit(
- self,
- complete: typing.Callable[[], T_Result],
- incomplete: typing.Callable[[], T_Result],
- relink_needed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountDetailsAndActionsStatusEnum.COMPLETE:
- return complete()
- if self is AccountDetailsAndActionsStatusEnum.INCOMPLETE:
- return incomplete()
- if self is AccountDetailsAndActionsStatusEnum.RELINK_NEEDED:
- return relink_needed()
+AccountDetailsAndActionsStatusEnum = typing.Union[typing.Literal["COMPLETE", "INCOMPLETE", "RELINK_NEEDED"], typing.Any]
diff --git a/src/merge/resources/ats/types/account_integration.py b/src/merge/resources/ats/types/account_integration.py
index ad3fd193..b1e4ec7e 100644
--- a/src/merge/resources/ats/types/account_integration.py
+++ b/src/merge/resources/ats/types/account_integration.py
@@ -1,74 +1,66 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountIntegration(pydantic_v1.BaseModel):
- name: str = pydantic_v1.Field()
+class AccountIntegration(UniversalBaseModel):
+ name: str = pydantic.Field()
"""
Company name.
"""
- abbreviated_name: typing.Optional[str] = pydantic_v1.Field()
+ abbreviated_name: typing.Optional[str] = pydantic.Field()
"""
Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).
Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)
"""
- categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic_v1.Field()
+ categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic.Field()
"""
Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].
"""
- image: typing.Optional[str] = pydantic_v1.Field()
+ image: typing.Optional[str] = pydantic.Field()
"""
Company logo in rectangular shape. Upload an image with a clear background.
"""
- square_image: typing.Optional[str] = pydantic_v1.Field()
+ square_image: typing.Optional[str] = pydantic.Field()
"""
Company logo in square shape. Upload an image with a white background.
"""
- color: typing.Optional[str] = pydantic_v1.Field()
+ color: typing.Optional[str] = pydantic.Field()
"""
The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color.
"""
slug: typing.Optional[str]
- api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = (
+ pydantic.Field()
+ )
"""
Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}
"""
- webhook_setup_guide_url: typing.Optional[str] = pydantic_v1.Field()
+ webhook_setup_guide_url: typing.Optional[str] = pydantic.Field()
"""
Setup guide URL for third party webhook creation. Exposed in Merge Docs.
"""
- category_beta_status: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ category_beta_status: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
Category or categories this integration is in beta status for.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/account_token.py b/src/merge/resources/ats/types/account_token.py
index 4794fea3..fa8b76ec 100644
--- a/src/merge/resources/ats/types/account_token.py
+++ b/src/merge/resources/ats/types/account_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class AccountToken(pydantic_v1.BaseModel):
+class AccountToken(UniversalBaseModel):
account_token: str
integration: AccountIntegration
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/activity.py b/src/merge/resources/ats/types/activity.py
index 629e0c74..303f6e69 100644
--- a/src/merge/resources/ats/types/activity.py
+++ b/src/merge/resources/ats/types/activity.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .activity_activity_type import ActivityActivityType
+import pydantic
+import datetime as dt
from .activity_user import ActivityUser
+from .activity_activity_type import ActivityActivityType
from .activity_visibility import ActivityVisibility
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Activity(pydantic_v1.BaseModel):
+class Activity(UniversalBaseModel):
"""
# The Activity Object
@@ -25,32 +25,32 @@ class Activity(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- user: typing.Optional[ActivityUser] = pydantic_v1.Field()
+ user: typing.Optional[ActivityUser] = pydantic.Field()
"""
The user that performed the action.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's activity was created.
"""
- activity_type: typing.Optional[ActivityActivityType] = pydantic_v1.Field()
+ activity_type: typing.Optional[ActivityActivityType] = pydantic.Field()
"""
The activity's type.
@@ -59,17 +59,17 @@ class Activity(pydantic_v1.BaseModel):
- `OTHER` - OTHER
"""
- subject: typing.Optional[str] = pydantic_v1.Field()
+ subject: typing.Optional[str] = pydantic.Field()
"""
The activity's subject.
"""
- body: typing.Optional[str] = pydantic_v1.Field()
+ body: typing.Optional[str] = pydantic.Field()
"""
The activity's body.
"""
- visibility: typing.Optional[ActivityVisibility] = pydantic_v1.Field()
+ visibility: typing.Optional[ActivityVisibility] = pydantic.Field()
"""
The activity's visibility.
@@ -79,28 +79,19 @@ class Activity(pydantic_v1.BaseModel):
"""
candidate: typing.Optional[str]
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/activity_activity_type.py b/src/merge/resources/ats/types/activity_activity_type.py
index f369e7f0..e3e18da3 100644
--- a/src/merge/resources/ats/types/activity_activity_type.py
+++ b/src/merge/resources/ats/types/activity_activity_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .activity_type_enum import ActivityTypeEnum
ActivityActivityType = typing.Union[ActivityTypeEnum, str]
diff --git a/src/merge/resources/ats/types/activity_request.py b/src/merge/resources/ats/types/activity_request.py
index f0aef1ad..12a644e0 100644
--- a/src/merge/resources/ats/types/activity_request.py
+++ b/src/merge/resources/ats/types/activity_request.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .activity_request_activity_type import ActivityRequestActivityType
from .activity_request_user import ActivityRequestUser
+import pydantic
+from .activity_request_activity_type import ActivityRequestActivityType
from .activity_request_visibility import ActivityRequestVisibility
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ActivityRequest(pydantic_v1.BaseModel):
+class ActivityRequest(UniversalBaseModel):
"""
# The Activity Object
@@ -23,12 +22,12 @@ class ActivityRequest(pydantic_v1.BaseModel):
Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities.
"""
- user: typing.Optional[ActivityRequestUser] = pydantic_v1.Field()
+ user: typing.Optional[ActivityRequestUser] = pydantic.Field()
"""
The user that performed the action.
"""
- activity_type: typing.Optional[ActivityRequestActivityType] = pydantic_v1.Field()
+ activity_type: typing.Optional[ActivityRequestActivityType] = pydantic.Field()
"""
The activity's type.
@@ -37,17 +36,17 @@ class ActivityRequest(pydantic_v1.BaseModel):
- `OTHER` - OTHER
"""
- subject: typing.Optional[str] = pydantic_v1.Field()
+ subject: typing.Optional[str] = pydantic.Field()
"""
The activity's subject.
"""
- body: typing.Optional[str] = pydantic_v1.Field()
+ body: typing.Optional[str] = pydantic.Field()
"""
The activity's body.
"""
- visibility: typing.Optional[ActivityRequestVisibility] = pydantic_v1.Field()
+ visibility: typing.Optional[ActivityRequestVisibility] = pydantic.Field()
"""
The activity's visibility.
@@ -57,23 +56,14 @@ class ActivityRequest(pydantic_v1.BaseModel):
"""
candidate: typing.Optional[str]
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/activity_request_activity_type.py b/src/merge/resources/ats/types/activity_request_activity_type.py
index f4236ee0..1caa72fb 100644
--- a/src/merge/resources/ats/types/activity_request_activity_type.py
+++ b/src/merge/resources/ats/types/activity_request_activity_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .activity_type_enum import ActivityTypeEnum
ActivityRequestActivityType = typing.Union[ActivityTypeEnum, str]
diff --git a/src/merge/resources/ats/types/activity_request_user.py b/src/merge/resources/ats/types/activity_request_user.py
index 9c4dfb0f..0daab4af 100644
--- a/src/merge/resources/ats/types/activity_request_user.py
+++ b/src/merge/resources/ats/types/activity_request_user.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ActivityRequestUser = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/activity_request_visibility.py b/src/merge/resources/ats/types/activity_request_visibility.py
index 07ab9c7a..2ed042b9 100644
--- a/src/merge/resources/ats/types/activity_request_visibility.py
+++ b/src/merge/resources/ats/types/activity_request_visibility.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .visibility_enum import VisibilityEnum
ActivityRequestVisibility = typing.Union[VisibilityEnum, str]
diff --git a/src/merge/resources/ats/types/activity_response.py b/src/merge/resources/ats/types/activity_response.py
index 7b71f045..29d5951c 100644
--- a/src/merge/resources/ats/types/activity_response.py
+++ b/src/merge/resources/ats/types/activity_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .activity import Activity
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ActivityResponse(pydantic_v1.BaseModel):
+class ActivityResponse(UniversalBaseModel):
model: Activity
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/activity_type_enum.py b/src/merge/resources/ats/types/activity_type_enum.py
index 87d18e41..a3244b6b 100644
--- a/src/merge/resources/ats/types/activity_type_enum.py
+++ b/src/merge/resources/ats/types/activity_type_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ActivityTypeEnum(str, enum.Enum):
- """
- - `NOTE` - NOTE
- - `EMAIL` - EMAIL
- - `OTHER` - OTHER
- """
-
- NOTE = "NOTE"
- EMAIL = "EMAIL"
- OTHER = "OTHER"
-
- def visit(
- self,
- note: typing.Callable[[], T_Result],
- email: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ActivityTypeEnum.NOTE:
- return note()
- if self is ActivityTypeEnum.EMAIL:
- return email()
- if self is ActivityTypeEnum.OTHER:
- return other()
+ActivityTypeEnum = typing.Union[typing.Literal["NOTE", "EMAIL", "OTHER"], typing.Any]
diff --git a/src/merge/resources/ats/types/activity_user.py b/src/merge/resources/ats/types/activity_user.py
index db261e0f..7a1dca8c 100644
--- a/src/merge/resources/ats/types/activity_user.py
+++ b/src/merge/resources/ats/types/activity_user.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ActivityUser = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/activity_visibility.py b/src/merge/resources/ats/types/activity_visibility.py
index a6d51ff6..45f91682 100644
--- a/src/merge/resources/ats/types/activity_visibility.py
+++ b/src/merge/resources/ats/types/activity_visibility.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .visibility_enum import VisibilityEnum
ActivityVisibility = typing.Union[VisibilityEnum, str]
diff --git a/src/merge/resources/ats/types/advanced_metadata.py b/src/merge/resources/ats/types/advanced_metadata.py
index 2aa7d1d6..6287a842 100644
--- a/src/merge/resources/ats/types/advanced_metadata.py
+++ b/src/merge/resources/ats/types/advanced_metadata.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AdvancedMetadata(pydantic_v1.BaseModel):
+class AdvancedMetadata(UniversalBaseModel):
id: str
display_name: typing.Optional[str]
description: typing.Optional[str]
is_required: typing.Optional[bool]
is_custom: typing.Optional[bool]
- field_choices: typing.Optional[typing.List[typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_choices: typing.Optional[typing.List[typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/application.py b/src/merge/resources/ats/types/application.py
index d06e7f8a..86e4bf98 100644
--- a/src/merge/resources/ats/types/application.py
+++ b/src/merge/resources/ats/types/application.py
@@ -1,21 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from .application_job import ApplicationJob
from .application_credited_to import ApplicationCreditedTo
+from .application_screening_question_answers_item import ApplicationScreeningQuestionAnswersItem
from .application_current_stage import ApplicationCurrentStage
-from .application_job import ApplicationJob
from .application_reject_reason import ApplicationRejectReason
-from .application_screening_question_answers_item import ApplicationScreeningQuestionAnswersItem
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Application(pydantic_v1.BaseModel):
+class Application(UniversalBaseModel):
"""
# The Application Object
@@ -29,87 +29,82 @@ class Application(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- candidate: typing.Optional[ApplicationCandidate] = pydantic_v1.Field()
+ candidate: typing.Optional["ApplicationCandidate"] = pydantic.Field()
"""
The candidate applying.
"""
- job: typing.Optional[ApplicationJob] = pydantic_v1.Field()
+ job: typing.Optional[ApplicationJob] = pydantic.Field()
"""
The job being applied for.
"""
- applied_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ applied_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the application was submitted.
"""
- rejected_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ rejected_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the application was rejected.
"""
- offers: typing.Optional[typing.List[typing.Optional[ApplicationOffersItem]]]
- source: typing.Optional[str] = pydantic_v1.Field()
+ offers: typing.Optional[typing.List[typing.Optional["ApplicationOffersItem"]]]
+ source: typing.Optional[str] = pydantic.Field()
"""
The application's source.
"""
- credited_to: typing.Optional[ApplicationCreditedTo] = pydantic_v1.Field()
+ credited_to: typing.Optional[ApplicationCreditedTo] = pydantic.Field()
"""
The user credited for this application.
"""
screening_question_answers: typing.Optional[typing.List[ApplicationScreeningQuestionAnswersItem]]
- current_stage: typing.Optional[ApplicationCurrentStage] = pydantic_v1.Field()
+ current_stage: typing.Optional[ApplicationCurrentStage] = pydantic.Field()
"""
The application's current stage.
"""
- reject_reason: typing.Optional[ApplicationRejectReason] = pydantic_v1.Field()
+ reject_reason: typing.Optional[ApplicationRejectReason] = pydantic.Field()
"""
The application's reason for rejection.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+from .candidate import Candidate # noqa: E402
+from .offer import Offer # noqa: E402
from .application_candidate import ApplicationCandidate # noqa: E402
from .application_offers_item import ApplicationOffersItem # noqa: E402
-Application.update_forward_refs()
+update_forward_refs(Candidate, Application=Application)
+update_forward_refs(Offer, Application=Application)
+update_forward_refs(Application)
diff --git a/src/merge/resources/ats/types/application_candidate.py b/src/merge/resources/ats/types/application_candidate.py
index 01933cce..a866b355 100644
--- a/src/merge/resources/ats/types/application_candidate.py
+++ b/src/merge/resources/ats/types/application_candidate.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .candidate import Candidate
-
-ApplicationCandidate = typing.Union[str, Candidate]
+if typing.TYPE_CHECKING:
+ from .candidate import Candidate
+ApplicationCandidate = typing.Union[str, "Candidate"]
diff --git a/src/merge/resources/ats/types/application_credited_to.py b/src/merge/resources/ats/types/application_credited_to.py
index 9e58ac83..d5acca51 100644
--- a/src/merge/resources/ats/types/application_credited_to.py
+++ b/src/merge/resources/ats/types/application_credited_to.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ApplicationCreditedTo = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/application_current_stage.py b/src/merge/resources/ats/types/application_current_stage.py
index 599a3159..46007b6e 100644
--- a/src/merge/resources/ats/types/application_current_stage.py
+++ b/src/merge/resources/ats/types/application_current_stage.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job_interview_stage import JobInterviewStage
ApplicationCurrentStage = typing.Union[str, JobInterviewStage]
diff --git a/src/merge/resources/ats/types/application_job.py b/src/merge/resources/ats/types/application_job.py
index 17285343..aeb23d1e 100644
--- a/src/merge/resources/ats/types/application_job.py
+++ b/src/merge/resources/ats/types/application_job.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job import Job
ApplicationJob = typing.Union[str, Job]
diff --git a/src/merge/resources/ats/types/application_offers_item.py b/src/merge/resources/ats/types/application_offers_item.py
index 2bc76f08..88a5bfea 100644
--- a/src/merge/resources/ats/types/application_offers_item.py
+++ b/src/merge/resources/ats/types/application_offers_item.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .offer import Offer
-
-ApplicationOffersItem = typing.Union[str, Offer]
+if typing.TYPE_CHECKING:
+ from .offer import Offer
+ApplicationOffersItem = typing.Union[str, "Offer"]
diff --git a/src/merge/resources/ats/types/application_reject_reason.py b/src/merge/resources/ats/types/application_reject_reason.py
index c4a28a8e..7d17736e 100644
--- a/src/merge/resources/ats/types/application_reject_reason.py
+++ b/src/merge/resources/ats/types/application_reject_reason.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .reject_reason import RejectReason
ApplicationRejectReason = typing.Union[str, RejectReason]
diff --git a/src/merge/resources/ats/types/application_request.py b/src/merge/resources/ats/types/application_request.py
index 57b23972..e9b8a39a 100644
--- a/src/merge/resources/ats/types/application_request.py
+++ b/src/merge/resources/ats/types/application_request.py
@@ -1,20 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .application_request_candidate import ApplicationRequestCandidate
-from .application_request_credited_to import ApplicationRequestCreditedTo
-from .application_request_current_stage import ApplicationRequestCurrentStage
+import pydantic
from .application_request_job import ApplicationRequestJob
+import datetime as dt
from .application_request_offers_item import ApplicationRequestOffersItem
-from .application_request_reject_reason import ApplicationRequestRejectReason
+from .application_request_credited_to import ApplicationRequestCreditedTo
from .application_request_screening_question_answers_item import ApplicationRequestScreeningQuestionAnswersItem
+from .application_request_current_stage import ApplicationRequestCurrentStage
+from .application_request_reject_reason import ApplicationRequestRejectReason
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class ApplicationRequest(pydantic_v1.BaseModel):
+class ApplicationRequest(UniversalBaseModel):
"""
# The Application Object
@@ -27,66 +32,62 @@ class ApplicationRequest(pydantic_v1.BaseModel):
Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications.
"""
- candidate: typing.Optional[ApplicationRequestCandidate] = pydantic_v1.Field()
+ candidate: typing.Optional[ApplicationRequestCandidate] = pydantic.Field()
"""
The candidate applying.
"""
- job: typing.Optional[ApplicationRequestJob] = pydantic_v1.Field()
+ job: typing.Optional[ApplicationRequestJob] = pydantic.Field()
"""
The job being applied for.
"""
- applied_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ applied_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the application was submitted.
"""
- rejected_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ rejected_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the application was rejected.
"""
offers: typing.Optional[typing.List[typing.Optional[ApplicationRequestOffersItem]]]
- source: typing.Optional[str] = pydantic_v1.Field()
+ source: typing.Optional[str] = pydantic.Field()
"""
The application's source.
"""
- credited_to: typing.Optional[ApplicationRequestCreditedTo] = pydantic_v1.Field()
+ credited_to: typing.Optional[ApplicationRequestCreditedTo] = pydantic.Field()
"""
The user credited for this application.
"""
screening_question_answers: typing.Optional[typing.List[ApplicationRequestScreeningQuestionAnswersItem]]
- current_stage: typing.Optional[ApplicationRequestCurrentStage] = pydantic_v1.Field()
+ current_stage: typing.Optional[ApplicationRequestCurrentStage] = pydantic.Field()
"""
The application's current stage.
"""
- reject_reason: typing.Optional[ApplicationRequestRejectReason] = pydantic_v1.Field()
+ reject_reason: typing.Optional[ApplicationRequestRejectReason] = pydantic.Field()
"""
The application's reason for rejection.
"""
remote_template_id: typing.Optional[str]
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+
+ 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
+
+
+update_forward_refs(Application, ApplicationRequest=ApplicationRequest)
+update_forward_refs(Candidate, ApplicationRequest=ApplicationRequest)
+update_forward_refs(Offer, ApplicationRequest=ApplicationRequest)
diff --git a/src/merge/resources/ats/types/application_request_candidate.py b/src/merge/resources/ats/types/application_request_candidate.py
index f931b70e..5433c318 100644
--- a/src/merge/resources/ats/types/application_request_candidate.py
+++ b/src/merge/resources/ats/types/application_request_candidate.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .candidate import Candidate
ApplicationRequestCandidate = typing.Union[str, Candidate]
diff --git a/src/merge/resources/ats/types/application_request_credited_to.py b/src/merge/resources/ats/types/application_request_credited_to.py
index a8ccaeff..771fd16d 100644
--- a/src/merge/resources/ats/types/application_request_credited_to.py
+++ b/src/merge/resources/ats/types/application_request_credited_to.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ApplicationRequestCreditedTo = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/application_request_current_stage.py b/src/merge/resources/ats/types/application_request_current_stage.py
index dd56a6d3..393c89ba 100644
--- a/src/merge/resources/ats/types/application_request_current_stage.py
+++ b/src/merge/resources/ats/types/application_request_current_stage.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job_interview_stage import JobInterviewStage
ApplicationRequestCurrentStage = typing.Union[str, JobInterviewStage]
diff --git a/src/merge/resources/ats/types/application_request_job.py b/src/merge/resources/ats/types/application_request_job.py
index 354968cd..15344451 100644
--- a/src/merge/resources/ats/types/application_request_job.py
+++ b/src/merge/resources/ats/types/application_request_job.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job import Job
ApplicationRequestJob = typing.Union[str, Job]
diff --git a/src/merge/resources/ats/types/application_request_offers_item.py b/src/merge/resources/ats/types/application_request_offers_item.py
index 1c727579..a0405e7a 100644
--- a/src/merge/resources/ats/types/application_request_offers_item.py
+++ b/src/merge/resources/ats/types/application_request_offers_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .offer import Offer
ApplicationRequestOffersItem = typing.Union[str, Offer]
diff --git a/src/merge/resources/ats/types/application_request_reject_reason.py b/src/merge/resources/ats/types/application_request_reject_reason.py
index 03e47492..93371cfd 100644
--- a/src/merge/resources/ats/types/application_request_reject_reason.py
+++ b/src/merge/resources/ats/types/application_request_reject_reason.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .reject_reason import RejectReason
ApplicationRequestRejectReason = typing.Union[str, RejectReason]
diff --git a/src/merge/resources/ats/types/application_request_screening_question_answers_item.py b/src/merge/resources/ats/types/application_request_screening_question_answers_item.py
index 810e10fa..a4994686 100644
--- a/src/merge/resources/ats/types/application_request_screening_question_answers_item.py
+++ b/src/merge/resources/ats/types/application_request_screening_question_answers_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .screening_question_answer_request import ScreeningQuestionAnswerRequest
ApplicationRequestScreeningQuestionAnswersItem = typing.Union[str, ScreeningQuestionAnswerRequest]
diff --git a/src/merge/resources/ats/types/application_response.py b/src/merge/resources/ats/types/application_response.py
index d4b00062..7e8cb1fd 100644
--- a/src/merge/resources/ats/types/application_response.py
+++ b/src/merge/resources/ats/types/application_response.py
@@ -1,36 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .application import Application
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from .candidate import Candidate
+from .offer import Offer
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class ApplicationResponse(pydantic_v1.BaseModel):
+class ApplicationResponse(UniversalBaseModel):
model: Application
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, ApplicationResponse=ApplicationResponse)
+update_forward_refs(Candidate, ApplicationResponse=ApplicationResponse)
+update_forward_refs(Offer, ApplicationResponse=ApplicationResponse)
diff --git a/src/merge/resources/ats/types/application_screening_question_answers_item.py b/src/merge/resources/ats/types/application_screening_question_answers_item.py
index 42cc4b76..7db5cca9 100644
--- a/src/merge/resources/ats/types/application_screening_question_answers_item.py
+++ b/src/merge/resources/ats/types/application_screening_question_answers_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .screening_question_answer import ScreeningQuestionAnswer
ApplicationScreeningQuestionAnswersItem = typing.Union[str, ScreeningQuestionAnswer]
diff --git a/src/merge/resources/ats/types/async_passthrough_reciept.py b/src/merge/resources/ats/types/async_passthrough_reciept.py
index 2cc33210..43dc5284 100644
--- a/src/merge/resources/ats/types/async_passthrough_reciept.py
+++ b/src/merge/resources/ats/types/async_passthrough_reciept.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AsyncPassthroughReciept(pydantic_v1.BaseModel):
+class AsyncPassthroughReciept(UniversalBaseModel):
async_passthrough_receipt_id: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/attachment.py b/src/merge/resources/ats/types/attachment.py
index 5d773ba6..b987c1cf 100644
--- a/src/merge/resources/ats/types/attachment.py
+++ b/src/merge/resources/ats/types/attachment.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .attachment_attachment_type import AttachmentAttachmentType
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Attachment(pydantic_v1.BaseModel):
+class Attachment(UniversalBaseModel):
"""
# The Attachment Object
@@ -23,37 +23,37 @@ class Attachment(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The attachment's name.
"""
- file_url: typing.Optional[str] = pydantic_v1.Field()
+ file_url: typing.Optional[str] = pydantic.Field()
"""
The attachment's url.
"""
- candidate: typing.Optional[str] = pydantic_v1.Field()
+ candidate: typing.Optional[str] = pydantic.Field()
"""
"""
- attachment_type: typing.Optional[AttachmentAttachmentType] = pydantic_v1.Field()
+ attachment_type: typing.Optional[AttachmentAttachmentType] = pydantic.Field()
"""
The attachment's type.
@@ -64,23 +64,14 @@ class Attachment(pydantic_v1.BaseModel):
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/attachment_attachment_type.py b/src/merge/resources/ats/types/attachment_attachment_type.py
index e767759b..0b4e8856 100644
--- a/src/merge/resources/ats/types/attachment_attachment_type.py
+++ b/src/merge/resources/ats/types/attachment_attachment_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .attachment_type_enum import AttachmentTypeEnum
AttachmentAttachmentType = typing.Union[AttachmentTypeEnum, str]
diff --git a/src/merge/resources/ats/types/attachment_request.py b/src/merge/resources/ats/types/attachment_request.py
index 80d09024..ecddf9f3 100644
--- a/src/merge/resources/ats/types/attachment_request.py
+++ b/src/merge/resources/ats/types/attachment_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .attachment_request_attachment_type import AttachmentRequestAttachmentType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AttachmentRequest(pydantic_v1.BaseModel):
+class AttachmentRequest(UniversalBaseModel):
"""
# The Attachment Object
@@ -21,22 +20,22 @@ class AttachmentRequest(pydantic_v1.BaseModel):
Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company.
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The attachment's name.
"""
- file_url: typing.Optional[str] = pydantic_v1.Field()
+ file_url: typing.Optional[str] = pydantic.Field()
"""
The attachment's url.
"""
- candidate: typing.Optional[str] = pydantic_v1.Field()
+ candidate: typing.Optional[str] = pydantic.Field()
"""
"""
- attachment_type: typing.Optional[AttachmentRequestAttachmentType] = pydantic_v1.Field()
+ attachment_type: typing.Optional[AttachmentRequestAttachmentType] = pydantic.Field()
"""
The attachment's type.
@@ -46,23 +45,14 @@ class AttachmentRequest(pydantic_v1.BaseModel):
- `OTHER` - OTHER
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/attachment_request_attachment_type.py b/src/merge/resources/ats/types/attachment_request_attachment_type.py
index c3d6d377..e6afb6bb 100644
--- a/src/merge/resources/ats/types/attachment_request_attachment_type.py
+++ b/src/merge/resources/ats/types/attachment_request_attachment_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .attachment_type_enum import AttachmentTypeEnum
AttachmentRequestAttachmentType = typing.Union[AttachmentTypeEnum, str]
diff --git a/src/merge/resources/ats/types/attachment_response.py b/src/merge/resources/ats/types/attachment_response.py
index ba831e07..608efe36 100644
--- a/src/merge/resources/ats/types/attachment_response.py
+++ b/src/merge/resources/ats/types/attachment_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .attachment import Attachment
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AttachmentResponse(pydantic_v1.BaseModel):
+class AttachmentResponse(UniversalBaseModel):
model: Attachment
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/attachment_type_enum.py b/src/merge/resources/ats/types/attachment_type_enum.py
index 94198900..f9146c69 100644
--- a/src/merge/resources/ats/types/attachment_type_enum.py
+++ b/src/merge/resources/ats/types/attachment_type_enum.py
@@ -1,36 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AttachmentTypeEnum(str, enum.Enum):
- """
- - `RESUME` - RESUME
- - `COVER_LETTER` - COVER_LETTER
- - `OFFER_LETTER` - OFFER_LETTER
- - `OTHER` - OTHER
- """
-
- RESUME = "RESUME"
- COVER_LETTER = "COVER_LETTER"
- OFFER_LETTER = "OFFER_LETTER"
- OTHER = "OTHER"
-
- def visit(
- self,
- resume: typing.Callable[[], T_Result],
- cover_letter: typing.Callable[[], T_Result],
- offer_letter: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AttachmentTypeEnum.RESUME:
- return resume()
- if self is AttachmentTypeEnum.COVER_LETTER:
- return cover_letter()
- if self is AttachmentTypeEnum.OFFER_LETTER:
- return offer_letter()
- if self is AttachmentTypeEnum.OTHER:
- return other()
+AttachmentTypeEnum = typing.Union[typing.Literal["RESUME", "COVER_LETTER", "OFFER_LETTER", "OTHER"], typing.Any]
diff --git a/src/merge/resources/ats/types/audit_log_event.py b/src/merge/resources/ats/types/audit_log_event.py
index 051c0286..b57101fc 100644
--- a/src/merge/resources/ats/types/audit_log_event.py
+++ b/src/merge/resources/ats/types/audit_log_event.py
@@ -1,27 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .audit_log_event_event_type import AuditLogEventEventType
+import pydantic
from .audit_log_event_role import AuditLogEventRole
+from .audit_log_event_event_type import AuditLogEventEventType
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AuditLogEvent(pydantic_v1.BaseModel):
+class AuditLogEvent(UniversalBaseModel):
id: typing.Optional[str]
- user_name: typing.Optional[str] = pydantic_v1.Field()
+ user_name: typing.Optional[str] = pydantic.Field()
"""
The User's full name at the time of this Event occurring.
"""
- user_email: typing.Optional[str] = pydantic_v1.Field()
+ user_email: typing.Optional[str] = pydantic.Field()
"""
The User's email at the time of this Event occurring.
"""
- role: AuditLogEventRole = pydantic_v1.Field()
+ role: AuditLogEventRole = pydantic.Field()
"""
Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.
@@ -34,7 +34,7 @@ class AuditLogEvent(pydantic_v1.BaseModel):
"""
ip_address: str
- event_type: AuditLogEventEventType = pydantic_v1.Field()
+ event_type: AuditLogEventEventType = pydantic.Field()
"""
Designates the type of event that occurred.
@@ -81,20 +81,11 @@ class AuditLogEvent(pydantic_v1.BaseModel):
event_description: str
created_at: typing.Optional[dt.datetime]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/audit_log_event_event_type.py b/src/merge/resources/ats/types/audit_log_event_event_type.py
index f9c9d2b3..f9d43eed 100644
--- a/src/merge/resources/ats/types/audit_log_event_event_type.py
+++ b/src/merge/resources/ats/types/audit_log_event_event_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .event_type_enum import EventTypeEnum
AuditLogEventEventType = typing.Union[EventTypeEnum, str]
diff --git a/src/merge/resources/ats/types/audit_log_event_role.py b/src/merge/resources/ats/types/audit_log_event_role.py
index fe91ed6f..83ecd93a 100644
--- a/src/merge/resources/ats/types/audit_log_event_role.py
+++ b/src/merge/resources/ats/types/audit_log_event_role.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .role_enum import RoleEnum
AuditLogEventRole = typing.Union[RoleEnum, str]
diff --git a/src/merge/resources/ats/types/available_actions.py b/src/merge/resources/ats/types/available_actions.py
index bbd94581..5f164db6 100644
--- a/src/merge/resources/ats/types/available_actions.py
+++ b/src/merge/resources/ats/types/available_actions.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+import typing
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AvailableActions(pydantic_v1.BaseModel):
+class AvailableActions(UniversalBaseModel):
"""
# The AvailableActions Object
@@ -26,20 +25,11 @@ class AvailableActions(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/candidate.py b/src/merge/resources/ats/types/candidate.py
index 26e44fc5..eccc17ef 100644
--- a/src/merge/resources/ats/types/candidate.py
+++ b/src/merge/resources/ats/types/candidate.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .candidate_attachments_item import CandidateAttachmentsItem
-from .email_address import EmailAddress
+import pydantic
+import datetime as dt
from .phone_number import PhoneNumber
-from .remote_data import RemoteData
+from .email_address import EmailAddress
from .url import Url
+from .candidate_attachments_item import CandidateAttachmentsItem
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Candidate(pydantic_v1.BaseModel):
+class Candidate(UniversalBaseModel):
"""
# The Candidate Object
@@ -28,67 +28,67 @@ class Candidate(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The candidate's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The candidate's last name.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The candidate's current company.
"""
- title: typing.Optional[str] = pydantic_v1.Field()
+ title: typing.Optional[str] = pydantic.Field()
"""
The candidate's current title.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's candidate was created.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's candidate was updated.
"""
- last_interaction_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_interaction_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the most recent interaction with the candidate occurred.
"""
- is_private: typing.Optional[bool] = pydantic_v1.Field()
+ is_private: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the candidate is private.
"""
- can_email: typing.Optional[bool] = pydantic_v1.Field()
+ can_email: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the candidate can be emailed.
"""
- locations: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ locations: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The candidate's locations.
"""
@@ -96,44 +96,39 @@ class Candidate(pydantic_v1.BaseModel):
phone_numbers: typing.Optional[typing.List[PhoneNumber]]
email_addresses: typing.Optional[typing.List[EmailAddress]]
urls: typing.Optional[typing.List[Url]]
- tags: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ tags: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
Array of `Tag` names as strings.
"""
- applications: typing.Optional[typing.List[typing.Optional[CandidateApplicationsItem]]] = pydantic_v1.Field()
+ applications: typing.Optional[typing.List[typing.Optional["CandidateApplicationsItem"]]] = pydantic.Field()
"""
Array of `Application` object IDs.
"""
- attachments: typing.Optional[typing.List[typing.Optional[CandidateAttachmentsItem]]] = pydantic_v1.Field()
+ attachments: typing.Optional[typing.List[typing.Optional[CandidateAttachmentsItem]]] = pydantic.Field()
"""
Array of `Attachment` object IDs.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+from .application import Application # noqa: E402
+from .offer import Offer # noqa: E402
from .candidate_applications_item import CandidateApplicationsItem # noqa: E402
-Candidate.update_forward_refs()
+update_forward_refs(Application, Candidate=Candidate)
+update_forward_refs(Offer, Candidate=Candidate)
+update_forward_refs(Candidate)
diff --git a/src/merge/resources/ats/types/candidate_applications_item.py b/src/merge/resources/ats/types/candidate_applications_item.py
index f39842cb..99ad96d9 100644
--- a/src/merge/resources/ats/types/candidate_applications_item.py
+++ b/src/merge/resources/ats/types/candidate_applications_item.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .application import Application
-
-CandidateApplicationsItem = typing.Union[str, Application]
+if typing.TYPE_CHECKING:
+ from .application import Application
+CandidateApplicationsItem = typing.Union[str, "Application"]
diff --git a/src/merge/resources/ats/types/candidate_attachments_item.py b/src/merge/resources/ats/types/candidate_attachments_item.py
index b5076acd..94bc14c6 100644
--- a/src/merge/resources/ats/types/candidate_attachments_item.py
+++ b/src/merge/resources/ats/types/candidate_attachments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .attachment import Attachment
CandidateAttachmentsItem = typing.Union[str, Attachment]
diff --git a/src/merge/resources/ats/types/candidate_request.py b/src/merge/resources/ats/types/candidate_request.py
index d80ba1a5..597627ef 100644
--- a/src/merge/resources/ats/types/candidate_request.py
+++ b/src/merge/resources/ats/types/candidate_request.py
@@ -1,18 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .candidate_request_applications_item import CandidateRequestApplicationsItem
-from .candidate_request_attachments_item import CandidateRequestAttachmentsItem
-from .email_address_request import EmailAddressRequest
+import pydantic
+import datetime as dt
from .phone_number_request import PhoneNumberRequest
+from .email_address_request import EmailAddressRequest
from .url_request import UrlRequest
+from .candidate_request_applications_item import CandidateRequestApplicationsItem
+from .candidate_request_attachments_item import CandidateRequestAttachmentsItem
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class CandidateRequest(pydantic_v1.BaseModel):
+class CandidateRequest(UniversalBaseModel):
"""
# The Candidate Object
@@ -25,42 +30,42 @@ class CandidateRequest(pydantic_v1.BaseModel):
Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The candidate's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The candidate's last name.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The candidate's current company.
"""
- title: typing.Optional[str] = pydantic_v1.Field()
+ title: typing.Optional[str] = pydantic.Field()
"""
The candidate's current title.
"""
- last_interaction_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_interaction_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the most recent interaction with the candidate occurred.
"""
- is_private: typing.Optional[bool] = pydantic_v1.Field()
+ is_private: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the candidate is private.
"""
- can_email: typing.Optional[bool] = pydantic_v1.Field()
+ can_email: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the candidate can be emailed.
"""
- locations: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ locations: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The candidate's locations.
"""
@@ -68,39 +73,35 @@ class CandidateRequest(pydantic_v1.BaseModel):
phone_numbers: typing.Optional[typing.List[PhoneNumberRequest]]
email_addresses: typing.Optional[typing.List[EmailAddressRequest]]
urls: typing.Optional[typing.List[UrlRequest]]
- tags: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ tags: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
Array of `Tag` names as strings.
"""
- applications: typing.Optional[typing.List[typing.Optional[CandidateRequestApplicationsItem]]] = pydantic_v1.Field()
+ applications: typing.Optional[typing.List[typing.Optional[CandidateRequestApplicationsItem]]] = pydantic.Field()
"""
Array of `Application` object IDs.
"""
- attachments: typing.Optional[typing.List[typing.Optional[CandidateRequestAttachmentsItem]]] = pydantic_v1.Field()
+ attachments: typing.Optional[typing.List[typing.Optional[CandidateRequestAttachmentsItem]]] = pydantic.Field()
"""
Array of `Attachment` object IDs.
"""
remote_template_id: typing.Optional[str]
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+
+ 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
+
+
+update_forward_refs(Application, CandidateRequest=CandidateRequest)
+update_forward_refs(Candidate, CandidateRequest=CandidateRequest)
+update_forward_refs(Offer, CandidateRequest=CandidateRequest)
diff --git a/src/merge/resources/ats/types/candidate_request_applications_item.py b/src/merge/resources/ats/types/candidate_request_applications_item.py
index 4c31a29e..7de152ae 100644
--- a/src/merge/resources/ats/types/candidate_request_applications_item.py
+++ b/src/merge/resources/ats/types/candidate_request_applications_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .application import Application
CandidateRequestApplicationsItem = typing.Union[str, Application]
diff --git a/src/merge/resources/ats/types/candidate_request_attachments_item.py b/src/merge/resources/ats/types/candidate_request_attachments_item.py
index be6c3558..9afe74df 100644
--- a/src/merge/resources/ats/types/candidate_request_attachments_item.py
+++ b/src/merge/resources/ats/types/candidate_request_attachments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .attachment import Attachment
CandidateRequestAttachmentsItem = typing.Union[str, Attachment]
diff --git a/src/merge/resources/ats/types/candidate_response.py b/src/merge/resources/ats/types/candidate_response.py
index af94e809..17fb6652 100644
--- a/src/merge/resources/ats/types/candidate_response.py
+++ b/src/merge/resources/ats/types/candidate_response.py
@@ -1,36 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
from .candidate import Candidate
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from .offer import Offer
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class CandidateResponse(pydantic_v1.BaseModel):
+class CandidateResponse(UniversalBaseModel):
model: Candidate
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, CandidateResponse=CandidateResponse)
+update_forward_refs(Candidate, CandidateResponse=CandidateResponse)
+update_forward_refs(Offer, CandidateResponse=CandidateResponse)
diff --git a/src/merge/resources/ats/types/categories_enum.py b/src/merge/resources/ats/types/categories_enum.py
index ee5cac33..14d064dd 100644
--- a/src/merge/resources/ats/types/categories_enum.py
+++ b/src/merge/resources/ats/types/categories_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoriesEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoriesEnum.HRIS:
- return hris()
- if self is CategoriesEnum.ATS:
- return ats()
- if self is CategoriesEnum.ACCOUNTING:
- return accounting()
- if self is CategoriesEnum.TICKETING:
- return ticketing()
- if self is CategoriesEnum.CRM:
- return crm()
- if self is CategoriesEnum.MKTG:
- return mktg()
- if self is CategoriesEnum.FILESTORAGE:
- return filestorage()
+CategoriesEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/ats/types/category_enum.py b/src/merge/resources/ats/types/category_enum.py
index ad5a0688..597342a8 100644
--- a/src/merge/resources/ats/types/category_enum.py
+++ b/src/merge/resources/ats/types/category_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoryEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoryEnum.HRIS:
- return hris()
- if self is CategoryEnum.ATS:
- return ats()
- if self is CategoryEnum.ACCOUNTING:
- return accounting()
- if self is CategoryEnum.TICKETING:
- return ticketing()
- if self is CategoryEnum.CRM:
- return crm()
- if self is CategoryEnum.MKTG:
- return mktg()
- if self is CategoryEnum.FILESTORAGE:
- return filestorage()
+CategoryEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/ats/types/common_model_scope_api.py b/src/merge/resources/ats/types/common_model_scope_api.py
index d6fdec56..c6a178b1 100644
--- a/src/merge/resources/ats/types/common_model_scope_api.py
+++ b/src/merge/resources/ats/types/common_model_scope_api.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .individual_common_model_scope_deserializer import IndividualCommonModelScopeDeserializer
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CommonModelScopeApi(pydantic_v1.BaseModel):
- common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic_v1.Field()
+class CommonModelScopeApi(UniversalBaseModel):
+ common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic.Field()
"""
The common models you want to update the scopes for
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/common_model_scopes_body_request.py b/src/merge/resources/ats/types/common_model_scopes_body_request.py
index e956cbdc..305ab44c 100644
--- a/src/merge/resources/ats/types/common_model_scopes_body_request.py
+++ b/src/merge/resources/ats/types/common_model_scopes_body_request.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .enabled_actions_enum import EnabledActionsEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CommonModelScopesBodyRequest(pydantic_v1.BaseModel):
+class CommonModelScopesBodyRequest(UniversalBaseModel):
model_id: str
enabled_actions: typing.List[EnabledActionsEnum]
disabled_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/data_passthrough_request.py b/src/merge/resources/ats/types/data_passthrough_request.py
index fdf9b18c..f2718105 100644
--- a/src/merge/resources/ats/types/data_passthrough_request.py
+++ b/src/merge/resources/ats/types/data_passthrough_request.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .method_enum import MethodEnum
+import pydantic
+import typing
from .multipart_form_field_request import MultipartFormFieldRequest
from .request_format_enum import RequestFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class DataPassthroughRequest(pydantic_v1.BaseModel):
+class DataPassthroughRequest(UniversalBaseModel):
"""
# The DataPassthrough Object
@@ -24,51 +23,42 @@ class DataPassthroughRequest(pydantic_v1.BaseModel):
"""
method: MethodEnum
- path: str = pydantic_v1.Field()
+ path: str = pydantic.Field()
"""
The path of the request in the third party's platform.
"""
- base_url_override: typing.Optional[str] = pydantic_v1.Field()
+ base_url_override: typing.Optional[str] = pydantic.Field()
"""
An optional override of the third party's base url for the request.
"""
- data: typing.Optional[str] = pydantic_v1.Field()
+ data: typing.Optional[str] = pydantic.Field()
"""
The data with the request. You must include a `request_format` parameter matching the data's format
"""
- multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic_v1.Field()
+ multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field()
"""
Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`.
"""
- headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server.
"""
request_format: typing.Optional[RequestFormatEnum]
- normalize_response: typing.Optional[bool] = pydantic_v1.Field()
+ normalize_response: typing.Optional[bool] = pydantic.Field()
"""
Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/debug_mode_log.py b/src/merge/resources/ats/types/debug_mode_log.py
index 321c9090..2b02c1b9 100644
--- a/src/merge/resources/ats/types/debug_mode_log.py
+++ b/src/merge/resources/ats/types/debug_mode_log.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .debug_model_log_summary import DebugModelLogSummary
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class DebugModeLog(pydantic_v1.BaseModel):
+class DebugModeLog(UniversalBaseModel):
log_id: str
dashboard_view: str
log_summary: DebugModelLogSummary
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/debug_model_log_summary.py b/src/merge/resources/ats/types/debug_model_log_summary.py
index 06bb154b..b4f48752 100644
--- a/src/merge/resources/ats/types/debug_model_log_summary.py
+++ b/src/merge/resources/ats/types/debug_model_log_summary.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class DebugModelLogSummary(pydantic_v1.BaseModel):
+class DebugModelLogSummary(UniversalBaseModel):
url: str
method: str
status_code: int
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/department.py b/src/merge/resources/ats/types/department.py
index 9d59ebeb..eb9759c4 100644
--- a/src/merge/resources/ats/types/department.py
+++ b/src/merge/resources/ats/types/department.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Department(pydantic_v1.BaseModel):
+class Department(UniversalBaseModel):
"""
# The Department Object
@@ -22,48 +22,39 @@ class Department(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The department's name.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/disability_status_enum.py b/src/merge/resources/ats/types/disability_status_enum.py
index 27b3bf97..635e3843 100644
--- a/src/merge/resources/ats/types/disability_status_enum.py
+++ b/src/merge/resources/ats/types/disability_status_enum.py
@@ -1,31 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class DisabilityStatusEnum(str, enum.Enum):
- """
- - `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY
- - `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY
- - `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER
- """
-
- YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY = "YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY"
- NO_I_DONT_HAVE_A_DISABILITY = "NO_I_DONT_HAVE_A_DISABILITY"
- I_DONT_WISH_TO_ANSWER = "I_DONT_WISH_TO_ANSWER"
-
- def visit(
- self,
- yes_i_have_a_disability_or_previously_had_a_disability: typing.Callable[[], T_Result],
- no_i_dont_have_a_disability: typing.Callable[[], T_Result],
- i_dont_wish_to_answer: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is DisabilityStatusEnum.YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY:
- return yes_i_have_a_disability_or_previously_had_a_disability()
- if self is DisabilityStatusEnum.NO_I_DONT_HAVE_A_DISABILITY:
- return no_i_dont_have_a_disability()
- if self is DisabilityStatusEnum.I_DONT_WISH_TO_ANSWER:
- return i_dont_wish_to_answer()
+DisabilityStatusEnum = typing.Union[
+ typing.Literal[
+ "YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY", "NO_I_DONT_HAVE_A_DISABILITY", "I_DONT_WISH_TO_ANSWER"
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/types/eeoc.py b/src/merge/resources/ats/types/eeoc.py
index 53253cbd..1952d71e 100644
--- a/src/merge/resources/ats/types/eeoc.py
+++ b/src/merge/resources/ats/types/eeoc.py
@@ -1,19 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .eeoc_candidate import EeocCandidate
-from .eeoc_disability_status import EeocDisabilityStatus
-from .eeoc_gender import EeocGender
from .eeoc_race import EeocRace
+from .eeoc_gender import EeocGender
from .eeoc_veteran_status import EeocVeteranStatus
+from .eeoc_disability_status import EeocDisabilityStatus
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Eeoc(pydantic_v1.BaseModel):
+class Eeoc(UniversalBaseModel):
"""
# The EEOC Object
@@ -27,32 +32,32 @@ class Eeoc(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- candidate: typing.Optional[EeocCandidate] = pydantic_v1.Field()
+ candidate: typing.Optional[EeocCandidate] = pydantic.Field()
"""
The candidate being represented.
"""
- submitted_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ submitted_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the information was submitted.
"""
- race: typing.Optional[EeocRace] = pydantic_v1.Field()
+ race: typing.Optional[EeocRace] = pydantic.Field()
"""
The candidate's race.
@@ -66,7 +71,7 @@ class Eeoc(pydantic_v1.BaseModel):
- `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY
"""
- gender: typing.Optional[EeocGender] = pydantic_v1.Field()
+ gender: typing.Optional[EeocGender] = pydantic.Field()
"""
The candidate's gender.
@@ -77,7 +82,7 @@ class Eeoc(pydantic_v1.BaseModel):
- `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY
"""
- veteran_status: typing.Optional[EeocVeteranStatus] = pydantic_v1.Field()
+ veteran_status: typing.Optional[EeocVeteranStatus] = pydantic.Field()
"""
The candidate's veteran status.
@@ -86,7 +91,7 @@ class Eeoc(pydantic_v1.BaseModel):
- `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER
"""
- disability_status: typing.Optional[EeocDisabilityStatus] = pydantic_v1.Field()
+ disability_status: typing.Optional[EeocDisabilityStatus] = pydantic.Field()
"""
The candidate's disability status.
@@ -95,28 +100,24 @@ class Eeoc(pydantic_v1.BaseModel):
- `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, Eeoc=Eeoc)
+update_forward_refs(Candidate, Eeoc=Eeoc)
+update_forward_refs(Offer, Eeoc=Eeoc)
diff --git a/src/merge/resources/ats/types/eeoc_candidate.py b/src/merge/resources/ats/types/eeoc_candidate.py
index 7b8461b2..ce2228dd 100644
--- a/src/merge/resources/ats/types/eeoc_candidate.py
+++ b/src/merge/resources/ats/types/eeoc_candidate.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .candidate import Candidate
EeocCandidate = typing.Union[str, Candidate]
diff --git a/src/merge/resources/ats/types/eeoc_disability_status.py b/src/merge/resources/ats/types/eeoc_disability_status.py
index 23d93772..78f0b10f 100644
--- a/src/merge/resources/ats/types/eeoc_disability_status.py
+++ b/src/merge/resources/ats/types/eeoc_disability_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .disability_status_enum import DisabilityStatusEnum
EeocDisabilityStatus = typing.Union[DisabilityStatusEnum, str]
diff --git a/src/merge/resources/ats/types/eeoc_gender.py b/src/merge/resources/ats/types/eeoc_gender.py
index 71f0a6ae..587d6a3d 100644
--- a/src/merge/resources/ats/types/eeoc_gender.py
+++ b/src/merge/resources/ats/types/eeoc_gender.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .gender_enum import GenderEnum
EeocGender = typing.Union[GenderEnum, str]
diff --git a/src/merge/resources/ats/types/eeoc_race.py b/src/merge/resources/ats/types/eeoc_race.py
index b65e39ca..3d174e5c 100644
--- a/src/merge/resources/ats/types/eeoc_race.py
+++ b/src/merge/resources/ats/types/eeoc_race.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .race_enum import RaceEnum
EeocRace = typing.Union[RaceEnum, str]
diff --git a/src/merge/resources/ats/types/eeoc_veteran_status.py b/src/merge/resources/ats/types/eeoc_veteran_status.py
index 4a2e84e3..b1b21271 100644
--- a/src/merge/resources/ats/types/eeoc_veteran_status.py
+++ b/src/merge/resources/ats/types/eeoc_veteran_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .veteran_status_enum import VeteranStatusEnum
EeocVeteranStatus = typing.Union[VeteranStatusEnum, str]
diff --git a/src/merge/resources/ats/types/email_address.py b/src/merge/resources/ats/types/email_address.py
index 35cdb703..8cddc793 100644
--- a/src/merge/resources/ats/types/email_address.py
+++ b/src/merge/resources/ats/types/email_address.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
from .email_address_email_address_type import EmailAddressEmailAddressType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class EmailAddress(pydantic_v1.BaseModel):
+class EmailAddress(UniversalBaseModel):
"""
# The EmailAddress Object
@@ -21,22 +21,22 @@ class EmailAddress(pydantic_v1.BaseModel):
Fetch from the `GET Candidate` endpoint and view their email addresses.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- value: typing.Optional[str] = pydantic_v1.Field()
+ value: typing.Optional[str] = pydantic.Field()
"""
The email address.
"""
- email_address_type: typing.Optional[EmailAddressEmailAddressType] = pydantic_v1.Field()
+ email_address_type: typing.Optional[EmailAddressEmailAddressType] = pydantic.Field()
"""
The type of email address.
@@ -45,25 +45,16 @@ class EmailAddress(pydantic_v1.BaseModel):
- `OTHER` - OTHER
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/email_address_email_address_type.py b/src/merge/resources/ats/types/email_address_email_address_type.py
index d91604f7..a09efbf1 100644
--- a/src/merge/resources/ats/types/email_address_email_address_type.py
+++ b/src/merge/resources/ats/types/email_address_email_address_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .email_address_type_enum import EmailAddressTypeEnum
EmailAddressEmailAddressType = typing.Union[EmailAddressTypeEnum, str]
diff --git a/src/merge/resources/ats/types/email_address_request.py b/src/merge/resources/ats/types/email_address_request.py
index 728ae9c9..8c055a68 100644
--- a/src/merge/resources/ats/types/email_address_request.py
+++ b/src/merge/resources/ats/types/email_address_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .email_address_request_email_address_type import EmailAddressRequestEmailAddressType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class EmailAddressRequest(pydantic_v1.BaseModel):
+class EmailAddressRequest(UniversalBaseModel):
"""
# The EmailAddress Object
@@ -21,12 +20,12 @@ class EmailAddressRequest(pydantic_v1.BaseModel):
Fetch from the `GET Candidate` endpoint and view their email addresses.
"""
- value: typing.Optional[str] = pydantic_v1.Field()
+ value: typing.Optional[str] = pydantic.Field()
"""
The email address.
"""
- email_address_type: typing.Optional[EmailAddressRequestEmailAddressType] = pydantic_v1.Field()
+ email_address_type: typing.Optional[EmailAddressRequestEmailAddressType] = pydantic.Field()
"""
The type of email address.
@@ -35,23 +34,14 @@ class EmailAddressRequest(pydantic_v1.BaseModel):
- `OTHER` - OTHER
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/email_address_request_email_address_type.py b/src/merge/resources/ats/types/email_address_request_email_address_type.py
index 66f22173..f744e918 100644
--- a/src/merge/resources/ats/types/email_address_request_email_address_type.py
+++ b/src/merge/resources/ats/types/email_address_request_email_address_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .email_address_type_enum import EmailAddressTypeEnum
EmailAddressRequestEmailAddressType = typing.Union[EmailAddressTypeEnum, str]
diff --git a/src/merge/resources/ats/types/email_address_type_enum.py b/src/merge/resources/ats/types/email_address_type_enum.py
index 82c03ec4..e9e7769a 100644
--- a/src/merge/resources/ats/types/email_address_type_enum.py
+++ b/src/merge/resources/ats/types/email_address_type_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmailAddressTypeEnum(str, enum.Enum):
- """
- - `PERSONAL` - PERSONAL
- - `WORK` - WORK
- - `OTHER` - OTHER
- """
-
- PERSONAL = "PERSONAL"
- WORK = "WORK"
- OTHER = "OTHER"
-
- def visit(
- self,
- personal: typing.Callable[[], T_Result],
- work: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmailAddressTypeEnum.PERSONAL:
- return personal()
- if self is EmailAddressTypeEnum.WORK:
- return work()
- if self is EmailAddressTypeEnum.OTHER:
- return other()
+EmailAddressTypeEnum = typing.Union[typing.Literal["PERSONAL", "WORK", "OTHER"], typing.Any]
diff --git a/src/merge/resources/ats/types/enabled_actions_enum.py b/src/merge/resources/ats/types/enabled_actions_enum.py
index 949d69dc..fa6c674e 100644
--- a/src/merge/resources/ats/types/enabled_actions_enum.py
+++ b/src/merge/resources/ats/types/enabled_actions_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EnabledActionsEnum(str, enum.Enum):
- """
- - `READ` - READ
- - `WRITE` - WRITE
- """
-
- READ = "READ"
- WRITE = "WRITE"
-
- def visit(self, read: typing.Callable[[], T_Result], write: typing.Callable[[], T_Result]) -> T_Result:
- if self is EnabledActionsEnum.READ:
- return read()
- if self is EnabledActionsEnum.WRITE:
- return write()
+EnabledActionsEnum = typing.Union[typing.Literal["READ", "WRITE"], typing.Any]
diff --git a/src/merge/resources/ats/types/encoding_enum.py b/src/merge/resources/ats/types/encoding_enum.py
index fed12372..4c4997b2 100644
--- a/src/merge/resources/ats/types/encoding_enum.py
+++ b/src/merge/resources/ats/types/encoding_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EncodingEnum(str, enum.Enum):
- """
- - `RAW` - RAW
- - `BASE64` - BASE64
- - `GZIP_BASE64` - GZIP_BASE64
- """
-
- RAW = "RAW"
- BASE_64 = "BASE64"
- GZIP_BASE_64 = "GZIP_BASE64"
-
- def visit(
- self,
- raw: typing.Callable[[], T_Result],
- base_64: typing.Callable[[], T_Result],
- gzip_base_64: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EncodingEnum.RAW:
- return raw()
- if self is EncodingEnum.BASE_64:
- return base_64()
- if self is EncodingEnum.GZIP_BASE_64:
- return gzip_base_64()
+EncodingEnum = typing.Union[typing.Literal["RAW", "BASE64", "GZIP_BASE64"], typing.Any]
diff --git a/src/merge/resources/ats/types/error_validation_problem.py b/src/merge/resources/ats/types/error_validation_problem.py
index 425af45c..58ea87e6 100644
--- a/src/merge/resources/ats/types/error_validation_problem.py
+++ b/src/merge/resources/ats/types/error_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ErrorValidationProblem(pydantic_v1.BaseModel):
+class ErrorValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/event_type_enum.py b/src/merge/resources/ats/types/event_type_enum.py
index c10cd701..2693c646 100644
--- a/src/merge/resources/ats/types/event_type_enum.py
+++ b/src/merge/resources/ats/types/event_type_enum.py
@@ -1,206 +1,47 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EventTypeEnum(str, enum.Enum):
- """
- - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY
- - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY
- - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY
- - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY
- - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY
- - `INVITED_USER` - INVITED_USER
- - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED
- - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED
- - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT
- - `CREATED_DESTINATION` - CREATED_DESTINATION
- - `DELETED_DESTINATION` - DELETED_DESTINATION
- - `CHANGED_DESTINATION` - CHANGED_DESTINATION
- - `CHANGED_SCOPES` - CHANGED_SCOPES
- - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION
- - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS
- - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION
- - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION
- - `ENABLED_CATEGORY` - ENABLED_CATEGORY
- - `DISABLED_CATEGORY` - DISABLED_CATEGORY
- - `CHANGED_PASSWORD` - CHANGED_PASSWORD
- - `RESET_PASSWORD` - RESET_PASSWORD
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING
- - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING
- - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING
- - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING
- - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC
- - `MUTED_ISSUE` - MUTED_ISSUE
- - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK
- - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
- - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
- - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
- - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
- """
-
- CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY"
- DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY"
- CREATED_TEST_API_KEY = "CREATED_TEST_API_KEY"
- DELETED_TEST_API_KEY = "DELETED_TEST_API_KEY"
- REGENERATED_PRODUCTION_API_KEY = "REGENERATED_PRODUCTION_API_KEY"
- INVITED_USER = "INVITED_USER"
- TWO_FACTOR_AUTH_ENABLED = "TWO_FACTOR_AUTH_ENABLED"
- TWO_FACTOR_AUTH_DISABLED = "TWO_FACTOR_AUTH_DISABLED"
- DELETED_LINKED_ACCOUNT = "DELETED_LINKED_ACCOUNT"
- CREATED_DESTINATION = "CREATED_DESTINATION"
- DELETED_DESTINATION = "DELETED_DESTINATION"
- CHANGED_DESTINATION = "CHANGED_DESTINATION"
- CHANGED_SCOPES = "CHANGED_SCOPES"
- CHANGED_PERSONAL_INFORMATION = "CHANGED_PERSONAL_INFORMATION"
- CHANGED_ORGANIZATION_SETTINGS = "CHANGED_ORGANIZATION_SETTINGS"
- ENABLED_INTEGRATION = "ENABLED_INTEGRATION"
- DISABLED_INTEGRATION = "DISABLED_INTEGRATION"
- ENABLED_CATEGORY = "ENABLED_CATEGORY"
- DISABLED_CATEGORY = "DISABLED_CATEGORY"
- CHANGED_PASSWORD = "CHANGED_PASSWORD"
- RESET_PASSWORD = "RESET_PASSWORD"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- CREATED_INTEGRATION_WIDE_FIELD_MAPPING = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING"
- CREATED_LINKED_ACCOUNT_FIELD_MAPPING = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING"
- CHANGED_INTEGRATION_WIDE_FIELD_MAPPING = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING"
- CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING"
- DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING"
- DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING"
- FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC"
- MUTED_ISSUE = "MUTED_ISSUE"
- GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK"
- ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK"
- DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK"
- MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED"
- END_USER_CREDENTIALS_ACCESSED = "END_USER_CREDENTIALS_ACCESSED"
-
- def visit(
- self,
- created_remote_production_api_key: typing.Callable[[], T_Result],
- deleted_remote_production_api_key: typing.Callable[[], T_Result],
- created_test_api_key: typing.Callable[[], T_Result],
- deleted_test_api_key: typing.Callable[[], T_Result],
- regenerated_production_api_key: typing.Callable[[], T_Result],
- invited_user: typing.Callable[[], T_Result],
- two_factor_auth_enabled: typing.Callable[[], T_Result],
- two_factor_auth_disabled: typing.Callable[[], T_Result],
- deleted_linked_account: typing.Callable[[], T_Result],
- created_destination: typing.Callable[[], T_Result],
- deleted_destination: typing.Callable[[], T_Result],
- changed_destination: typing.Callable[[], T_Result],
- changed_scopes: typing.Callable[[], T_Result],
- changed_personal_information: typing.Callable[[], T_Result],
- changed_organization_settings: typing.Callable[[], T_Result],
- enabled_integration: typing.Callable[[], T_Result],
- disabled_integration: typing.Callable[[], T_Result],
- enabled_category: typing.Callable[[], T_Result],
- disabled_category: typing.Callable[[], T_Result],
- changed_password: typing.Callable[[], T_Result],
- reset_password: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- created_integration_wide_field_mapping: typing.Callable[[], T_Result],
- created_linked_account_field_mapping: typing.Callable[[], T_Result],
- changed_integration_wide_field_mapping: typing.Callable[[], T_Result],
- changed_linked_account_field_mapping: typing.Callable[[], T_Result],
- deleted_integration_wide_field_mapping: typing.Callable[[], T_Result],
- deleted_linked_account_field_mapping: typing.Callable[[], T_Result],
- forced_linked_account_resync: typing.Callable[[], T_Result],
- muted_issue: typing.Callable[[], T_Result],
- generated_magic_link: typing.Callable[[], T_Result],
- enabled_merge_webhook: typing.Callable[[], T_Result],
- disabled_merge_webhook: typing.Callable[[], T_Result],
- merge_webhook_target_changed: typing.Callable[[], T_Result],
- end_user_credentials_accessed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY:
- return created_remote_production_api_key()
- if self is EventTypeEnum.DELETED_REMOTE_PRODUCTION_API_KEY:
- return deleted_remote_production_api_key()
- if self is EventTypeEnum.CREATED_TEST_API_KEY:
- return created_test_api_key()
- if self is EventTypeEnum.DELETED_TEST_API_KEY:
- return deleted_test_api_key()
- if self is EventTypeEnum.REGENERATED_PRODUCTION_API_KEY:
- return regenerated_production_api_key()
- if self is EventTypeEnum.INVITED_USER:
- return invited_user()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_ENABLED:
- return two_factor_auth_enabled()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_DISABLED:
- return two_factor_auth_disabled()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT:
- return deleted_linked_account()
- if self is EventTypeEnum.CREATED_DESTINATION:
- return created_destination()
- if self is EventTypeEnum.DELETED_DESTINATION:
- return deleted_destination()
- if self is EventTypeEnum.CHANGED_DESTINATION:
- return changed_destination()
- if self is EventTypeEnum.CHANGED_SCOPES:
- return changed_scopes()
- if self is EventTypeEnum.CHANGED_PERSONAL_INFORMATION:
- return changed_personal_information()
- if self is EventTypeEnum.CHANGED_ORGANIZATION_SETTINGS:
- return changed_organization_settings()
- if self is EventTypeEnum.ENABLED_INTEGRATION:
- return enabled_integration()
- if self is EventTypeEnum.DISABLED_INTEGRATION:
- return disabled_integration()
- if self is EventTypeEnum.ENABLED_CATEGORY:
- return enabled_category()
- if self is EventTypeEnum.DISABLED_CATEGORY:
- return disabled_category()
- if self is EventTypeEnum.CHANGED_PASSWORD:
- return changed_password()
- if self is EventTypeEnum.RESET_PASSWORD:
- return reset_password()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return enabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return enabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return disabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return disabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.CREATED_INTEGRATION_WIDE_FIELD_MAPPING:
- return created_integration_wide_field_mapping()
- if self is EventTypeEnum.CREATED_LINKED_ACCOUNT_FIELD_MAPPING:
- return created_linked_account_field_mapping()
- if self is EventTypeEnum.CHANGED_INTEGRATION_WIDE_FIELD_MAPPING:
- return changed_integration_wide_field_mapping()
- if self is EventTypeEnum.CHANGED_LINKED_ACCOUNT_FIELD_MAPPING:
- return changed_linked_account_field_mapping()
- if self is EventTypeEnum.DELETED_INTEGRATION_WIDE_FIELD_MAPPING:
- return deleted_integration_wide_field_mapping()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING:
- return deleted_linked_account_field_mapping()
- if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC:
- return forced_linked_account_resync()
- if self is EventTypeEnum.MUTED_ISSUE:
- return muted_issue()
- if self is EventTypeEnum.GENERATED_MAGIC_LINK:
- return generated_magic_link()
- if self is EventTypeEnum.ENABLED_MERGE_WEBHOOK:
- return enabled_merge_webhook()
- if self is EventTypeEnum.DISABLED_MERGE_WEBHOOK:
- return disabled_merge_webhook()
- if self is EventTypeEnum.MERGE_WEBHOOK_TARGET_CHANGED:
- return merge_webhook_target_changed()
- if self is EventTypeEnum.END_USER_CREDENTIALS_ACCESSED:
- return end_user_credentials_accessed()
+EventTypeEnum = typing.Union[
+ typing.Literal[
+ "CREATED_REMOTE_PRODUCTION_API_KEY",
+ "DELETED_REMOTE_PRODUCTION_API_KEY",
+ "CREATED_TEST_API_KEY",
+ "DELETED_TEST_API_KEY",
+ "REGENERATED_PRODUCTION_API_KEY",
+ "INVITED_USER",
+ "TWO_FACTOR_AUTH_ENABLED",
+ "TWO_FACTOR_AUTH_DISABLED",
+ "DELETED_LINKED_ACCOUNT",
+ "CREATED_DESTINATION",
+ "DELETED_DESTINATION",
+ "CHANGED_DESTINATION",
+ "CHANGED_SCOPES",
+ "CHANGED_PERSONAL_INFORMATION",
+ "CHANGED_ORGANIZATION_SETTINGS",
+ "ENABLED_INTEGRATION",
+ "DISABLED_INTEGRATION",
+ "ENABLED_CATEGORY",
+ "DISABLED_CATEGORY",
+ "CHANGED_PASSWORD",
+ "RESET_PASSWORD",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "CREATED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CREATED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "DELETED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "DELETED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "FORCED_LINKED_ACCOUNT_RESYNC",
+ "MUTED_ISSUE",
+ "GENERATED_MAGIC_LINK",
+ "ENABLED_MERGE_WEBHOOK",
+ "DISABLED_MERGE_WEBHOOK",
+ "MERGE_WEBHOOK_TARGET_CHANGED",
+ "END_USER_CREDENTIALS_ACCESSED",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/types/external_target_field_api.py b/src/merge/resources/ats/types/external_target_field_api.py
index a97d536a..18988d44 100644
--- a/src/merge/resources/ats/types/external_target_field_api.py
+++ b/src/merge/resources/ats/types/external_target_field_api.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ExternalTargetFieldApi(pydantic_v1.BaseModel):
+class ExternalTargetFieldApi(UniversalBaseModel):
name: typing.Optional[str]
description: typing.Optional[str]
is_mapped: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/external_target_field_api_response.py b/src/merge/resources/ats/types/external_target_field_api_response.py
index c7853353..9f9f2606 100644
--- a/src/merge/resources/ats/types/external_target_field_api_response.py
+++ b/src/merge/resources/ats/types/external_target_field_api_response.py
@@ -1,51 +1,39 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .external_target_field_api import ExternalTargetFieldApi
-
-
-class ExternalTargetFieldApiResponse(pydantic_v1.BaseModel):
- activity: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Activity")
- application: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Application")
- attachment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Attachment")
- candidate: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Candidate")
- department: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Department")
- eeoc: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="EEOC")
- scheduled_interview: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class ExternalTargetFieldApiResponse(UniversalBaseModel):
+ activity: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Activity")
+ application: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Application")
+ attachment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Attachment")
+ candidate: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Candidate")
+ department: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Department")
+ eeoc: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="EEOC")
+ scheduled_interview: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(
alias="ScheduledInterview"
)
- job: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Job")
- job_posting: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="JobPosting")
- job_interview_stage: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(
+ job: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Job")
+ job_posting: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="JobPosting")
+ job_interview_stage: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(
alias="JobInterviewStage"
)
- offer: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Offer")
- office: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Office")
- reject_reason: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="RejectReason")
- scorecard: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Scorecard")
- tag: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Tag")
- remote_user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="RemoteUser")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ offer: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Offer")
+ office: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Office")
+ reject_reason: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="RejectReason")
+ scorecard: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Scorecard")
+ tag: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Tag")
+ remote_user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="RemoteUser")
+
+ 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/merge/resources/ats/types/field_mapping_api_instance.py b/src/merge/resources/ats/types/field_mapping_api_instance.py
index d9d7670d..ef4d9c48 100644
--- a/src/merge/resources/ats/types/field_mapping_api_instance.py
+++ b/src/merge/resources/ats/types/field_mapping_api_instance.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
from .field_mapping_api_instance_target_field import FieldMappingApiInstanceTargetField
+from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingApiInstance(pydantic_v1.BaseModel):
+class FieldMappingApiInstance(UniversalBaseModel):
id: typing.Optional[str]
is_integration_wide: typing.Optional[bool]
target_field: typing.Optional[FieldMappingApiInstanceTargetField]
remote_field: typing.Optional[FieldMappingApiInstanceRemoteField]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/field_mapping_api_instance_remote_field.py b/src/merge/resources/ats/types/field_mapping_api_instance_remote_field.py
index 9539d3dc..ddfff4da 100644
--- a/src/merge/resources/ats/types/field_mapping_api_instance_remote_field.py
+++ b/src/merge/resources/ats/types/field_mapping_api_instance_remote_field.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .field_mapping_api_instance_remote_field_remote_endpoint_info import (
FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo,
)
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceRemoteField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteField(UniversalBaseModel):
remote_key_name: str
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py b/src/merge/resources/ats/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
index d9fcc276..14c37c76 100644
--- a/src/merge/resources/ats/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
+++ b/src/merge/resources/ats/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(UniversalBaseModel):
method: typing.Optional[str]
url_path: typing.Optional[str]
field_traversal_path: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/field_mapping_api_instance_response.py b/src/merge/resources/ats/types/field_mapping_api_instance_response.py
index 18af1188..4fabbc20 100644
--- a/src/merge/resources/ats/types/field_mapping_api_instance_response.py
+++ b/src/merge/resources/ats/types/field_mapping_api_instance_response.py
@@ -1,51 +1,39 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .field_mapping_api_instance import FieldMappingApiInstance
-
-
-class FieldMappingApiInstanceResponse(pydantic_v1.BaseModel):
- activity: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Activity")
- application: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Application")
- attachment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Attachment")
- candidate: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Candidate")
- department: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Department")
- eeoc: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="EEOC")
- scheduled_interview: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class FieldMappingApiInstanceResponse(UniversalBaseModel):
+ activity: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Activity")
+ application: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Application")
+ attachment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Attachment")
+ candidate: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Candidate")
+ department: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Department")
+ eeoc: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="EEOC")
+ scheduled_interview: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(
alias="ScheduledInterview"
)
- job: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Job")
- job_posting: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="JobPosting")
- job_interview_stage: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(
+ job: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Job")
+ job_posting: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="JobPosting")
+ job_interview_stage: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(
alias="JobInterviewStage"
)
- offer: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Offer")
- office: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Office")
- reject_reason: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="RejectReason")
- scorecard: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Scorecard")
- tag: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Tag")
- remote_user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="RemoteUser")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ offer: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Offer")
+ office: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Office")
+ reject_reason: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="RejectReason")
+ scorecard: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Scorecard")
+ tag: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Tag")
+ remote_user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="RemoteUser")
+
+ 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/merge/resources/ats/types/field_mapping_api_instance_target_field.py b/src/merge/resources/ats/types/field_mapping_api_instance_target_field.py
index 25a8dcff..a1b51052 100644
--- a/src/merge/resources/ats/types/field_mapping_api_instance_target_field.py
+++ b/src/merge/resources/ats/types/field_mapping_api_instance_target_field.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceTargetField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceTargetField(UniversalBaseModel):
name: str
description: str
is_organization_wide: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/field_mapping_instance_response.py b/src/merge/resources/ats/types/field_mapping_instance_response.py
index b55d2c40..a56aeb93 100644
--- a/src/merge/resources/ats/types/field_mapping_instance_response.py
+++ b/src/merge/resources/ats/types/field_mapping_instance_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .field_mapping_api_instance import FieldMappingApiInstance
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingInstanceResponse(pydantic_v1.BaseModel):
+class FieldMappingInstanceResponse(UniversalBaseModel):
model: FieldMappingApiInstance
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/field_permission_deserializer.py b/src/merge/resources/ats/types/field_permission_deserializer.py
index 124f3deb..9670537a 100644
--- a/src/merge/resources/ats/types/field_permission_deserializer.py
+++ b/src/merge/resources/ats/types/field_permission_deserializer.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializer(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializer(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/field_permission_deserializer_request.py b/src/merge/resources/ats/types/field_permission_deserializer_request.py
index 65e80e75..04e14608 100644
--- a/src/merge/resources/ats/types/field_permission_deserializer_request.py
+++ b/src/merge/resources/ats/types/field_permission_deserializer_request.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializerRequest(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializerRequest(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/gender_enum.py b/src/merge/resources/ats/types/gender_enum.py
index 08624b17..6ccbc1a7 100644
--- a/src/merge/resources/ats/types/gender_enum.py
+++ b/src/merge/resources/ats/types/gender_enum.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class GenderEnum(str, enum.Enum):
- """
- - `MALE` - MALE
- - `FEMALE` - FEMALE
- - `NON-BINARY` - NON-BINARY
- - `OTHER` - OTHER
- - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY
- """
-
- MALE = "MALE"
- FEMALE = "FEMALE"
- NON_BINARY = "NON-BINARY"
- OTHER = "OTHER"
- DECLINE_TO_SELF_IDENTIFY = "DECLINE_TO_SELF_IDENTIFY"
-
- def visit(
- self,
- male: typing.Callable[[], T_Result],
- female: typing.Callable[[], T_Result],
- non_binary: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- decline_to_self_identify: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is GenderEnum.MALE:
- return male()
- if self is GenderEnum.FEMALE:
- return female()
- if self is GenderEnum.NON_BINARY:
- return non_binary()
- if self is GenderEnum.OTHER:
- return other()
- if self is GenderEnum.DECLINE_TO_SELF_IDENTIFY:
- return decline_to_self_identify()
+GenderEnum = typing.Union[
+ typing.Literal["MALE", "FEMALE", "NON-BINARY", "OTHER", "DECLINE_TO_SELF_IDENTIFY"], typing.Any
+]
diff --git a/src/merge/resources/ats/types/individual_common_model_scope_deserializer.py b/src/merge/resources/ats/types/individual_common_model_scope_deserializer.py
index d80ca06e..122df11c 100644
--- a/src/merge/resources/ats/types/individual_common_model_scope_deserializer.py
+++ b/src/merge/resources/ats/types/individual_common_model_scope_deserializer.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer import FieldPermissionDeserializer
from .model_permission_deserializer import ModelPermissionDeserializer
+from .field_permission_deserializer import FieldPermissionDeserializer
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializer(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializer(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializer]]
field_permissions: typing.Optional[FieldPermissionDeserializer]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/individual_common_model_scope_deserializer_request.py b/src/merge/resources/ats/types/individual_common_model_scope_deserializer_request.py
index 8f2e7de5..a1a80902 100644
--- a/src/merge/resources/ats/types/individual_common_model_scope_deserializer_request.py
+++ b/src/merge/resources/ats/types/individual_common_model_scope_deserializer_request.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
from .model_permission_deserializer_request import ModelPermissionDeserializerRequest
+from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializerRequest(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializerRequest(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializerRequest]]
field_permissions: typing.Optional[FieldPermissionDeserializerRequest]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/issue.py b/src/merge/resources/ats/types/issue.py
index 086a0db2..5a584515 100644
--- a/src/merge/resources/ats/types/issue.py
+++ b/src/merge/resources/ats/types/issue.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue_status import IssueStatus
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Issue(pydantic_v1.BaseModel):
+class Issue(UniversalBaseModel):
id: typing.Optional[str]
- status: typing.Optional[IssueStatus] = pydantic_v1.Field()
+ status: typing.Optional[IssueStatus] = pydantic.Field()
"""
Status of the issue. Options: ('ONGOING', 'RESOLVED')
@@ -19,26 +19,17 @@ class Issue(pydantic_v1.BaseModel):
"""
error_description: str
- end_user: typing.Optional[typing.Dict[str, typing.Any]]
+ end_user: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
first_incident_time: typing.Optional[dt.datetime]
last_incident_time: typing.Optional[dt.datetime]
is_muted: typing.Optional[bool]
error_details: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/issue_status.py b/src/merge/resources/ats/types/issue_status.py
index 8e4d6516..59d004d8 100644
--- a/src/merge/resources/ats/types/issue_status.py
+++ b/src/merge/resources/ats/types/issue_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .issue_status_enum import IssueStatusEnum
IssueStatus = typing.Union[IssueStatusEnum, str]
diff --git a/src/merge/resources/ats/types/issue_status_enum.py b/src/merge/resources/ats/types/issue_status_enum.py
index fc2ef2b5..76eb5549 100644
--- a/src/merge/resources/ats/types/issue_status_enum.py
+++ b/src/merge/resources/ats/types/issue_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssueStatusEnum(str, enum.Enum):
- """
- - `ONGOING` - ONGOING
- - `RESOLVED` - RESOLVED
- """
-
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssueStatusEnum.ONGOING:
- return ongoing()
- if self is IssueStatusEnum.RESOLVED:
- return resolved()
+IssueStatusEnum = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/ats/types/job.py b/src/merge/resources/ats/types/job.py
index 041ebbf6..711e5332 100644
--- a/src/merge/resources/ats/types/job.py
+++ b/src/merge/resources/ats/types/job.py
@@ -1,21 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from .job_status import JobStatus
+from .job_type_enum import JobTypeEnum
+from .url import Url
from .job_departments_item import JobDepartmentsItem
-from .job_hiring_managers_item import JobHiringManagersItem
from .job_offices_item import JobOfficesItem
+from .job_hiring_managers_item import JobHiringManagersItem
from .job_recruiters_item import JobRecruitersItem
-from .job_status import JobStatus
-from .job_type_enum import JobTypeEnum
from .remote_data import RemoteData
-from .url import Url
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Job(pydantic_v1.BaseModel):
+class Job(UniversalBaseModel):
"""
# The Job Object
@@ -29,37 +29,37 @@ class Job(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The job's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The job's description.
"""
- code: typing.Optional[str] = pydantic_v1.Field()
+ code: typing.Optional[str] = pydantic.Field()
"""
The job's code. Typically an additional identifier used to reference the particular job that is displayed on the ATS.
"""
- status: typing.Optional[JobStatus] = pydantic_v1.Field()
+ status: typing.Optional[JobStatus] = pydantic.Field()
"""
The job's status.
@@ -70,7 +70,7 @@ class Job(pydantic_v1.BaseModel):
- `PENDING` - PENDING
"""
- type: typing.Optional[JobTypeEnum] = pydantic_v1.Field()
+ type: typing.Optional[JobTypeEnum] = pydantic.Field()
"""
The job's type.
@@ -79,69 +79,60 @@ class Job(pydantic_v1.BaseModel):
- `PROFILE` - PROFILE
"""
- job_postings: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ job_postings: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
IDs of `JobPosting` objects that serve as job postings for this `Job`.
"""
job_posting_urls: typing.Optional[typing.List[Url]]
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's job was created.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's job was updated.
"""
- confidential: typing.Optional[bool] = pydantic_v1.Field()
+ confidential: typing.Optional[bool] = pydantic.Field()
"""
Whether the job is confidential.
"""
- departments: typing.Optional[typing.List[typing.Optional[JobDepartmentsItem]]] = pydantic_v1.Field()
+ departments: typing.Optional[typing.List[typing.Optional[JobDepartmentsItem]]] = pydantic.Field()
"""
IDs of `Department` objects for this `Job`.
"""
- offices: typing.Optional[typing.List[typing.Optional[JobOfficesItem]]] = pydantic_v1.Field()
+ offices: typing.Optional[typing.List[typing.Optional[JobOfficesItem]]] = pydantic.Field()
"""
IDs of `Office` objects for this `Job`.
"""
- hiring_managers: typing.Optional[typing.List[typing.Optional[JobHiringManagersItem]]] = pydantic_v1.Field()
+ hiring_managers: typing.Optional[typing.List[typing.Optional[JobHiringManagersItem]]] = pydantic.Field()
"""
IDs of `RemoteUser` objects that serve as hiring managers for this `Job`.
"""
- recruiters: typing.Optional[typing.List[typing.Optional[JobRecruitersItem]]] = pydantic_v1.Field()
+ recruiters: typing.Optional[typing.List[typing.Optional[JobRecruitersItem]]] = pydantic.Field()
"""
IDs of `RemoteUser` objects that serve as recruiters for this `Job`.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/job_departments_item.py b/src/merge/resources/ats/types/job_departments_item.py
index d85e47f5..5dc559df 100644
--- a/src/merge/resources/ats/types/job_departments_item.py
+++ b/src/merge/resources/ats/types/job_departments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .department import Department
JobDepartmentsItem = typing.Union[str, Department]
diff --git a/src/merge/resources/ats/types/job_hiring_managers_item.py b/src/merge/resources/ats/types/job_hiring_managers_item.py
index 2acfc40e..1dd3a3be 100644
--- a/src/merge/resources/ats/types/job_hiring_managers_item.py
+++ b/src/merge/resources/ats/types/job_hiring_managers_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
JobHiringManagersItem = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/job_interview_stage.py b/src/merge/resources/ats/types/job_interview_stage.py
index 168cd4f2..59e5d189 100644
--- a/src/merge/resources/ats/types/job_interview_stage.py
+++ b/src/merge/resources/ats/types/job_interview_stage.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .job_interview_stage_job import JobInterviewStageJob
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class JobInterviewStage(pydantic_v1.BaseModel):
+class JobInterviewStage(UniversalBaseModel):
"""
# The JobInterviewStage Object
@@ -23,58 +23,49 @@ class JobInterviewStage(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
Standard stage names are offered by ATS systems but can be modified by users.
"""
- job: typing.Optional[JobInterviewStageJob] = pydantic_v1.Field()
+ job: typing.Optional[JobInterviewStageJob] = pydantic.Field()
"""
This field is populated only if the stage is specific to a particular job. If the stage is generic, this field will not be populated.
"""
- stage_order: typing.Optional[int] = pydantic_v1.Field()
+ stage_order: typing.Optional[int] = pydantic.Field()
"""
The stageβs order, with the lowest values ordered first. If the third-party does not return details on the order of stages, this field will not be populated.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/job_interview_stage_job.py b/src/merge/resources/ats/types/job_interview_stage_job.py
index 217ece49..20962c4a 100644
--- a/src/merge/resources/ats/types/job_interview_stage_job.py
+++ b/src/merge/resources/ats/types/job_interview_stage_job.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job import Job
JobInterviewStageJob = typing.Union[str, Job]
diff --git a/src/merge/resources/ats/types/job_offices_item.py b/src/merge/resources/ats/types/job_offices_item.py
index e40e5f6c..b2940f10 100644
--- a/src/merge/resources/ats/types/job_offices_item.py
+++ b/src/merge/resources/ats/types/job_offices_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .office import Office
JobOfficesItem = typing.Union[str, Office]
diff --git a/src/merge/resources/ats/types/job_posting.py b/src/merge/resources/ats/types/job_posting.py
index 05ae4b2a..5d704b8e 100644
--- a/src/merge/resources/ats/types/job_posting.py
+++ b/src/merge/resources/ats/types/job_posting.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .job_posting_job import JobPostingJob
+import pydantic
+import datetime as dt
from .job_posting_job_posting_urls_item import JobPostingJobPostingUrlsItem
+from .job_posting_job import JobPostingJob
from .job_posting_status_enum import JobPostingStatusEnum
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class JobPosting(pydantic_v1.BaseModel):
+class JobPosting(UniversalBaseModel):
"""
# The JobPosting Object
@@ -25,37 +25,37 @@ class JobPosting(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- title: typing.Optional[str] = pydantic_v1.Field()
+ title: typing.Optional[str] = pydantic.Field()
"""
The job postingβs title.
"""
- job_posting_urls: typing.Optional[typing.List[JobPostingJobPostingUrlsItem]] = pydantic_v1.Field()
+ job_posting_urls: typing.Optional[typing.List[JobPostingJobPostingUrlsItem]] = pydantic.Field()
"""
The Url object is used to represent hyperlinks for a candidate to apply to a given job.
"""
- job: typing.Optional[JobPostingJob] = pydantic_v1.Field()
+ job: typing.Optional[JobPostingJob] = pydantic.Field()
"""
ID of `Job` object for this `JobPosting`.
"""
- status: typing.Optional[JobPostingStatusEnum] = pydantic_v1.Field()
+ status: typing.Optional[JobPostingStatusEnum] = pydantic.Field()
"""
The job posting's status.
@@ -66,48 +66,39 @@ class JobPosting(pydantic_v1.BaseModel):
- `PENDING` - PENDING
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The job postingβs content.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's job posting was created.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's job posting was updated.
"""
- is_internal: typing.Optional[bool] = pydantic_v1.Field()
+ is_internal: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether the job posting is internal or external.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/job_posting_job.py b/src/merge/resources/ats/types/job_posting_job.py
index 764f306f..e05fa7c8 100644
--- a/src/merge/resources/ats/types/job_posting_job.py
+++ b/src/merge/resources/ats/types/job_posting_job.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job import Job
JobPostingJob = typing.Union[str, Job]
diff --git a/src/merge/resources/ats/types/job_posting_job_posting_urls_item.py b/src/merge/resources/ats/types/job_posting_job_posting_urls_item.py
index 2bb3e7de..e5edf549 100644
--- a/src/merge/resources/ats/types/job_posting_job_posting_urls_item.py
+++ b/src/merge/resources/ats/types/job_posting_job_posting_urls_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .url import Url
JobPostingJobPostingUrlsItem = typing.Union[str, Url]
diff --git a/src/merge/resources/ats/types/job_posting_status_enum.py b/src/merge/resources/ats/types/job_posting_status_enum.py
index 1936aaa3..bad11060 100644
--- a/src/merge/resources/ats/types/job_posting_status_enum.py
+++ b/src/merge/resources/ats/types/job_posting_status_enum.py
@@ -1,41 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JobPostingStatusEnum(str, enum.Enum):
- """
- - `PUBLISHED` - PUBLISHED
- - `CLOSED` - CLOSED
- - `DRAFT` - DRAFT
- - `INTERNAL` - INTERNAL
- - `PENDING` - PENDING
- """
-
- PUBLISHED = "PUBLISHED"
- CLOSED = "CLOSED"
- DRAFT = "DRAFT"
- INTERNAL = "INTERNAL"
- PENDING = "PENDING"
-
- def visit(
- self,
- published: typing.Callable[[], T_Result],
- closed: typing.Callable[[], T_Result],
- draft: typing.Callable[[], T_Result],
- internal: typing.Callable[[], T_Result],
- pending: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JobPostingStatusEnum.PUBLISHED:
- return published()
- if self is JobPostingStatusEnum.CLOSED:
- return closed()
- if self is JobPostingStatusEnum.DRAFT:
- return draft()
- if self is JobPostingStatusEnum.INTERNAL:
- return internal()
- if self is JobPostingStatusEnum.PENDING:
- return pending()
+JobPostingStatusEnum = typing.Union[typing.Literal["PUBLISHED", "CLOSED", "DRAFT", "INTERNAL", "PENDING"], typing.Any]
diff --git a/src/merge/resources/ats/types/job_recruiters_item.py b/src/merge/resources/ats/types/job_recruiters_item.py
index 989bcf4b..a6a78d78 100644
--- a/src/merge/resources/ats/types/job_recruiters_item.py
+++ b/src/merge/resources/ats/types/job_recruiters_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
JobRecruitersItem = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/job_status.py b/src/merge/resources/ats/types/job_status.py
index 212b5725..11c24741 100644
--- a/src/merge/resources/ats/types/job_status.py
+++ b/src/merge/resources/ats/types/job_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job_status_enum import JobStatusEnum
JobStatus = typing.Union[JobStatusEnum, str]
diff --git a/src/merge/resources/ats/types/job_status_enum.py b/src/merge/resources/ats/types/job_status_enum.py
index 34d0ab50..5be2105d 100644
--- a/src/merge/resources/ats/types/job_status_enum.py
+++ b/src/merge/resources/ats/types/job_status_enum.py
@@ -1,41 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JobStatusEnum(str, enum.Enum):
- """
- - `OPEN` - OPEN
- - `CLOSED` - CLOSED
- - `DRAFT` - DRAFT
- - `ARCHIVED` - ARCHIVED
- - `PENDING` - PENDING
- """
-
- OPEN = "OPEN"
- CLOSED = "CLOSED"
- DRAFT = "DRAFT"
- ARCHIVED = "ARCHIVED"
- PENDING = "PENDING"
-
- def visit(
- self,
- open: typing.Callable[[], T_Result],
- closed: typing.Callable[[], T_Result],
- draft: typing.Callable[[], T_Result],
- archived: typing.Callable[[], T_Result],
- pending: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JobStatusEnum.OPEN:
- return open()
- if self is JobStatusEnum.CLOSED:
- return closed()
- if self is JobStatusEnum.DRAFT:
- return draft()
- if self is JobStatusEnum.ARCHIVED:
- return archived()
- if self is JobStatusEnum.PENDING:
- return pending()
+JobStatusEnum = typing.Union[typing.Literal["OPEN", "CLOSED", "DRAFT", "ARCHIVED", "PENDING"], typing.Any]
diff --git a/src/merge/resources/ats/types/job_type_enum.py b/src/merge/resources/ats/types/job_type_enum.py
index d98ee0d0..d585f9e7 100644
--- a/src/merge/resources/ats/types/job_type_enum.py
+++ b/src/merge/resources/ats/types/job_type_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class JobTypeEnum(str, enum.Enum):
- """
- - `POSTING` - POSTING
- - `REQUISITION` - REQUISITION
- - `PROFILE` - PROFILE
- """
-
- POSTING = "POSTING"
- REQUISITION = "REQUISITION"
- PROFILE = "PROFILE"
-
- def visit(
- self,
- posting: typing.Callable[[], T_Result],
- requisition: typing.Callable[[], T_Result],
- profile: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is JobTypeEnum.POSTING:
- return posting()
- if self is JobTypeEnum.REQUISITION:
- return requisition()
- if self is JobTypeEnum.PROFILE:
- return profile()
+JobTypeEnum = typing.Union[typing.Literal["POSTING", "REQUISITION", "PROFILE"], typing.Any]
diff --git a/src/merge/resources/ats/types/link_token.py b/src/merge/resources/ats/types/link_token.py
index 1c82d1ac..1d25dddb 100644
--- a/src/merge/resources/ats/types/link_token.py
+++ b/src/merge/resources/ats/types/link_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkToken(pydantic_v1.BaseModel):
+class LinkToken(UniversalBaseModel):
link_token: str
integration_name: typing.Optional[str]
magic_link_url: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/linked_account_status.py b/src/merge/resources/ats/types/linked_account_status.py
index 60e21a98..2e27df33 100644
--- a/src/merge/resources/ats/types/linked_account_status.py
+++ b/src/merge/resources/ats/types/linked_account_status.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkedAccountStatus(pydantic_v1.BaseModel):
+class LinkedAccountStatus(UniversalBaseModel):
linked_account_status: str
can_make_request: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/meta_response.py b/src/merge/resources/ats/types/meta_response.py
index debaf4ef..44e57fde 100644
--- a/src/merge/resources/ats/types/meta_response.py
+++ b/src/merge/resources/ats/types/meta_response.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .linked_account_status import LinkedAccountStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class MetaResponse(pydantic_v1.BaseModel):
- request_schema: typing.Dict[str, typing.Any]
- remote_field_classes: typing.Optional[typing.Dict[str, typing.Any]]
+class MetaResponse(UniversalBaseModel):
+ request_schema: typing.Dict[str, typing.Optional[typing.Any]]
+ remote_field_classes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
status: typing.Optional[LinkedAccountStatus]
has_conditional_params: bool
has_required_linked_account_params: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/method_enum.py b/src/merge/resources/ats/types/method_enum.py
index c2418a83..e782e49c 100644
--- a/src/merge/resources/ats/types/method_enum.py
+++ b/src/merge/resources/ats/types/method_enum.py
@@ -1,51 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MethodEnum(str, enum.Enum):
- """
- - `GET` - GET
- - `OPTIONS` - OPTIONS
- - `HEAD` - HEAD
- - `POST` - POST
- - `PUT` - PUT
- - `PATCH` - PATCH
- - `DELETE` - DELETE
- """
-
- GET = "GET"
- OPTIONS = "OPTIONS"
- HEAD = "HEAD"
- POST = "POST"
- PUT = "PUT"
- PATCH = "PATCH"
- DELETE = "DELETE"
-
- def visit(
- self,
- get: typing.Callable[[], T_Result],
- options: typing.Callable[[], T_Result],
- head: typing.Callable[[], T_Result],
- post: typing.Callable[[], T_Result],
- put: typing.Callable[[], T_Result],
- patch: typing.Callable[[], T_Result],
- delete: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MethodEnum.GET:
- return get()
- if self is MethodEnum.OPTIONS:
- return options()
- if self is MethodEnum.HEAD:
- return head()
- if self is MethodEnum.POST:
- return post()
- if self is MethodEnum.PUT:
- return put()
- if self is MethodEnum.PATCH:
- return patch()
- if self is MethodEnum.DELETE:
- return delete()
+MethodEnum = typing.Union[typing.Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"], typing.Any]
diff --git a/src/merge/resources/ats/types/model_operation.py b/src/merge/resources/ats/types/model_operation.py
index 0f4429ec..2a12b6d5 100644
--- a/src/merge/resources/ats/types/model_operation.py
+++ b/src/merge/resources/ats/types/model_operation.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelOperation(pydantic_v1.BaseModel):
+class ModelOperation(UniversalBaseModel):
"""
# The ModelOperation Object
@@ -25,20 +24,11 @@ class ModelOperation(pydantic_v1.BaseModel):
required_post_parameters: typing.List[str]
supported_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/model_permission_deserializer.py b/src/merge/resources/ats/types/model_permission_deserializer.py
index 5a6adf20..b6d813e4 100644
--- a/src/merge/resources/ats/types/model_permission_deserializer.py
+++ b/src/merge/resources/ats/types/model_permission_deserializer.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializer(pydantic_v1.BaseModel):
+class ModelPermissionDeserializer(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/model_permission_deserializer_request.py b/src/merge/resources/ats/types/model_permission_deserializer_request.py
index 3f72b9ac..5885627b 100644
--- a/src/merge/resources/ats/types/model_permission_deserializer_request.py
+++ b/src/merge/resources/ats/types/model_permission_deserializer_request.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializerRequest(pydantic_v1.BaseModel):
+class ModelPermissionDeserializerRequest(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/multipart_form_field_request.py b/src/merge/resources/ats/types/multipart_form_field_request.py
index 9c8ffb21..80099016 100644
--- a/src/merge/resources/ats/types/multipart_form_field_request.py
+++ b/src/merge/resources/ats/types/multipart_form_field_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class MultipartFormFieldRequest(pydantic_v1.BaseModel):
+class MultipartFormFieldRequest(UniversalBaseModel):
"""
# The MultipartFormField Object
@@ -21,17 +20,17 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
Create a `MultipartFormField` to define a multipart form entry.
"""
- name: str = pydantic_v1.Field()
+ name: str = pydantic.Field()
"""
The name of the form field
"""
- data: str = pydantic_v1.Field()
+ data: str = pydantic.Field()
"""
The data for the form field.
"""
- encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic_v1.Field()
+ encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic.Field()
"""
The encoding of the value of `data`. Defaults to `RAW` if not defined.
@@ -40,30 +39,21 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
- `GZIP_BASE64` - GZIP_BASE64
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The file name of the form field, if the field is for a file.
"""
- content_type: typing.Optional[str] = pydantic_v1.Field()
+ content_type: typing.Optional[str] = pydantic.Field()
"""
The MIME type of the file, if the field is for a file.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/multipart_form_field_request_encoding.py b/src/merge/resources/ats/types/multipart_form_field_request_encoding.py
index c6513b6b..2b1db5ad 100644
--- a/src/merge/resources/ats/types/multipart_form_field_request_encoding.py
+++ b/src/merge/resources/ats/types/multipart_form_field_request_encoding.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .encoding_enum import EncodingEnum
MultipartFormFieldRequestEncoding = typing.Union[EncodingEnum, str]
diff --git a/src/merge/resources/ats/types/offer.py b/src/merge/resources/ats/types/offer.py
index 2754325b..fefe4d4f 100644
--- a/src/merge/resources/ats/types/offer.py
+++ b/src/merge/resources/ats/types/offer.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .offer_creator import OfferCreator
from .offer_status import OfferStatus
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Offer(pydantic_v1.BaseModel):
+class Offer(UniversalBaseModel):
"""
# The Offer Object
@@ -26,52 +26,52 @@ class Offer(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- application: typing.Optional[OfferApplication] = pydantic_v1.Field()
+ application: typing.Optional["OfferApplication"] = pydantic.Field()
"""
The application who is receiving the offer.
"""
- creator: typing.Optional[OfferCreator] = pydantic_v1.Field()
+ creator: typing.Optional[OfferCreator] = pydantic.Field()
"""
The user who created the offer.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's offer was created.
"""
- closed_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ closed_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the offer was closed.
"""
- sent_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ sent_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the offer was sent.
"""
- start_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The employment start date on the offer.
"""
- status: typing.Optional[OfferStatus] = pydantic_v1.Field()
+ status: typing.Optional[OfferStatus] = pydantic.Field()
"""
The offer's status.
@@ -86,33 +86,28 @@ class Offer(pydantic_v1.BaseModel):
- `DEPRECATED` - DEPRECATED
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+from .application import Application # noqa: E402
+from .candidate import Candidate # noqa: E402
from .offer_application import OfferApplication # noqa: E402
-Offer.update_forward_refs()
+update_forward_refs(Application, Offer=Offer)
+update_forward_refs(Candidate, Offer=Offer)
+update_forward_refs(Offer)
diff --git a/src/merge/resources/ats/types/offer_application.py b/src/merge/resources/ats/types/offer_application.py
index 1d5927d3..fcf4d509 100644
--- a/src/merge/resources/ats/types/offer_application.py
+++ b/src/merge/resources/ats/types/offer_application.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .application import Application
-
-OfferApplication = typing.Union[str, Application]
+if typing.TYPE_CHECKING:
+ from .application import Application
+OfferApplication = typing.Union[str, "Application"]
diff --git a/src/merge/resources/ats/types/offer_creator.py b/src/merge/resources/ats/types/offer_creator.py
index a06a8e2a..fd9f8091 100644
--- a/src/merge/resources/ats/types/offer_creator.py
+++ b/src/merge/resources/ats/types/offer_creator.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
OfferCreator = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/offer_status.py b/src/merge/resources/ats/types/offer_status.py
index f487f0af..9c7491df 100644
--- a/src/merge/resources/ats/types/offer_status.py
+++ b/src/merge/resources/ats/types/offer_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .offer_status_enum import OfferStatusEnum
OfferStatus = typing.Union[OfferStatusEnum, str]
diff --git a/src/merge/resources/ats/types/offer_status_enum.py b/src/merge/resources/ats/types/offer_status_enum.py
index 9fcf2dc1..8890032f 100644
--- a/src/merge/resources/ats/types/offer_status_enum.py
+++ b/src/merge/resources/ats/types/offer_status_enum.py
@@ -1,61 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OfferStatusEnum(str, enum.Enum):
- """
- - `DRAFT` - DRAFT
- - `APPROVAL-SENT` - APPROVAL-SENT
- - `APPROVED` - APPROVED
- - `SENT` - SENT
- - `SENT-MANUALLY` - SENT-MANUALLY
- - `OPENED` - OPENED
- - `DENIED` - DENIED
- - `SIGNED` - SIGNED
- - `DEPRECATED` - DEPRECATED
- """
-
- DRAFT = "DRAFT"
- APPROVAL_SENT = "APPROVAL-SENT"
- APPROVED = "APPROVED"
- SENT = "SENT"
- SENT_MANUALLY = "SENT-MANUALLY"
- OPENED = "OPENED"
- DENIED = "DENIED"
- SIGNED = "SIGNED"
- DEPRECATED = "DEPRECATED"
-
- def visit(
- self,
- draft: typing.Callable[[], T_Result],
- approval_sent: typing.Callable[[], T_Result],
- approved: typing.Callable[[], T_Result],
- sent: typing.Callable[[], T_Result],
- sent_manually: typing.Callable[[], T_Result],
- opened: typing.Callable[[], T_Result],
- denied: typing.Callable[[], T_Result],
- signed: typing.Callable[[], T_Result],
- deprecated: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OfferStatusEnum.DRAFT:
- return draft()
- if self is OfferStatusEnum.APPROVAL_SENT:
- return approval_sent()
- if self is OfferStatusEnum.APPROVED:
- return approved()
- if self is OfferStatusEnum.SENT:
- return sent()
- if self is OfferStatusEnum.SENT_MANUALLY:
- return sent_manually()
- if self is OfferStatusEnum.OPENED:
- return opened()
- if self is OfferStatusEnum.DENIED:
- return denied()
- if self is OfferStatusEnum.SIGNED:
- return signed()
- if self is OfferStatusEnum.DEPRECATED:
- return deprecated()
+OfferStatusEnum = typing.Union[
+ typing.Literal[
+ "DRAFT", "APPROVAL-SENT", "APPROVED", "SENT", "SENT-MANUALLY", "OPENED", "DENIED", "SIGNED", "DEPRECATED"
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/types/office.py b/src/merge/resources/ats/types/office.py
index afd75362..9b39f1ab 100644
--- a/src/merge/resources/ats/types/office.py
+++ b/src/merge/resources/ats/types/office.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Office(pydantic_v1.BaseModel):
+class Office(UniversalBaseModel):
"""
# The Office Object
@@ -22,53 +22,44 @@ class Office(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The office's name.
"""
- location: typing.Optional[str] = pydantic_v1.Field()
+ location: typing.Optional[str] = pydantic.Field()
"""
The office's location.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/overall_recommendation_enum.py b/src/merge/resources/ats/types/overall_recommendation_enum.py
index e1dbbb31..e36dc758 100644
--- a/src/merge/resources/ats/types/overall_recommendation_enum.py
+++ b/src/merge/resources/ats/types/overall_recommendation_enum.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OverallRecommendationEnum(str, enum.Enum):
- """
- - `DEFINITELY_NO` - DEFINITELY_NO
- - `NO` - NO
- - `YES` - YES
- - `STRONG_YES` - STRONG_YES
- - `NO_DECISION` - NO_DECISION
- """
-
- DEFINITELY_NO = "DEFINITELY_NO"
- NO = "NO"
- YES = "YES"
- STRONG_YES = "STRONG_YES"
- NO_DECISION = "NO_DECISION"
-
- def visit(
- self,
- definitely_no: typing.Callable[[], T_Result],
- no: typing.Callable[[], T_Result],
- yes: typing.Callable[[], T_Result],
- strong_yes: typing.Callable[[], T_Result],
- no_decision: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OverallRecommendationEnum.DEFINITELY_NO:
- return definitely_no()
- if self is OverallRecommendationEnum.NO:
- return no()
- if self is OverallRecommendationEnum.YES:
- return yes()
- if self is OverallRecommendationEnum.STRONG_YES:
- return strong_yes()
- if self is OverallRecommendationEnum.NO_DECISION:
- return no_decision()
+OverallRecommendationEnum = typing.Union[
+ typing.Literal["DEFINITELY_NO", "NO", "YES", "STRONG_YES", "NO_DECISION"], typing.Any
+]
diff --git a/src/merge/resources/ats/types/paginated_account_details_and_actions_list.py b/src/merge/resources/ats/types/paginated_account_details_and_actions_list.py
index 280100c4..a9128c76 100644
--- a/src/merge/resources/ats/types/paginated_account_details_and_actions_list.py
+++ b/src/merge/resources/ats/types/paginated_account_details_and_actions_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account_details_and_actions import AccountDetailsAndActions
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountDetailsAndActionsList(pydantic_v1.BaseModel):
+class PaginatedAccountDetailsAndActionsList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AccountDetailsAndActions]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_activity_list.py b/src/merge/resources/ats/types/paginated_activity_list.py
index 3696f98d..0c4832e2 100644
--- a/src/merge/resources/ats/types/paginated_activity_list.py
+++ b/src/merge/resources/ats/types/paginated_activity_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .activity import Activity
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedActivityList(pydantic_v1.BaseModel):
+class PaginatedActivityList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Activity]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_application_list.py b/src/merge/resources/ats/types/paginated_application_list.py
index ea781037..30fe8ba7 100644
--- a/src/merge/resources/ats/types/paginated_application_list.py
+++ b/src/merge/resources/ats/types/paginated_application_list.py
@@ -1,32 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .application import Application
+from .candidate import Candidate
+from .offer import Offer
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedApplicationList(pydantic_v1.BaseModel):
+class PaginatedApplicationList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Application]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, PaginatedApplicationList=PaginatedApplicationList)
+update_forward_refs(Candidate, PaginatedApplicationList=PaginatedApplicationList)
+update_forward_refs(Offer, PaginatedApplicationList=PaginatedApplicationList)
diff --git a/src/merge/resources/ats/types/paginated_attachment_list.py b/src/merge/resources/ats/types/paginated_attachment_list.py
index 52f28d1b..4331659b 100644
--- a/src/merge/resources/ats/types/paginated_attachment_list.py
+++ b/src/merge/resources/ats/types/paginated_attachment_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .attachment import Attachment
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAttachmentList(pydantic_v1.BaseModel):
+class PaginatedAttachmentList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Attachment]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_audit_log_event_list.py b/src/merge/resources/ats/types/paginated_audit_log_event_list.py
index 1d4154d2..a50b7c75 100644
--- a/src/merge/resources/ats/types/paginated_audit_log_event_list.py
+++ b/src/merge/resources/ats/types/paginated_audit_log_event_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .audit_log_event import AuditLogEvent
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAuditLogEventList(pydantic_v1.BaseModel):
+class PaginatedAuditLogEventList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AuditLogEvent]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_candidate_list.py b/src/merge/resources/ats/types/paginated_candidate_list.py
index 0f644c5d..dba61ba5 100644
--- a/src/merge/resources/ats/types/paginated_candidate_list.py
+++ b/src/merge/resources/ats/types/paginated_candidate_list.py
@@ -1,32 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
from .candidate import Candidate
+from .offer import Offer
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedCandidateList(pydantic_v1.BaseModel):
+class PaginatedCandidateList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Candidate]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, PaginatedCandidateList=PaginatedCandidateList)
+update_forward_refs(Candidate, PaginatedCandidateList=PaginatedCandidateList)
+update_forward_refs(Offer, PaginatedCandidateList=PaginatedCandidateList)
diff --git a/src/merge/resources/ats/types/paginated_department_list.py b/src/merge/resources/ats/types/paginated_department_list.py
index 406818fe..030bf008 100644
--- a/src/merge/resources/ats/types/paginated_department_list.py
+++ b/src/merge/resources/ats/types/paginated_department_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .department import Department
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedDepartmentList(pydantic_v1.BaseModel):
+class PaginatedDepartmentList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Department]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_eeoc_list.py b/src/merge/resources/ats/types/paginated_eeoc_list.py
index 58acad54..ce109201 100644
--- a/src/merge/resources/ats/types/paginated_eeoc_list.py
+++ b/src/merge/resources/ats/types/paginated_eeoc_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .eeoc import Eeoc
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedEeocList(pydantic_v1.BaseModel):
+class PaginatedEeocList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Eeoc]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, PaginatedEeocList=PaginatedEeocList)
+update_forward_refs(Candidate, PaginatedEeocList=PaginatedEeocList)
+update_forward_refs(Offer, PaginatedEeocList=PaginatedEeocList)
diff --git a/src/merge/resources/ats/types/paginated_issue_list.py b/src/merge/resources/ats/types/paginated_issue_list.py
index 1016e29a..12b866d9 100644
--- a/src/merge/resources/ats/types/paginated_issue_list.py
+++ b/src/merge/resources/ats/types/paginated_issue_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue import Issue
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedIssueList(pydantic_v1.BaseModel):
+class PaginatedIssueList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Issue]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_job_interview_stage_list.py b/src/merge/resources/ats/types/paginated_job_interview_stage_list.py
index d65d4551..981b15ed 100644
--- a/src/merge/resources/ats/types/paginated_job_interview_stage_list.py
+++ b/src/merge/resources/ats/types/paginated_job_interview_stage_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .job_interview_stage import JobInterviewStage
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedJobInterviewStageList(pydantic_v1.BaseModel):
+class PaginatedJobInterviewStageList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[JobInterviewStage]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_job_list.py b/src/merge/resources/ats/types/paginated_job_list.py
index 031c22d2..9c2f7118 100644
--- a/src/merge/resources/ats/types/paginated_job_list.py
+++ b/src/merge/resources/ats/types/paginated_job_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .job import Job
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedJobList(pydantic_v1.BaseModel):
+class PaginatedJobList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Job]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_job_posting_list.py b/src/merge/resources/ats/types/paginated_job_posting_list.py
index f71b7991..11f8a3f2 100644
--- a/src/merge/resources/ats/types/paginated_job_posting_list.py
+++ b/src/merge/resources/ats/types/paginated_job_posting_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .job_posting import JobPosting
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedJobPostingList(pydantic_v1.BaseModel):
+class PaginatedJobPostingList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[JobPosting]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_offer_list.py b/src/merge/resources/ats/types/paginated_offer_list.py
index 86355bba..aeab94ea 100644
--- a/src/merge/resources/ats/types/paginated_offer_list.py
+++ b/src/merge/resources/ats/types/paginated_offer_list.py
@@ -1,32 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
from .offer import Offer
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedOfferList(pydantic_v1.BaseModel):
+class PaginatedOfferList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Offer]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, PaginatedOfferList=PaginatedOfferList)
+update_forward_refs(Candidate, PaginatedOfferList=PaginatedOfferList)
+update_forward_refs(Offer, PaginatedOfferList=PaginatedOfferList)
diff --git a/src/merge/resources/ats/types/paginated_office_list.py b/src/merge/resources/ats/types/paginated_office_list.py
index c435b372..72aa2c5c 100644
--- a/src/merge/resources/ats/types/paginated_office_list.py
+++ b/src/merge/resources/ats/types/paginated_office_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .office import Office
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedOfficeList(pydantic_v1.BaseModel):
+class PaginatedOfficeList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Office]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_reject_reason_list.py b/src/merge/resources/ats/types/paginated_reject_reason_list.py
index 83c3f847..69e6bcc7 100644
--- a/src/merge/resources/ats/types/paginated_reject_reason_list.py
+++ b/src/merge/resources/ats/types/paginated_reject_reason_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .reject_reason import RejectReason
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedRejectReasonList(pydantic_v1.BaseModel):
+class PaginatedRejectReasonList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[RejectReason]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_remote_user_list.py b/src/merge/resources/ats/types/paginated_remote_user_list.py
index 368a576d..87b92968 100644
--- a/src/merge/resources/ats/types/paginated_remote_user_list.py
+++ b/src/merge/resources/ats/types/paginated_remote_user_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_user import RemoteUser
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedRemoteUserList(pydantic_v1.BaseModel):
+class PaginatedRemoteUserList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[RemoteUser]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_scheduled_interview_list.py b/src/merge/resources/ats/types/paginated_scheduled_interview_list.py
index 1ecb460e..d54da6e9 100644
--- a/src/merge/resources/ats/types/paginated_scheduled_interview_list.py
+++ b/src/merge/resources/ats/types/paginated_scheduled_interview_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .scheduled_interview import ScheduledInterview
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedScheduledInterviewList(pydantic_v1.BaseModel):
+class PaginatedScheduledInterviewList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[ScheduledInterview]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, PaginatedScheduledInterviewList=PaginatedScheduledInterviewList)
+update_forward_refs(Candidate, PaginatedScheduledInterviewList=PaginatedScheduledInterviewList)
+update_forward_refs(Offer, PaginatedScheduledInterviewList=PaginatedScheduledInterviewList)
diff --git a/src/merge/resources/ats/types/paginated_scorecard_list.py b/src/merge/resources/ats/types/paginated_scorecard_list.py
index 72895a94..5c318877 100644
--- a/src/merge/resources/ats/types/paginated_scorecard_list.py
+++ b/src/merge/resources/ats/types/paginated_scorecard_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .scorecard import Scorecard
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedScorecardList(pydantic_v1.BaseModel):
+class PaginatedScorecardList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Scorecard]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, PaginatedScorecardList=PaginatedScorecardList)
+update_forward_refs(Candidate, PaginatedScorecardList=PaginatedScorecardList)
+update_forward_refs(Offer, PaginatedScorecardList=PaginatedScorecardList)
diff --git a/src/merge/resources/ats/types/paginated_screening_question_list.py b/src/merge/resources/ats/types/paginated_screening_question_list.py
index 5b8e77a1..0a7c5f0c 100644
--- a/src/merge/resources/ats/types/paginated_screening_question_list.py
+++ b/src/merge/resources/ats/types/paginated_screening_question_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .screening_question import ScreeningQuestion
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedScreeningQuestionList(pydantic_v1.BaseModel):
+class PaginatedScreeningQuestionList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[ScreeningQuestion]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_sync_status_list.py b/src/merge/resources/ats/types/paginated_sync_status_list.py
index 6c88197e..f59f2c9a 100644
--- a/src/merge/resources/ats/types/paginated_sync_status_list.py
+++ b/src/merge/resources/ats/types/paginated_sync_status_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .sync_status import SyncStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedSyncStatusList(pydantic_v1.BaseModel):
+class PaginatedSyncStatusList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[SyncStatus]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/paginated_tag_list.py b/src/merge/resources/ats/types/paginated_tag_list.py
index a41f1d61..9c632ec6 100644
--- a/src/merge/resources/ats/types/paginated_tag_list.py
+++ b/src/merge/resources/ats/types/paginated_tag_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .tag import Tag
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedTagList(pydantic_v1.BaseModel):
+class PaginatedTagList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Tag]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/patched_candidate_request.py b/src/merge/resources/ats/types/patched_candidate_request.py
index 54191ac1..80c1496e 100644
--- a/src/merge/resources/ats/types/patched_candidate_request.py
+++ b/src/merge/resources/ats/types/patched_candidate_request.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .email_address_request import EmailAddressRequest
+import pydantic
+import datetime as dt
from .phone_number_request import PhoneNumberRequest
+from .email_address_request import EmailAddressRequest
from .url_request import UrlRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PatchedCandidateRequest(pydantic_v1.BaseModel):
+class PatchedCandidateRequest(UniversalBaseModel):
"""
# The Candidate Object
@@ -23,42 +23,42 @@ class PatchedCandidateRequest(pydantic_v1.BaseModel):
Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The candidate's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The candidate's last name.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The candidate's current company.
"""
- title: typing.Optional[str] = pydantic_v1.Field()
+ title: typing.Optional[str] = pydantic.Field()
"""
The candidate's current title.
"""
- last_interaction_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_interaction_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the most recent interaction with the candidate occurred.
"""
- is_private: typing.Optional[bool] = pydantic_v1.Field()
+ is_private: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the candidate is private.
"""
- can_email: typing.Optional[bool] = pydantic_v1.Field()
+ can_email: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the candidate can be emailed.
"""
- locations: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ locations: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The candidate's locations.
"""
@@ -66,39 +66,30 @@ class PatchedCandidateRequest(pydantic_v1.BaseModel):
phone_numbers: typing.Optional[typing.List[PhoneNumberRequest]]
email_addresses: typing.Optional[typing.List[EmailAddressRequest]]
urls: typing.Optional[typing.List[UrlRequest]]
- tags: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ tags: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
Array of `Tag` names as strings.
"""
- applications: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ applications: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
Array of `Application` object IDs.
"""
- attachments: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ attachments: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
Array of `Attachment` object IDs.
"""
remote_template_id: typing.Optional[str]
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+
+ 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/merge/resources/ats/types/phone_number.py b/src/merge/resources/ats/types/phone_number.py
index b639936d..24454fec 100644
--- a/src/merge/resources/ats/types/phone_number.py
+++ b/src/merge/resources/ats/types/phone_number.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
from .phone_number_phone_number_type import PhoneNumberPhoneNumberType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PhoneNumber(pydantic_v1.BaseModel):
+class PhoneNumber(UniversalBaseModel):
"""
# The PhoneNumber Object
@@ -21,22 +21,22 @@ class PhoneNumber(pydantic_v1.BaseModel):
Fetch from the `GET Candidate` endpoint and view their phone numbers.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- value: typing.Optional[str] = pydantic_v1.Field()
+ value: typing.Optional[str] = pydantic.Field()
"""
The phone number.
"""
- phone_number_type: typing.Optional[PhoneNumberPhoneNumberType] = pydantic_v1.Field()
+ phone_number_type: typing.Optional[PhoneNumberPhoneNumberType] = pydantic.Field()
"""
The type of phone number.
@@ -47,25 +47,16 @@ class PhoneNumber(pydantic_v1.BaseModel):
- `OTHER` - OTHER
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/phone_number_phone_number_type.py b/src/merge/resources/ats/types/phone_number_phone_number_type.py
index 277c34ed..39c7b804 100644
--- a/src/merge/resources/ats/types/phone_number_phone_number_type.py
+++ b/src/merge/resources/ats/types/phone_number_phone_number_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .phone_number_type_enum import PhoneNumberTypeEnum
PhoneNumberPhoneNumberType = typing.Union[PhoneNumberTypeEnum, str]
diff --git a/src/merge/resources/ats/types/phone_number_request.py b/src/merge/resources/ats/types/phone_number_request.py
index 498e5d6a..36f7968c 100644
--- a/src/merge/resources/ats/types/phone_number_request.py
+++ b/src/merge/resources/ats/types/phone_number_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .phone_number_request_phone_number_type import PhoneNumberRequestPhoneNumberType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PhoneNumberRequest(pydantic_v1.BaseModel):
+class PhoneNumberRequest(UniversalBaseModel):
"""
# The PhoneNumber Object
@@ -21,12 +20,12 @@ class PhoneNumberRequest(pydantic_v1.BaseModel):
Fetch from the `GET Candidate` endpoint and view their phone numbers.
"""
- value: typing.Optional[str] = pydantic_v1.Field()
+ value: typing.Optional[str] = pydantic.Field()
"""
The phone number.
"""
- phone_number_type: typing.Optional[PhoneNumberRequestPhoneNumberType] = pydantic_v1.Field()
+ phone_number_type: typing.Optional[PhoneNumberRequestPhoneNumberType] = pydantic.Field()
"""
The type of phone number.
@@ -37,23 +36,14 @@ class PhoneNumberRequest(pydantic_v1.BaseModel):
- `OTHER` - OTHER
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/phone_number_request_phone_number_type.py b/src/merge/resources/ats/types/phone_number_request_phone_number_type.py
index a6b9275a..102e40ea 100644
--- a/src/merge/resources/ats/types/phone_number_request_phone_number_type.py
+++ b/src/merge/resources/ats/types/phone_number_request_phone_number_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .phone_number_type_enum import PhoneNumberTypeEnum
PhoneNumberRequestPhoneNumberType = typing.Union[PhoneNumberTypeEnum, str]
diff --git a/src/merge/resources/ats/types/phone_number_type_enum.py b/src/merge/resources/ats/types/phone_number_type_enum.py
index 34fecda7..a8df699b 100644
--- a/src/merge/resources/ats/types/phone_number_type_enum.py
+++ b/src/merge/resources/ats/types/phone_number_type_enum.py
@@ -1,41 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PhoneNumberTypeEnum(str, enum.Enum):
- """
- - `HOME` - HOME
- - `WORK` - WORK
- - `MOBILE` - MOBILE
- - `SKYPE` - SKYPE
- - `OTHER` - OTHER
- """
-
- HOME = "HOME"
- WORK = "WORK"
- MOBILE = "MOBILE"
- SKYPE = "SKYPE"
- OTHER = "OTHER"
-
- def visit(
- self,
- home: typing.Callable[[], T_Result],
- work: typing.Callable[[], T_Result],
- mobile: typing.Callable[[], T_Result],
- skype: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PhoneNumberTypeEnum.HOME:
- return home()
- if self is PhoneNumberTypeEnum.WORK:
- return work()
- if self is PhoneNumberTypeEnum.MOBILE:
- return mobile()
- if self is PhoneNumberTypeEnum.SKYPE:
- return skype()
- if self is PhoneNumberTypeEnum.OTHER:
- return other()
+PhoneNumberTypeEnum = typing.Union[typing.Literal["HOME", "WORK", "MOBILE", "SKYPE", "OTHER"], typing.Any]
diff --git a/src/merge/resources/ats/types/race_enum.py b/src/merge/resources/ats/types/race_enum.py
index 560aa812..dbad2231 100644
--- a/src/merge/resources/ats/types/race_enum.py
+++ b/src/merge/resources/ats/types/race_enum.py
@@ -1,56 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RaceEnum(str, enum.Enum):
- """
- - `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE
- - `ASIAN` - ASIAN
- - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN
- - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO
- - `WHITE` - WHITE
- - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER
- - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES
- - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY
- """
-
- AMERICAN_INDIAN_OR_ALASKAN_NATIVE = "AMERICAN_INDIAN_OR_ALASKAN_NATIVE"
- ASIAN = "ASIAN"
- BLACK_OR_AFRICAN_AMERICAN = "BLACK_OR_AFRICAN_AMERICAN"
- HISPANIC_OR_LATINO = "HISPANIC_OR_LATINO"
- WHITE = "WHITE"
- NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER = "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER"
- TWO_OR_MORE_RACES = "TWO_OR_MORE_RACES"
- DECLINE_TO_SELF_IDENTIFY = "DECLINE_TO_SELF_IDENTIFY"
-
- def visit(
- self,
- american_indian_or_alaskan_native: typing.Callable[[], T_Result],
- asian: typing.Callable[[], T_Result],
- black_or_african_american: typing.Callable[[], T_Result],
- hispanic_or_latino: typing.Callable[[], T_Result],
- white: typing.Callable[[], T_Result],
- native_hawaiian_or_other_pacific_islander: typing.Callable[[], T_Result],
- two_or_more_races: typing.Callable[[], T_Result],
- decline_to_self_identify: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RaceEnum.AMERICAN_INDIAN_OR_ALASKAN_NATIVE:
- return american_indian_or_alaskan_native()
- if self is RaceEnum.ASIAN:
- return asian()
- if self is RaceEnum.BLACK_OR_AFRICAN_AMERICAN:
- return black_or_african_american()
- if self is RaceEnum.HISPANIC_OR_LATINO:
- return hispanic_or_latino()
- if self is RaceEnum.WHITE:
- return white()
- if self is RaceEnum.NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER:
- return native_hawaiian_or_other_pacific_islander()
- if self is RaceEnum.TWO_OR_MORE_RACES:
- return two_or_more_races()
- if self is RaceEnum.DECLINE_TO_SELF_IDENTIFY:
- return decline_to_self_identify()
+RaceEnum = typing.Union[
+ typing.Literal[
+ "AMERICAN_INDIAN_OR_ALASKAN_NATIVE",
+ "ASIAN",
+ "BLACK_OR_AFRICAN_AMERICAN",
+ "HISPANIC_OR_LATINO",
+ "WHITE",
+ "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER",
+ "TWO_OR_MORE_RACES",
+ "DECLINE_TO_SELF_IDENTIFY",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/types/reason_enum.py b/src/merge/resources/ats/types/reason_enum.py
index d14efa20..3e4661d2 100644
--- a/src/merge/resources/ats/types/reason_enum.py
+++ b/src/merge/resources/ats/types/reason_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ReasonEnum(str, enum.Enum):
- """
- - `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST
- - `GDPR` - GDPR
- - `OTHER` - OTHER
- """
-
- GENERAL_CUSTOMER_REQUEST = "GENERAL_CUSTOMER_REQUEST"
- GDPR = "GDPR"
- OTHER = "OTHER"
-
- def visit(
- self,
- general_customer_request: typing.Callable[[], T_Result],
- gdpr: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ReasonEnum.GENERAL_CUSTOMER_REQUEST:
- return general_customer_request()
- if self is ReasonEnum.GDPR:
- return gdpr()
- if self is ReasonEnum.OTHER:
- return other()
+ReasonEnum = typing.Union[typing.Literal["GENERAL_CUSTOMER_REQUEST", "GDPR", "OTHER"], typing.Any]
diff --git a/src/merge/resources/ats/types/reject_reason.py b/src/merge/resources/ats/types/reject_reason.py
index ed4154ce..8b695335 100644
--- a/src/merge/resources/ats/types/reject_reason.py
+++ b/src/merge/resources/ats/types/reject_reason.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RejectReason(pydantic_v1.BaseModel):
+class RejectReason(UniversalBaseModel):
"""
# The RejectReason Object
@@ -22,48 +22,39 @@ class RejectReason(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The rejection reasonβs name.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/remote_data.py b/src/merge/resources/ats/types/remote_data.py
index 098f551b..27c2a5f2 100644
--- a/src/merge/resources/ats/types/remote_data.py
+++ b/src/merge/resources/ats/types/remote_data.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteData(pydantic_v1.BaseModel):
+class RemoteData(UniversalBaseModel):
path: str
- data: typing.Optional[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ data: typing.Optional[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/remote_endpoint_info.py b/src/merge/resources/ats/types/remote_endpoint_info.py
index da6037bc..454688d0 100644
--- a/src/merge/resources/ats/types/remote_endpoint_info.py
+++ b/src/merge/resources/ats/types/remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteEndpointInfo(pydantic_v1.BaseModel):
+class RemoteEndpointInfo(UniversalBaseModel):
method: str
url_path: str
- field_traversal_path: typing.List[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_traversal_path: typing.List[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/remote_field_api.py b/src/merge/resources/ats/types/remote_field_api.py
index ffa9299c..18f2421d 100644
--- a/src/merge/resources/ats/types/remote_field_api.py
+++ b/src/merge/resources/ats/types/remote_field_api.py
@@ -1,39 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .advanced_metadata import AdvancedMetadata
+import pydantic
from .remote_endpoint_info import RemoteEndpointInfo
+from .advanced_metadata import AdvancedMetadata
from .remote_field_api_coverage import RemoteFieldApiCoverage
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteFieldApi(pydantic_v1.BaseModel):
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+class RemoteFieldApi(UniversalBaseModel):
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_key_name: str
remote_endpoint_info: RemoteEndpointInfo
- example_values: typing.Optional[typing.List[typing.Any]]
+ example_values: typing.Optional[typing.List[typing.Optional[typing.Any]]]
advanced_metadata: typing.Optional[AdvancedMetadata]
coverage: typing.Optional[RemoteFieldApiCoverage]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/remote_field_api_response.py b/src/merge/resources/ats/types/remote_field_api_response.py
index ffe4f236..98d643a4 100644
--- a/src/merge/resources/ats/types/remote_field_api_response.py
+++ b/src/merge/resources/ats/types/remote_field_api_response.py
@@ -1,47 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_field_api import RemoteFieldApi
-
-
-class RemoteFieldApiResponse(pydantic_v1.BaseModel):
- activity: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Activity")
- application: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Application")
- attachment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Attachment")
- candidate: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Candidate")
- department: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Department")
- eeoc: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="EEOC")
- scheduled_interview: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="ScheduledInterview")
- job: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Job")
- job_posting: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="JobPosting")
- job_interview_stage: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="JobInterviewStage")
- offer: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Offer")
- office: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Office")
- reject_reason: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="RejectReason")
- scorecard: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Scorecard")
- tag: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Tag")
- remote_user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="RemoteUser")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class RemoteFieldApiResponse(UniversalBaseModel):
+ activity: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Activity")
+ application: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Application")
+ attachment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Attachment")
+ candidate: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Candidate")
+ department: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Department")
+ eeoc: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="EEOC")
+ scheduled_interview: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="ScheduledInterview")
+ job: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Job")
+ job_posting: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="JobPosting")
+ job_interview_stage: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="JobInterviewStage")
+ offer: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Offer")
+ office: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Office")
+ reject_reason: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="RejectReason")
+ scorecard: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Scorecard")
+ tag: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Tag")
+ remote_user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="RemoteUser")
+
+ 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/merge/resources/ats/types/remote_key.py b/src/merge/resources/ats/types/remote_key.py
index e0bec368..7a61c212 100644
--- a/src/merge/resources/ats/types/remote_key.py
+++ b/src/merge/resources/ats/types/remote_key.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteKey(pydantic_v1.BaseModel):
+class RemoteKey(UniversalBaseModel):
"""
# The RemoteKey Object
@@ -23,20 +22,11 @@ class RemoteKey(pydantic_v1.BaseModel):
name: str
key: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/remote_response.py b/src/merge/resources/ats/types/remote_response.py
index e7c13c23..4c9da086 100644
--- a/src/merge/resources/ats/types/remote_response.py
+++ b/src/merge/resources/ats/types/remote_response.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_response_response_type import RemoteResponseResponseType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteResponse(pydantic_v1.BaseModel):
+class RemoteResponse(UniversalBaseModel):
"""
# The RemoteResponse Object
@@ -24,25 +23,16 @@ class RemoteResponse(pydantic_v1.BaseModel):
method: str
path: str
status: int
- response: typing.Any
- response_headers: typing.Optional[typing.Dict[str, typing.Any]]
+ response: typing.Optional[typing.Any]
+ response_headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
response_type: typing.Optional[RemoteResponseResponseType]
- headers: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/remote_response_response_type.py b/src/merge/resources/ats/types/remote_response_response_type.py
index 2556417a..02c2e69b 100644
--- a/src/merge/resources/ats/types/remote_response_response_type.py
+++ b/src/merge/resources/ats/types/remote_response_response_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .response_type_enum import ResponseTypeEnum
RemoteResponseResponseType = typing.Union[ResponseTypeEnum, str]
diff --git a/src/merge/resources/ats/types/remote_user.py b/src/merge/resources/ats/types/remote_user.py
index 63530604..cb5b7f9b 100644
--- a/src/merge/resources/ats/types/remote_user.py
+++ b/src/merge/resources/ats/types/remote_user.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
+import pydantic
+import datetime as dt
from .remote_user_access_role import RemoteUserAccessRole
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteUser(pydantic_v1.BaseModel):
+class RemoteUser(UniversalBaseModel):
"""
# The RemoteUser Object
@@ -23,47 +23,47 @@ class RemoteUser(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The user's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The user's last name.
"""
- email: typing.Optional[str] = pydantic_v1.Field()
+ email: typing.Optional[str] = pydantic.Field()
"""
The user's email.
"""
- disabled: typing.Optional[bool] = pydantic_v1.Field()
+ disabled: typing.Optional[bool] = pydantic.Field()
"""
Whether the user's account had been disabled.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's user was created.
"""
- access_role: typing.Optional[RemoteUserAccessRole] = pydantic_v1.Field()
+ access_role: typing.Optional[RemoteUserAccessRole] = pydantic.Field()
"""
The user's role.
@@ -74,28 +74,19 @@ class RemoteUser(pydantic_v1.BaseModel):
- `INTERVIEWER` - INTERVIEWER
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/remote_user_access_role.py b/src/merge/resources/ats/types/remote_user_access_role.py
index 4f730dfc..4a5089fa 100644
--- a/src/merge/resources/ats/types/remote_user_access_role.py
+++ b/src/merge/resources/ats/types/remote_user_access_role.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .access_role_enum import AccessRoleEnum
RemoteUserAccessRole = typing.Union[AccessRoleEnum, str]
diff --git a/src/merge/resources/ats/types/request_format_enum.py b/src/merge/resources/ats/types/request_format_enum.py
index bf445b71..dc284f25 100644
--- a/src/merge/resources/ats/types/request_format_enum.py
+++ b/src/merge/resources/ats/types/request_format_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RequestFormatEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `XML` - XML
- - `MULTIPART` - MULTIPART
- """
-
- JSON = "JSON"
- XML = "XML"
- MULTIPART = "MULTIPART"
-
- def visit(
- self,
- json: typing.Callable[[], T_Result],
- xml: typing.Callable[[], T_Result],
- multipart: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RequestFormatEnum.JSON:
- return json()
- if self is RequestFormatEnum.XML:
- return xml()
- if self is RequestFormatEnum.MULTIPART:
- return multipart()
+RequestFormatEnum = typing.Union[typing.Literal["JSON", "XML", "MULTIPART"], typing.Any]
diff --git a/src/merge/resources/ats/types/response_type_enum.py b/src/merge/resources/ats/types/response_type_enum.py
index 4b44d47d..7e4d5d30 100644
--- a/src/merge/resources/ats/types/response_type_enum.py
+++ b/src/merge/resources/ats/types/response_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ResponseTypeEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `BASE64_GZIP` - BASE64_GZIP
- """
-
- JSON = "JSON"
- BASE_64_GZIP = "BASE64_GZIP"
-
- def visit(self, json: typing.Callable[[], T_Result], base_64_gzip: typing.Callable[[], T_Result]) -> T_Result:
- if self is ResponseTypeEnum.JSON:
- return json()
- if self is ResponseTypeEnum.BASE_64_GZIP:
- return base_64_gzip()
+ResponseTypeEnum = typing.Union[typing.Literal["JSON", "BASE64_GZIP"], typing.Any]
diff --git a/src/merge/resources/ats/types/role_enum.py b/src/merge/resources/ats/types/role_enum.py
index 05e09112..65066251 100644
--- a/src/merge/resources/ats/types/role_enum.py
+++ b/src/merge/resources/ats/types/role_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RoleEnum(str, enum.Enum):
- """
- - `ADMIN` - ADMIN
- - `DEVELOPER` - DEVELOPER
- - `MEMBER` - MEMBER
- - `API` - API
- - `SYSTEM` - SYSTEM
- - `MERGE_TEAM` - MERGE_TEAM
- """
-
- ADMIN = "ADMIN"
- DEVELOPER = "DEVELOPER"
- MEMBER = "MEMBER"
- API = "API"
- SYSTEM = "SYSTEM"
- MERGE_TEAM = "MERGE_TEAM"
-
- def visit(
- self,
- admin: typing.Callable[[], T_Result],
- developer: typing.Callable[[], T_Result],
- member: typing.Callable[[], T_Result],
- api: typing.Callable[[], T_Result],
- system: typing.Callable[[], T_Result],
- merge_team: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RoleEnum.ADMIN:
- return admin()
- if self is RoleEnum.DEVELOPER:
- return developer()
- if self is RoleEnum.MEMBER:
- return member()
- if self is RoleEnum.API:
- return api()
- if self is RoleEnum.SYSTEM:
- return system()
- if self is RoleEnum.MERGE_TEAM:
- return merge_team()
+RoleEnum = typing.Union[typing.Literal["ADMIN", "DEVELOPER", "MEMBER", "API", "SYSTEM", "MERGE_TEAM"], typing.Any]
diff --git a/src/merge/resources/ats/types/scheduled_interview.py b/src/merge/resources/ats/types/scheduled_interview.py
index 05bd2b9c..4baaf310 100644
--- a/src/merge/resources/ats/types/scheduled_interview.py
+++ b/src/merge/resources/ats/types/scheduled_interview.py
@@ -1,19 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
+import pydantic
+import datetime as dt
from .scheduled_interview_application import ScheduledInterviewApplication
-from .scheduled_interview_interviewers_item import ScheduledInterviewInterviewersItem
from .scheduled_interview_job_interview_stage import ScheduledInterviewJobInterviewStage
from .scheduled_interview_organizer import ScheduledInterviewOrganizer
+from .scheduled_interview_interviewers_item import ScheduledInterviewInterviewersItem
from .scheduled_interview_status import ScheduledInterviewStatus
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class ScheduledInterview(pydantic_v1.BaseModel):
+class ScheduledInterview(UniversalBaseModel):
"""
# The ScheduledInterview Object
@@ -27,69 +32,67 @@ class ScheduledInterview(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- application: typing.Optional[ScheduledInterviewApplication] = pydantic_v1.Field()
+ application: typing.Optional[ScheduledInterviewApplication] = pydantic.Field()
"""
The application being interviewed.
"""
- job_interview_stage: typing.Optional[ScheduledInterviewJobInterviewStage] = pydantic_v1.Field()
+ job_interview_stage: typing.Optional[ScheduledInterviewJobInterviewStage] = pydantic.Field()
"""
The stage of the interview.
"""
- organizer: typing.Optional[ScheduledInterviewOrganizer] = pydantic_v1.Field()
+ organizer: typing.Optional[ScheduledInterviewOrganizer] = pydantic.Field()
"""
The user organizing the interview.
"""
- interviewers: typing.Optional[
- typing.List[typing.Optional[ScheduledInterviewInterviewersItem]]
- ] = pydantic_v1.Field()
+ interviewers: typing.Optional[typing.List[typing.Optional[ScheduledInterviewInterviewersItem]]] = pydantic.Field()
"""
Array of `RemoteUser` IDs.
"""
- location: typing.Optional[str] = pydantic_v1.Field()
+ location: typing.Optional[str] = pydantic.Field()
"""
The interview's location.
"""
- start_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the interview was started.
"""
- end_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the interview was ended.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's interview was created.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's interview was updated.
"""
- status: typing.Optional[ScheduledInterviewStatus] = pydantic_v1.Field()
+ status: typing.Optional[ScheduledInterviewStatus] = pydantic.Field()
"""
The interview's status.
@@ -98,28 +101,24 @@ class ScheduledInterview(pydantic_v1.BaseModel):
- `COMPLETE` - COMPLETE
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, ScheduledInterview=ScheduledInterview)
+update_forward_refs(Candidate, ScheduledInterview=ScheduledInterview)
+update_forward_refs(Offer, ScheduledInterview=ScheduledInterview)
diff --git a/src/merge/resources/ats/types/scheduled_interview_application.py b/src/merge/resources/ats/types/scheduled_interview_application.py
index 56b89e59..04b0a288 100644
--- a/src/merge/resources/ats/types/scheduled_interview_application.py
+++ b/src/merge/resources/ats/types/scheduled_interview_application.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .application import Application
ScheduledInterviewApplication = typing.Union[str, Application]
diff --git a/src/merge/resources/ats/types/scheduled_interview_interviewers_item.py b/src/merge/resources/ats/types/scheduled_interview_interviewers_item.py
index b0d45222..9ae11bb2 100644
--- a/src/merge/resources/ats/types/scheduled_interview_interviewers_item.py
+++ b/src/merge/resources/ats/types/scheduled_interview_interviewers_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ScheduledInterviewInterviewersItem = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/scheduled_interview_job_interview_stage.py b/src/merge/resources/ats/types/scheduled_interview_job_interview_stage.py
index b1eaeb95..26734ca9 100644
--- a/src/merge/resources/ats/types/scheduled_interview_job_interview_stage.py
+++ b/src/merge/resources/ats/types/scheduled_interview_job_interview_stage.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job_interview_stage import JobInterviewStage
ScheduledInterviewJobInterviewStage = typing.Union[str, JobInterviewStage]
diff --git a/src/merge/resources/ats/types/scheduled_interview_organizer.py b/src/merge/resources/ats/types/scheduled_interview_organizer.py
index 6f28b445..456c8d80 100644
--- a/src/merge/resources/ats/types/scheduled_interview_organizer.py
+++ b/src/merge/resources/ats/types/scheduled_interview_organizer.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ScheduledInterviewOrganizer = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/scheduled_interview_request.py b/src/merge/resources/ats/types/scheduled_interview_request.py
index 67bc2921..8213b884 100644
--- a/src/merge/resources/ats/types/scheduled_interview_request.py
+++ b/src/merge/resources/ats/types/scheduled_interview_request.py
@@ -1,18 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .scheduled_interview_request_application import ScheduledInterviewRequestApplication
-from .scheduled_interview_request_interviewers_item import ScheduledInterviewRequestInterviewersItem
+import pydantic
from .scheduled_interview_request_job_interview_stage import ScheduledInterviewRequestJobInterviewStage
from .scheduled_interview_request_organizer import ScheduledInterviewRequestOrganizer
+from .scheduled_interview_request_interviewers_item import ScheduledInterviewRequestInterviewersItem
+import datetime as dt
from .scheduled_interview_request_status import ScheduledInterviewRequestStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class ScheduledInterviewRequest(pydantic_v1.BaseModel):
+class ScheduledInterviewRequest(UniversalBaseModel):
"""
# The ScheduledInterview Object
@@ -25,44 +30,44 @@ class ScheduledInterviewRequest(pydantic_v1.BaseModel):
Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations.
"""
- application: typing.Optional[ScheduledInterviewRequestApplication] = pydantic_v1.Field()
+ application: typing.Optional[ScheduledInterviewRequestApplication] = pydantic.Field()
"""
The application being interviewed.
"""
- job_interview_stage: typing.Optional[ScheduledInterviewRequestJobInterviewStage] = pydantic_v1.Field()
+ job_interview_stage: typing.Optional[ScheduledInterviewRequestJobInterviewStage] = pydantic.Field()
"""
The stage of the interview.
"""
- organizer: typing.Optional[ScheduledInterviewRequestOrganizer] = pydantic_v1.Field()
+ organizer: typing.Optional[ScheduledInterviewRequestOrganizer] = pydantic.Field()
"""
The user organizing the interview.
"""
- interviewers: typing.Optional[
- typing.List[typing.Optional[ScheduledInterviewRequestInterviewersItem]]
- ] = pydantic_v1.Field()
+ interviewers: typing.Optional[typing.List[typing.Optional[ScheduledInterviewRequestInterviewersItem]]] = (
+ pydantic.Field()
+ )
"""
Array of `RemoteUser` IDs.
"""
- location: typing.Optional[str] = pydantic_v1.Field()
+ location: typing.Optional[str] = pydantic.Field()
"""
The interview's location.
"""
- start_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the interview was started.
"""
- end_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the interview was ended.
"""
- status: typing.Optional[ScheduledInterviewRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[ScheduledInterviewRequestStatus] = pydantic.Field()
"""
The interview's status.
@@ -71,23 +76,19 @@ class ScheduledInterviewRequest(pydantic_v1.BaseModel):
- `COMPLETE` - COMPLETE
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, ScheduledInterviewRequest=ScheduledInterviewRequest)
+update_forward_refs(Candidate, ScheduledInterviewRequest=ScheduledInterviewRequest)
+update_forward_refs(Offer, ScheduledInterviewRequest=ScheduledInterviewRequest)
diff --git a/src/merge/resources/ats/types/scheduled_interview_request_application.py b/src/merge/resources/ats/types/scheduled_interview_request_application.py
index 023e98bd..0383e03e 100644
--- a/src/merge/resources/ats/types/scheduled_interview_request_application.py
+++ b/src/merge/resources/ats/types/scheduled_interview_request_application.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .application import Application
ScheduledInterviewRequestApplication = typing.Union[str, Application]
diff --git a/src/merge/resources/ats/types/scheduled_interview_request_interviewers_item.py b/src/merge/resources/ats/types/scheduled_interview_request_interviewers_item.py
index 9d91de72..2e119dde 100644
--- a/src/merge/resources/ats/types/scheduled_interview_request_interviewers_item.py
+++ b/src/merge/resources/ats/types/scheduled_interview_request_interviewers_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ScheduledInterviewRequestInterviewersItem = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/scheduled_interview_request_job_interview_stage.py b/src/merge/resources/ats/types/scheduled_interview_request_job_interview_stage.py
index e3540ac2..fbdea903 100644
--- a/src/merge/resources/ats/types/scheduled_interview_request_job_interview_stage.py
+++ b/src/merge/resources/ats/types/scheduled_interview_request_job_interview_stage.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job_interview_stage import JobInterviewStage
ScheduledInterviewRequestJobInterviewStage = typing.Union[str, JobInterviewStage]
diff --git a/src/merge/resources/ats/types/scheduled_interview_request_organizer.py b/src/merge/resources/ats/types/scheduled_interview_request_organizer.py
index 39f4b8f9..2d9685da 100644
--- a/src/merge/resources/ats/types/scheduled_interview_request_organizer.py
+++ b/src/merge/resources/ats/types/scheduled_interview_request_organizer.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ScheduledInterviewRequestOrganizer = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/scheduled_interview_request_status.py b/src/merge/resources/ats/types/scheduled_interview_request_status.py
index ffbbc800..c4933833 100644
--- a/src/merge/resources/ats/types/scheduled_interview_request_status.py
+++ b/src/merge/resources/ats/types/scheduled_interview_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .scheduled_interview_status_enum import ScheduledInterviewStatusEnum
ScheduledInterviewRequestStatus = typing.Union[ScheduledInterviewStatusEnum, str]
diff --git a/src/merge/resources/ats/types/scheduled_interview_response.py b/src/merge/resources/ats/types/scheduled_interview_response.py
index 17160aca..fd5620aa 100644
--- a/src/merge/resources/ats/types/scheduled_interview_response.py
+++ b/src/merge/resources/ats/types/scheduled_interview_response.py
@@ -1,36 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
from .scheduled_interview import ScheduledInterview
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class ScheduledInterviewResponse(pydantic_v1.BaseModel):
+class ScheduledInterviewResponse(UniversalBaseModel):
model: ScheduledInterview
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, ScheduledInterviewResponse=ScheduledInterviewResponse)
+update_forward_refs(Candidate, ScheduledInterviewResponse=ScheduledInterviewResponse)
+update_forward_refs(Offer, ScheduledInterviewResponse=ScheduledInterviewResponse)
diff --git a/src/merge/resources/ats/types/scheduled_interview_status.py b/src/merge/resources/ats/types/scheduled_interview_status.py
index 2c043345..2d87c70e 100644
--- a/src/merge/resources/ats/types/scheduled_interview_status.py
+++ b/src/merge/resources/ats/types/scheduled_interview_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .scheduled_interview_status_enum import ScheduledInterviewStatusEnum
ScheduledInterviewStatus = typing.Union[ScheduledInterviewStatusEnum, str]
diff --git a/src/merge/resources/ats/types/scheduled_interview_status_enum.py b/src/merge/resources/ats/types/scheduled_interview_status_enum.py
index 0184a806..7ebc7c37 100644
--- a/src/merge/resources/ats/types/scheduled_interview_status_enum.py
+++ b/src/merge/resources/ats/types/scheduled_interview_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ScheduledInterviewStatusEnum(str, enum.Enum):
- """
- - `SCHEDULED` - SCHEDULED
- - `AWAITING_FEEDBACK` - AWAITING_FEEDBACK
- - `COMPLETE` - COMPLETE
- """
-
- SCHEDULED = "SCHEDULED"
- AWAITING_FEEDBACK = "AWAITING_FEEDBACK"
- COMPLETE = "COMPLETE"
-
- def visit(
- self,
- scheduled: typing.Callable[[], T_Result],
- awaiting_feedback: typing.Callable[[], T_Result],
- complete: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ScheduledInterviewStatusEnum.SCHEDULED:
- return scheduled()
- if self is ScheduledInterviewStatusEnum.AWAITING_FEEDBACK:
- return awaiting_feedback()
- if self is ScheduledInterviewStatusEnum.COMPLETE:
- return complete()
+ScheduledInterviewStatusEnum = typing.Union[typing.Literal["SCHEDULED", "AWAITING_FEEDBACK", "COMPLETE"], typing.Any]
diff --git a/src/merge/resources/ats/types/scorecard.py b/src/merge/resources/ats/types/scorecard.py
index 9aeebadf..7d61fd94 100644
--- a/src/merge/resources/ats/types/scorecard.py
+++ b/src/merge/resources/ats/types/scorecard.py
@@ -1,18 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .application import Application
+from .candidate import Candidate
+from .offer import Offer
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
+import pydantic
+import datetime as dt
from .scorecard_application import ScorecardApplication
from .scorecard_interview import ScorecardInterview
from .scorecard_interviewer import ScorecardInterviewer
from .scorecard_overall_recommendation import ScorecardOverallRecommendation
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Scorecard(pydantic_v1.BaseModel):
+class Scorecard(UniversalBaseModel):
"""
# The Scorecard Object
@@ -26,47 +31,47 @@ class Scorecard(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- application: typing.Optional[ScorecardApplication] = pydantic_v1.Field()
+ application: typing.Optional[ScorecardApplication] = pydantic.Field()
"""
The application being scored.
"""
- interview: typing.Optional[ScorecardInterview] = pydantic_v1.Field()
+ interview: typing.Optional[ScorecardInterview] = pydantic.Field()
"""
The interview being scored.
"""
- interviewer: typing.Optional[ScorecardInterviewer] = pydantic_v1.Field()
+ interviewer: typing.Optional[ScorecardInterviewer] = pydantic.Field()
"""
The interviewer doing the scoring.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's scorecard was created.
"""
- submitted_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ submitted_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the scorecard was submitted.
"""
- overall_recommendation: typing.Optional[ScorecardOverallRecommendation] = pydantic_v1.Field()
+ overall_recommendation: typing.Optional[ScorecardOverallRecommendation] = pydantic.Field()
"""
The inteviewer's recommendation.
@@ -77,28 +82,24 @@ class Scorecard(pydantic_v1.BaseModel):
- `NO_DECISION` - NO_DECISION
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Application, Scorecard=Scorecard)
+update_forward_refs(Candidate, Scorecard=Scorecard)
+update_forward_refs(Offer, Scorecard=Scorecard)
diff --git a/src/merge/resources/ats/types/scorecard_application.py b/src/merge/resources/ats/types/scorecard_application.py
index 8d1b7dc2..36837aff 100644
--- a/src/merge/resources/ats/types/scorecard_application.py
+++ b/src/merge/resources/ats/types/scorecard_application.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .application import Application
ScorecardApplication = typing.Union[str, Application]
diff --git a/src/merge/resources/ats/types/scorecard_interview.py b/src/merge/resources/ats/types/scorecard_interview.py
index 2642494a..e17ac2c5 100644
--- a/src/merge/resources/ats/types/scorecard_interview.py
+++ b/src/merge/resources/ats/types/scorecard_interview.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .scheduled_interview import ScheduledInterview
ScorecardInterview = typing.Union[str, ScheduledInterview]
diff --git a/src/merge/resources/ats/types/scorecard_interviewer.py b/src/merge/resources/ats/types/scorecard_interviewer.py
index 96c34cc8..0ee9d79f 100644
--- a/src/merge/resources/ats/types/scorecard_interviewer.py
+++ b/src/merge/resources/ats/types/scorecard_interviewer.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_user import RemoteUser
ScorecardInterviewer = typing.Union[str, RemoteUser]
diff --git a/src/merge/resources/ats/types/scorecard_overall_recommendation.py b/src/merge/resources/ats/types/scorecard_overall_recommendation.py
index 7545a6ca..4ac4e4a4 100644
--- a/src/merge/resources/ats/types/scorecard_overall_recommendation.py
+++ b/src/merge/resources/ats/types/scorecard_overall_recommendation.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .overall_recommendation_enum import OverallRecommendationEnum
ScorecardOverallRecommendation = typing.Union[OverallRecommendationEnum, str]
diff --git a/src/merge/resources/ats/types/screening_question.py b/src/merge/resources/ats/types/screening_question.py
index 33a766de..7ef070c2 100644
--- a/src/merge/resources/ats/types/screening_question.py
+++ b/src/merge/resources/ats/types/screening_question.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .screening_question_job import ScreeningQuestionJob
from .screening_question_type import ScreeningQuestionType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ScreeningQuestion(pydantic_v1.BaseModel):
+class ScreeningQuestion(UniversalBaseModel):
"""
# The ScreeningQuestion Object
@@ -23,37 +23,37 @@ class ScreeningQuestion(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- job: typing.Optional[ScreeningQuestionJob] = pydantic_v1.Field()
+ job: typing.Optional[ScreeningQuestionJob] = pydantic.Field()
"""
The job associated with the screening question.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The description of the screening question
"""
- title: typing.Optional[str] = pydantic_v1.Field()
+ title: typing.Optional[str] = pydantic.Field()
"""
The title of the screening question
"""
- type: typing.Optional[ScreeningQuestionType] = pydantic_v1.Field()
+ type: typing.Optional[ScreeningQuestionType] = pydantic.Field()
"""
The data type for the screening question.
@@ -67,31 +67,22 @@ class ScreeningQuestion(pydantic_v1.BaseModel):
- `BOOLEAN` - BOOLEAN
"""
- required: typing.Optional[bool] = pydantic_v1.Field()
+ required: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the screening question is required.
"""
- options: typing.Optional[typing.List[typing.Any]]
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ options: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/screening_question_answer.py b/src/merge/resources/ats/types/screening_question_answer.py
index 11df114f..3c9595e2 100644
--- a/src/merge/resources/ats/types/screening_question_answer.py
+++ b/src/merge/resources/ats/types/screening_question_answer.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .screening_question_answer_question import ScreeningQuestionAnswerQuestion
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ScreeningQuestionAnswer(pydantic_v1.BaseModel):
+class ScreeningQuestionAnswer(UniversalBaseModel):
"""
# The ScreeningQuestionAnswer Object
@@ -22,50 +22,41 @@ class ScreeningQuestionAnswer(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- question: typing.Optional[ScreeningQuestionAnswerQuestion] = pydantic_v1.Field()
+ question: typing.Optional[ScreeningQuestionAnswerQuestion] = pydantic.Field()
"""
The screening question associated with the candidateβs answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter.
"""
- answer: typing.Optional[str] = pydantic_v1.Field()
+ answer: typing.Optional[str] = pydantic.Field()
"""
The candidateβs response to the screening question.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/screening_question_answer_question.py b/src/merge/resources/ats/types/screening_question_answer_question.py
index 623c4332..c6e3b2f6 100644
--- a/src/merge/resources/ats/types/screening_question_answer_question.py
+++ b/src/merge/resources/ats/types/screening_question_answer_question.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .screening_question import ScreeningQuestion
ScreeningQuestionAnswerQuestion = typing.Union[str, ScreeningQuestion]
diff --git a/src/merge/resources/ats/types/screening_question_answer_request.py b/src/merge/resources/ats/types/screening_question_answer_request.py
index bf18c610..c1cdf362 100644
--- a/src/merge/resources/ats/types/screening_question_answer_request.py
+++ b/src/merge/resources/ats/types/screening_question_answer_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .screening_question_answer_request_question import ScreeningQuestionAnswerRequestQuestion
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ScreeningQuestionAnswerRequest(pydantic_v1.BaseModel):
+class ScreeningQuestionAnswerRequest(UniversalBaseModel):
"""
# The ScreeningQuestionAnswer Object
@@ -21,38 +20,29 @@ class ScreeningQuestionAnswerRequest(pydantic_v1.BaseModel):
TODO
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- question: typing.Optional[ScreeningQuestionAnswerRequestQuestion] = pydantic_v1.Field()
+ question: typing.Optional[ScreeningQuestionAnswerRequestQuestion] = pydantic.Field()
"""
The screening question associated with the candidateβs answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter.
"""
- answer: typing.Optional[str] = pydantic_v1.Field()
+ answer: typing.Optional[str] = pydantic.Field()
"""
The candidateβs response to the screening question.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/screening_question_answer_request_question.py b/src/merge/resources/ats/types/screening_question_answer_request_question.py
index 689cba13..84615a89 100644
--- a/src/merge/resources/ats/types/screening_question_answer_request_question.py
+++ b/src/merge/resources/ats/types/screening_question_answer_request_question.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .screening_question import ScreeningQuestion
ScreeningQuestionAnswerRequestQuestion = typing.Union[str, ScreeningQuestion]
diff --git a/src/merge/resources/ats/types/screening_question_job.py b/src/merge/resources/ats/types/screening_question_job.py
index 239c90e4..63116112 100644
--- a/src/merge/resources/ats/types/screening_question_job.py
+++ b/src/merge/resources/ats/types/screening_question_job.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .job import Job
ScreeningQuestionJob = typing.Union[str, Job]
diff --git a/src/merge/resources/ats/types/screening_question_option.py b/src/merge/resources/ats/types/screening_question_option.py
index db33bcf9..ecdf9e4d 100644
--- a/src/merge/resources/ats/types/screening_question_option.py
+++ b/src/merge/resources/ats/types/screening_question_option.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ScreeningQuestionOption(pydantic_v1.BaseModel):
+class ScreeningQuestionOption(UniversalBaseModel):
"""
# The ScreeningQuestionOption Object
@@ -21,45 +21,36 @@ class ScreeningQuestionOption(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- label: typing.Optional[str] = pydantic_v1.Field()
+ label: typing.Optional[str] = pydantic.Field()
"""
Available response options
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/screening_question_type.py b/src/merge/resources/ats/types/screening_question_type.py
index de17251b..c589dc1d 100644
--- a/src/merge/resources/ats/types/screening_question_type.py
+++ b/src/merge/resources/ats/types/screening_question_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .screening_question_type_enum import ScreeningQuestionTypeEnum
ScreeningQuestionType = typing.Union[ScreeningQuestionTypeEnum, str]
diff --git a/src/merge/resources/ats/types/screening_question_type_enum.py b/src/merge/resources/ats/types/screening_question_type_enum.py
index d0377338..3770940c 100644
--- a/src/merge/resources/ats/types/screening_question_type_enum.py
+++ b/src/merge/resources/ats/types/screening_question_type_enum.py
@@ -1,56 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ScreeningQuestionTypeEnum(str, enum.Enum):
- """
- - `DATE` - DATE
- - `FILE` - FILE
- - `SINGLE_SELECT` - SINGLE_SELECT
- - `MULTI_SELECT` - MULTI_SELECT
- - `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT
- - `MULTI_LINE_TEXT` - MULTI_LINE_TEXT
- - `NUMERIC` - NUMERIC
- - `BOOLEAN` - BOOLEAN
- """
-
- DATE = "DATE"
- FILE = "FILE"
- SINGLE_SELECT = "SINGLE_SELECT"
- MULTI_SELECT = "MULTI_SELECT"
- SINGLE_LINE_TEXT = "SINGLE_LINE_TEXT"
- MULTI_LINE_TEXT = "MULTI_LINE_TEXT"
- NUMERIC = "NUMERIC"
- BOOLEAN = "BOOLEAN"
-
- def visit(
- self,
- date: typing.Callable[[], T_Result],
- file: typing.Callable[[], T_Result],
- single_select: typing.Callable[[], T_Result],
- multi_select: typing.Callable[[], T_Result],
- single_line_text: typing.Callable[[], T_Result],
- multi_line_text: typing.Callable[[], T_Result],
- numeric: typing.Callable[[], T_Result],
- boolean: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ScreeningQuestionTypeEnum.DATE:
- return date()
- if self is ScreeningQuestionTypeEnum.FILE:
- return file()
- if self is ScreeningQuestionTypeEnum.SINGLE_SELECT:
- return single_select()
- if self is ScreeningQuestionTypeEnum.MULTI_SELECT:
- return multi_select()
- if self is ScreeningQuestionTypeEnum.SINGLE_LINE_TEXT:
- return single_line_text()
- if self is ScreeningQuestionTypeEnum.MULTI_LINE_TEXT:
- return multi_line_text()
- if self is ScreeningQuestionTypeEnum.NUMERIC:
- return numeric()
- if self is ScreeningQuestionTypeEnum.BOOLEAN:
- return boolean()
+ScreeningQuestionTypeEnum = typing.Union[
+ typing.Literal[
+ "DATE", "FILE", "SINGLE_SELECT", "MULTI_SELECT", "SINGLE_LINE_TEXT", "MULTI_LINE_TEXT", "NUMERIC", "BOOLEAN"
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/types/selective_sync_configurations_usage_enum.py b/src/merge/resources/ats/types/selective_sync_configurations_usage_enum.py
index 4de6df94..baa6f2bd 100644
--- a/src/merge/resources/ats/types/selective_sync_configurations_usage_enum.py
+++ b/src/merge/resources/ats/types/selective_sync_configurations_usage_enum.py
@@ -1,24 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SelectiveSyncConfigurationsUsageEnum(str, enum.Enum):
- """
- - `IN_NEXT_SYNC` - IN_NEXT_SYNC
- - `IN_LAST_SYNC` - IN_LAST_SYNC
- """
-
- IN_NEXT_SYNC = "IN_NEXT_SYNC"
- IN_LAST_SYNC = "IN_LAST_SYNC"
-
- def visit(
- self, in_next_sync: typing.Callable[[], T_Result], in_last_sync: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is SelectiveSyncConfigurationsUsageEnum.IN_NEXT_SYNC:
- return in_next_sync()
- if self is SelectiveSyncConfigurationsUsageEnum.IN_LAST_SYNC:
- return in_last_sync()
+SelectiveSyncConfigurationsUsageEnum = typing.Union[typing.Literal["IN_NEXT_SYNC", "IN_LAST_SYNC"], typing.Any]
diff --git a/src/merge/resources/ats/types/sync_status.py b/src/merge/resources/ats/types/sync_status.py
index c6b7cbc4..f9a62229 100644
--- a/src/merge/resources/ats/types/sync_status.py
+++ b/src/merge/resources/ats/types/sync_status.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+import datetime as dt
from .sync_status_status_enum import SyncStatusStatusEnum
+from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class SyncStatus(pydantic_v1.BaseModel):
+class SyncStatus(UniversalBaseModel):
"""
# The SyncStatus Object
@@ -30,20 +30,11 @@ class SyncStatus(pydantic_v1.BaseModel):
is_initial_sync: bool
selective_sync_configurations_usage: typing.Optional[SelectiveSyncConfigurationsUsageEnum]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/sync_status_status_enum.py b/src/merge/resources/ats/types/sync_status_status_enum.py
index e21e3285..92814990 100644
--- a/src/merge/resources/ats/types/sync_status_status_enum.py
+++ b/src/merge/resources/ats/types/sync_status_status_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SyncStatusStatusEnum(str, enum.Enum):
- """
- - `SYNCING` - SYNCING
- - `DONE` - DONE
- - `FAILED` - FAILED
- - `DISABLED` - DISABLED
- - `PAUSED` - PAUSED
- - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED
- """
-
- SYNCING = "SYNCING"
- DONE = "DONE"
- FAILED = "FAILED"
- DISABLED = "DISABLED"
- PAUSED = "PAUSED"
- PARTIALLY_SYNCED = "PARTIALLY_SYNCED"
-
- def visit(
- self,
- syncing: typing.Callable[[], T_Result],
- done: typing.Callable[[], T_Result],
- failed: typing.Callable[[], T_Result],
- disabled: typing.Callable[[], T_Result],
- paused: typing.Callable[[], T_Result],
- partially_synced: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SyncStatusStatusEnum.SYNCING:
- return syncing()
- if self is SyncStatusStatusEnum.DONE:
- return done()
- if self is SyncStatusStatusEnum.FAILED:
- return failed()
- if self is SyncStatusStatusEnum.DISABLED:
- return disabled()
- if self is SyncStatusStatusEnum.PAUSED:
- return paused()
- if self is SyncStatusStatusEnum.PARTIALLY_SYNCED:
- return partially_synced()
+SyncStatusStatusEnum = typing.Union[
+ typing.Literal["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"], typing.Any
+]
diff --git a/src/merge/resources/ats/types/tag.py b/src/merge/resources/ats/types/tag.py
index ed81b764..ab97fa8d 100644
--- a/src/merge/resources/ats/types/tag.py
+++ b/src/merge/resources/ats/types/tag.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Tag(pydantic_v1.BaseModel):
+class Tag(UniversalBaseModel):
"""
# The Tag Object
@@ -20,48 +20,39 @@ class Tag(pydantic_v1.BaseModel):
Fetch from the `LIST Tags` endpoint and view the tags used within a company.
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The tag's name.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/url.py b/src/merge/resources/ats/types/url.py
index 8905c306..393040c2 100644
--- a/src/merge/resources/ats/types/url.py
+++ b/src/merge/resources/ats/types/url.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
from .url_url_type import UrlUrlType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Url(pydantic_v1.BaseModel):
+class Url(UniversalBaseModel):
"""
# The Url Object
@@ -21,22 +21,22 @@ class Url(pydantic_v1.BaseModel):
Fetch from the `GET Candidate` endpoint and view their website urls.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- value: typing.Optional[str] = pydantic_v1.Field()
+ value: typing.Optional[str] = pydantic.Field()
"""
The site's url.
"""
- url_type: typing.Optional[UrlUrlType] = pydantic_v1.Field()
+ url_type: typing.Optional[UrlUrlType] = pydantic.Field()
"""
The type of site.
@@ -49,25 +49,16 @@ class Url(pydantic_v1.BaseModel):
- `JOB_POSTING` - JOB_POSTING
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/url_request.py b/src/merge/resources/ats/types/url_request.py
index 3eebb3f7..af2e50e9 100644
--- a/src/merge/resources/ats/types/url_request.py
+++ b/src/merge/resources/ats/types/url_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .url_request_url_type import UrlRequestUrlType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class UrlRequest(pydantic_v1.BaseModel):
+class UrlRequest(UniversalBaseModel):
"""
# The Url Object
@@ -21,12 +20,12 @@ class UrlRequest(pydantic_v1.BaseModel):
Fetch from the `GET Candidate` endpoint and view their website urls.
"""
- value: typing.Optional[str] = pydantic_v1.Field()
+ value: typing.Optional[str] = pydantic.Field()
"""
The site's url.
"""
- url_type: typing.Optional[UrlRequestUrlType] = pydantic_v1.Field()
+ url_type: typing.Optional[UrlRequestUrlType] = pydantic.Field()
"""
The type of site.
@@ -39,23 +38,14 @@ class UrlRequest(pydantic_v1.BaseModel):
- `JOB_POSTING` - JOB_POSTING
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/url_request_url_type.py b/src/merge/resources/ats/types/url_request_url_type.py
index 2735a7e6..647cadb6 100644
--- a/src/merge/resources/ats/types/url_request_url_type.py
+++ b/src/merge/resources/ats/types/url_request_url_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .url_type_enum import UrlTypeEnum
UrlRequestUrlType = typing.Union[UrlTypeEnum, str]
diff --git a/src/merge/resources/ats/types/url_type_enum.py b/src/merge/resources/ats/types/url_type_enum.py
index 30088a37..311e7e64 100644
--- a/src/merge/resources/ats/types/url_type_enum.py
+++ b/src/merge/resources/ats/types/url_type_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class UrlTypeEnum(str, enum.Enum):
- """
- - `PERSONAL` - PERSONAL
- - `COMPANY` - COMPANY
- - `PORTFOLIO` - PORTFOLIO
- - `BLOG` - BLOG
- - `SOCIAL_MEDIA` - SOCIAL_MEDIA
- - `OTHER` - OTHER
- - `JOB_POSTING` - JOB_POSTING
- """
-
- PERSONAL = "PERSONAL"
- COMPANY = "COMPANY"
- PORTFOLIO = "PORTFOLIO"
- BLOG = "BLOG"
- SOCIAL_MEDIA = "SOCIAL_MEDIA"
- OTHER = "OTHER"
- JOB_POSTING = "JOB_POSTING"
-
- def visit(
- self,
- personal: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- portfolio: typing.Callable[[], T_Result],
- blog: typing.Callable[[], T_Result],
- social_media: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- job_posting: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is UrlTypeEnum.PERSONAL:
- return personal()
- if self is UrlTypeEnum.COMPANY:
- return company()
- if self is UrlTypeEnum.PORTFOLIO:
- return portfolio()
- if self is UrlTypeEnum.BLOG:
- return blog()
- if self is UrlTypeEnum.SOCIAL_MEDIA:
- return social_media()
- if self is UrlTypeEnum.OTHER:
- return other()
- if self is UrlTypeEnum.JOB_POSTING:
- return job_posting()
+UrlTypeEnum = typing.Union[
+ typing.Literal["PERSONAL", "COMPANY", "PORTFOLIO", "BLOG", "SOCIAL_MEDIA", "OTHER", "JOB_POSTING"], typing.Any
+]
diff --git a/src/merge/resources/ats/types/url_url_type.py b/src/merge/resources/ats/types/url_url_type.py
index 2321b25f..2794ab44 100644
--- a/src/merge/resources/ats/types/url_url_type.py
+++ b/src/merge/resources/ats/types/url_url_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .url_type_enum import UrlTypeEnum
UrlUrlType = typing.Union[UrlTypeEnum, str]
diff --git a/src/merge/resources/ats/types/validation_problem_source.py b/src/merge/resources/ats/types/validation_problem_source.py
index fde15b40..d9a4a8fe 100644
--- a/src/merge/resources/ats/types/validation_problem_source.py
+++ b/src/merge/resources/ats/types/validation_problem_source.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ValidationProblemSource(pydantic_v1.BaseModel):
+class ValidationProblemSource(UniversalBaseModel):
pointer: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/veteran_status_enum.py b/src/merge/resources/ats/types/veteran_status_enum.py
index d5e228bf..488e70a8 100644
--- a/src/merge/resources/ats/types/veteran_status_enum.py
+++ b/src/merge/resources/ats/types/veteran_status_enum.py
@@ -1,33 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class VeteranStatusEnum(str, enum.Enum):
- """
- - `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN
- - `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN
- - `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER
- """
-
- I_AM_NOT_A_PROTECTED_VETERAN = "I_AM_NOT_A_PROTECTED_VETERAN"
- I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN = (
- "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN"
- )
- I_DONT_WISH_TO_ANSWER = "I_DONT_WISH_TO_ANSWER"
-
- def visit(
- self,
- i_am_not_a_protected_veteran: typing.Callable[[], T_Result],
- i_identify_as_one_or_more_of_the_classifications_of_a_protected_veteran: typing.Callable[[], T_Result],
- i_dont_wish_to_answer: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is VeteranStatusEnum.I_AM_NOT_A_PROTECTED_VETERAN:
- return i_am_not_a_protected_veteran()
- if self is VeteranStatusEnum.I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN:
- return i_identify_as_one_or_more_of_the_classifications_of_a_protected_veteran()
- if self is VeteranStatusEnum.I_DONT_WISH_TO_ANSWER:
- return i_dont_wish_to_answer()
+VeteranStatusEnum = typing.Union[
+ typing.Literal[
+ "I_AM_NOT_A_PROTECTED_VETERAN",
+ "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN",
+ "I_DONT_WISH_TO_ANSWER",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ats/types/visibility_enum.py b/src/merge/resources/ats/types/visibility_enum.py
index 51b0a8b4..0747e3bd 100644
--- a/src/merge/resources/ats/types/visibility_enum.py
+++ b/src/merge/resources/ats/types/visibility_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class VisibilityEnum(str, enum.Enum):
- """
- - `ADMIN_ONLY` - ADMIN_ONLY
- - `PUBLIC` - PUBLIC
- - `PRIVATE` - PRIVATE
- """
-
- ADMIN_ONLY = "ADMIN_ONLY"
- PUBLIC = "PUBLIC"
- PRIVATE = "PRIVATE"
-
- def visit(
- self,
- admin_only: typing.Callable[[], T_Result],
- public: typing.Callable[[], T_Result],
- private: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is VisibilityEnum.ADMIN_ONLY:
- return admin_only()
- if self is VisibilityEnum.PUBLIC:
- return public()
- if self is VisibilityEnum.PRIVATE:
- return private()
+VisibilityEnum = typing.Union[typing.Literal["ADMIN_ONLY", "PUBLIC", "PRIVATE"], typing.Any]
diff --git a/src/merge/resources/ats/types/warning_validation_problem.py b/src/merge/resources/ats/types/warning_validation_problem.py
index 6baf9600..d508bb6d 100644
--- a/src/merge/resources/ats/types/warning_validation_problem.py
+++ b/src/merge/resources/ats/types/warning_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class WarningValidationProblem(pydantic_v1.BaseModel):
+class WarningValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/types/webhook_receiver.py b/src/merge/resources/ats/types/webhook_receiver.py
index 0544f256..e8cd17aa 100644
--- a/src/merge/resources/ats/types/webhook_receiver.py
+++ b/src/merge/resources/ats/types/webhook_receiver.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class WebhookReceiver(pydantic_v1.BaseModel):
+class WebhookReceiver(UniversalBaseModel):
event: str
is_active: bool
key: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/client.py b/src/merge/resources/crm/client.py
index 87941414..991998c2 100644
--- a/src/merge/resources/crm/client.py
+++ b/src/merge/resources/crm/client.py
@@ -1,43 +1,73 @@
# This file was auto-generated by Fern from our API Definition.
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .resources.account_details.client import AccountDetailsClient, AsyncAccountDetailsClient
-from .resources.account_token.client import AccountTokenClient, AsyncAccountTokenClient
-from .resources.accounts.client import AccountsClient, AsyncAccountsClient
-from .resources.association_types.client import AssociationTypesClient, AsyncAssociationTypesClient
-from .resources.associations.client import AssociationsClient, AsyncAssociationsClient
-from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from ...core.client_wrapper import SyncClientWrapper
+from .resources.account_details.client import AccountDetailsClient
+from .resources.account_token.client import AccountTokenClient
+from .resources.accounts.client import AccountsClient
from .resources.async_passthrough.client import (
AsyncPassthroughClient as resources_crm_resources_async_passthrough_client_AsyncPassthroughClient,
)
-from .resources.audit_trail.client import AsyncAuditTrailClient, AuditTrailClient
-from .resources.available_actions.client import AsyncAvailableActionsClient, AvailableActionsClient
-from .resources.contacts.client import AsyncContactsClient, ContactsClient
-from .resources.custom_object_classes.client import AsyncCustomObjectClassesClient, CustomObjectClassesClient
-from .resources.custom_objects.client import AsyncCustomObjectsClient, CustomObjectsClient
-from .resources.delete_account.client import AsyncDeleteAccountClient, DeleteAccountClient
-from .resources.engagement_types.client import AsyncEngagementTypesClient, EngagementTypesClient
-from .resources.engagements.client import AsyncEngagementsClient, EngagementsClient
-from .resources.field_mapping.client import AsyncFieldMappingClient, FieldMappingClient
-from .resources.force_resync.client import AsyncForceResyncClient, ForceResyncClient
-from .resources.generate_key.client import AsyncGenerateKeyClient, GenerateKeyClient
-from .resources.issues.client import AsyncIssuesClient, IssuesClient
-from .resources.leads.client import AsyncLeadsClient, LeadsClient
-from .resources.link_token.client import AsyncLinkTokenClient, LinkTokenClient
-from .resources.linked_accounts.client import AsyncLinkedAccountsClient, LinkedAccountsClient
-from .resources.notes.client import AsyncNotesClient, NotesClient
-from .resources.opportunities.client import AsyncOpportunitiesClient, OpportunitiesClient
+from .resources.audit_trail.client import AuditTrailClient
+from .resources.available_actions.client import AvailableActionsClient
+from .resources.contacts.client import ContactsClient
+from .resources.custom_object_classes.client import CustomObjectClassesClient
+from .resources.association_types.client import AssociationTypesClient
+from .resources.custom_objects.client import CustomObjectsClient
+from .resources.associations.client import AssociationsClient
+from .resources.scopes.client import ScopesClient
+from .resources.delete_account.client import DeleteAccountClient
+from .resources.engagement_types.client import EngagementTypesClient
+from .resources.engagements.client import EngagementsClient
+from .resources.field_mapping.client import FieldMappingClient
+from .resources.generate_key.client import GenerateKeyClient
+from .resources.issues.client import IssuesClient
+from .resources.leads.client import LeadsClient
+from .resources.link_token.client import LinkTokenClient
+from .resources.linked_accounts.client import LinkedAccountsClient
+from .resources.notes.client import NotesClient
+from .resources.opportunities.client import OpportunitiesClient
+from .resources.passthrough.client import PassthroughClient
+from .resources.regenerate_key.client import RegenerateKeyClient
+from .resources.stages.client import StagesClient
+from .resources.sync_status.client import SyncStatusClient
+from .resources.force_resync.client import ForceResyncClient
+from .resources.tasks.client import TasksClient
+from .resources.users.client import UsersClient
+from .resources.webhook_receivers.client import WebhookReceiversClient
+from ...core.client_wrapper import AsyncClientWrapper
+from .resources.account_details.client import AsyncAccountDetailsClient
+from .resources.account_token.client import AsyncAccountTokenClient
+from .resources.accounts.client import AsyncAccountsClient
+from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from .resources.audit_trail.client import AsyncAuditTrailClient
+from .resources.available_actions.client import AsyncAvailableActionsClient
+from .resources.contacts.client import AsyncContactsClient
+from .resources.custom_object_classes.client import AsyncCustomObjectClassesClient
+from .resources.association_types.client import AsyncAssociationTypesClient
+from .resources.custom_objects.client import AsyncCustomObjectsClient
+from .resources.associations.client import AsyncAssociationsClient
+from .resources.scopes.client import AsyncScopesClient
+from .resources.delete_account.client import AsyncDeleteAccountClient
+from .resources.engagement_types.client import AsyncEngagementTypesClient
+from .resources.engagements.client import AsyncEngagementsClient
+from .resources.field_mapping.client import AsyncFieldMappingClient
+from .resources.generate_key.client import AsyncGenerateKeyClient
+from .resources.issues.client import AsyncIssuesClient
+from .resources.leads.client import AsyncLeadsClient
+from .resources.link_token.client import AsyncLinkTokenClient
+from .resources.linked_accounts.client import AsyncLinkedAccountsClient
+from .resources.notes.client import AsyncNotesClient
+from .resources.opportunities.client import AsyncOpportunitiesClient
from .resources.passthrough.client import (
AsyncPassthroughClient as resources_crm_resources_passthrough_client_AsyncPassthroughClient,
)
-from .resources.passthrough.client import PassthroughClient
-from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient
-from .resources.scopes.client import AsyncScopesClient, ScopesClient
-from .resources.stages.client import AsyncStagesClient, StagesClient
-from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient
-from .resources.tasks.client import AsyncTasksClient, TasksClient
-from .resources.users.client import AsyncUsersClient, UsersClient
-from .resources.webhook_receivers.client import AsyncWebhookReceiversClient, WebhookReceiversClient
+from .resources.regenerate_key.client import AsyncRegenerateKeyClient
+from .resources.stages.client import AsyncStagesClient
+from .resources.sync_status.client import AsyncSyncStatusClient
+from .resources.force_resync.client import AsyncForceResyncClient
+from .resources.tasks.client import AsyncTasksClient
+from .resources.users.client import AsyncUsersClient
+from .resources.webhook_receivers.client import AsyncWebhookReceiversClient
class CrmClient:
diff --git a/src/merge/resources/crm/resources/account_details/client.py b/src/merge/resources/crm/resources/account_details/client.py
index b892c7ad..e8896069 100644
--- a/src/merge/resources/crm/resources/account_details/client.py
+++ b/src/merge/resources/crm/resources/account_details/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_details import AccountDetails
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountDetailsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.crm.account_details.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/account-details", method="GET", request_options=request_options
+ "crm/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.account_details.retrieve()
+
+
+ async def main() -> None:
+ await client.crm.account_details.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/account-details", method="GET", request_options=request_options
+ "crm/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/account_token/client.py b/src/merge/resources/crm/resources/account_token/client.py
index 9fd7ad61..5e45c46e 100644
--- a/src/merge/resources/crm/resources/account_token/client.py
+++ b/src/merge/resources/crm/resources/account_token/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_token import AccountToken
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountTokenClient:
@@ -33,7 +33,7 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -44,11 +44,19 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"crm/v1/account-token/{jsonable_encoder(public_token)}", method="GET", request_options=request_options
+ f"crm/v1/account-token/{jsonable_encoder(public_token)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -79,22 +87,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.account_token.retrieve(
- public_token="public_token",
- )
+
+
+ async def main() -> None:
+ await client.crm.account_token.retrieve(
+ public_token="public_token",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"crm/v1/account-token/{jsonable_encoder(public_token)}", method="GET", request_options=request_options
+ f"crm/v1/account-token/{jsonable_encoder(public_token)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/accounts/client.py b/src/merge/resources/crm/resources/accounts/client.py
index 7b5587c3..1a9a5015 100644
--- a/src/merge/resources/crm/resources/accounts/client.py
+++ b/src/merge/resources/crm/resources/accounts/client.py
@@ -1,22 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_account_list import PaginatedAccountList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.account import Account
from ...types.account_request import AccountRequest
from ...types.crm_account_response import CrmAccountResponse
+from ...types.account import Account
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.patched_account_request import PatchedAccountRequest
from ...types.meta_response import MetaResponse
-from ...types.paginated_account_list import PaginatedAccountList
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from ...types.patched_account_request import PatchedAccountRequest
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -98,7 +98,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -126,9 +126,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountList,
+ parse_obj_as(
+ type_=PaginatedAccountList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -165,7 +171,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import AccountRequest
client = Merge(
@@ -179,14 +185,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/accounts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmAccountResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmAccountResponse,
+ parse_obj_as(
+ type_=CrmAccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -227,7 +244,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -247,9 +264,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Account, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Account,
+ parse_obj_as(
+ type_=Account, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -289,7 +312,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import PatchedAccountRequest
client = Merge(
@@ -304,14 +327,25 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/accounts/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmAccountResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmAccountResponse,
+ parse_obj_as(
+ type_=CrmAccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -335,7 +369,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -346,11 +380,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"crm/v1/accounts/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/accounts/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -372,7 +414,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -381,11 +423,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.crm.accounts.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/accounts/meta/post", method="GET", request_options=request_options
+ "crm/v1/accounts/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -435,7 +485,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -456,9 +506,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -541,13 +597,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.accounts.list()
+
+
+ async def main() -> None:
+ await client.crm.accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/accounts",
@@ -569,9 +633,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountList,
+ parse_obj_as(
+ type_=PaginatedAccountList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -608,28 +678,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import AccountRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.accounts.create(
- model=AccountRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.accounts.create(
+ model=AccountRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/accounts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmAccountResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmAccountResponse,
+ parse_obj_as(
+ type_=CrmAccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -670,15 +759,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.accounts.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.accounts.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/accounts/{jsonable_encoder(id)}",
@@ -690,9 +787,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Account, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Account,
+ parse_obj_as(
+ type_=Account, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -732,29 +835,48 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import PatchedAccountRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.accounts.partial_update(
- id="id",
- model=PatchedAccountRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.accounts.partial_update(
+ id="id",
+ model=PatchedAccountRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/accounts/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmAccountResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmAccountResponse,
+ parse_obj_as(
+ type_=CrmAccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -780,22 +902,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.accounts.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.accounts.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"crm/v1/accounts/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/accounts/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -817,20 +955,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.accounts.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.accounts.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/accounts/meta/post", method="GET", request_options=request_options
+ "crm/v1/accounts/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -880,13 +1034,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.accounts.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.accounts.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/accounts/remote-field-classes",
@@ -901,9 +1063,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/association_types/client.py b/src/merge/resources/crm/resources/association_types/client.py
index f8f84cc5..aab32f61 100644
--- a/src/merge/resources/crm/resources/association_types/client.py
+++ b/src/merge/resources/crm/resources/association_types/client.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_association_type_list import PaginatedAssociationTypeList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.association_type import AssociationType
from ...types.association_type_request_request import AssociationTypeRequestRequest
from ...types.crm_association_type_response import CrmAssociationTypeResponse
+from ...types.association_type import AssociationType
from ...types.meta_response import MetaResponse
-from ...types.paginated_association_type_list import PaginatedAssociationTypeList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -87,7 +87,7 @@ def custom_object_classes_association_types_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -114,9 +114,15 @@ def custom_object_classes_association_types_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAssociationTypeList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAssociationTypeList,
+ parse_obj_as(
+ type_=PaginatedAssociationTypeList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -156,11 +162,10 @@ def custom_object_classes_association_types_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import (
AssociationTypeRequestRequest,
ObjectClassDescriptionRequest,
- OriginTypeEnum,
)
client = Merge(
@@ -172,12 +177,12 @@ def custom_object_classes_association_types_create(
model=AssociationTypeRequestRequest(
source_object_class=ObjectClassDescriptionRequest(
id="id",
- origin_type=OriginTypeEnum.CUSTOM_OBJECT,
+ origin_type="CUSTOM_OBJECT",
),
target_object_classes=[
ObjectClassDescriptionRequest(
id="id",
- origin_type=OriginTypeEnum.CUSTOM_OBJECT,
+ origin_type="CUSTOM_OBJECT",
)
],
remote_key_name="remote_key_name",
@@ -187,14 +192,25 @@ def custom_object_classes_association_types_create(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/association-types",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmAssociationTypeResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmAssociationTypeResponse,
+ parse_obj_as(
+ type_=CrmAssociationTypeResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -234,7 +250,7 @@ def custom_object_classes_association_types_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -248,12 +264,21 @@ def custom_object_classes_association_types_retrieve(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/association-types/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AssociationType, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AssociationType,
+ parse_obj_as(
+ type_=AssociationType, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -279,7 +304,7 @@ def custom_object_classes_association_types_meta_post_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -294,9 +319,15 @@ def custom_object_classes_association_types_meta_post_retrieve(
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -370,15 +401,23 @@ async def custom_object_classes_association_types_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.association_types.custom_object_classes_association_types_list(
- custom_object_class_id="custom_object_class_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.association_types.custom_object_classes_association_types_list(
+ custom_object_class_id="custom_object_class_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/association-types",
@@ -397,9 +436,15 @@ async def custom_object_classes_association_types_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAssociationTypeList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAssociationTypeList,
+ parse_obj_as(
+ type_=PaginatedAssociationTypeList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -439,45 +484,63 @@ async def custom_object_classes_association_types_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import (
AssociationTypeRequestRequest,
ObjectClassDescriptionRequest,
- OriginTypeEnum,
)
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.association_types.custom_object_classes_association_types_create(
- custom_object_class_id="custom_object_class_id",
- model=AssociationTypeRequestRequest(
- source_object_class=ObjectClassDescriptionRequest(
- id="id",
- origin_type=OriginTypeEnum.CUSTOM_OBJECT,
- ),
- target_object_classes=[
- ObjectClassDescriptionRequest(
+
+
+ async def main() -> None:
+ await client.crm.association_types.custom_object_classes_association_types_create(
+ custom_object_class_id="custom_object_class_id",
+ model=AssociationTypeRequestRequest(
+ source_object_class=ObjectClassDescriptionRequest(
id="id",
- origin_type=OriginTypeEnum.CUSTOM_OBJECT,
- )
- ],
- remote_key_name="remote_key_name",
- ),
- )
+ origin_type="CUSTOM_OBJECT",
+ ),
+ target_object_classes=[
+ ObjectClassDescriptionRequest(
+ id="id",
+ origin_type="CUSTOM_OBJECT",
+ )
+ ],
+ remote_key_name="remote_key_name",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/association-types",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmAssociationTypeResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmAssociationTypeResponse,
+ parse_obj_as(
+ type_=CrmAssociationTypeResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -517,26 +580,43 @@ async def custom_object_classes_association_types_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.association_types.custom_object_classes_association_types_retrieve(
- custom_object_class_id="custom_object_class_id",
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.association_types.custom_object_classes_association_types_retrieve(
+ custom_object_class_id="custom_object_class_id",
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/association-types/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AssociationType, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AssociationType,
+ parse_obj_as(
+ type_=AssociationType, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -562,24 +642,38 @@ async def custom_object_classes_association_types_meta_post_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve(
- custom_object_class_id="custom_object_class_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve(
+ custom_object_class_id="custom_object_class_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/association-types/meta/post",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/associations/client.py b/src/merge/resources/crm/resources/associations/client.py
index 490e2db9..7e25e5d4 100644
--- a/src/merge/resources/crm/resources/associations/client.py
+++ b/src/merge/resources/crm/resources/associations/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_association_list import PaginatedAssociationList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.association import Association
-from ...types.paginated_association_list import PaginatedAssociationList
+from .....core.client_wrapper import AsyncClientWrapper
class AssociationsClient:
@@ -88,7 +88,7 @@ def custom_object_classes_custom_objects_associations_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -117,9 +117,15 @@ def custom_object_classes_custom_objects_associations_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAssociationList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAssociationList,
+ parse_obj_as(
+ type_=PaginatedAssociationList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -168,7 +174,7 @@ def custom_object_classes_custom_objects_associations_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -185,12 +191,21 @@ def custom_object_classes_custom_objects_associations_update(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(source_class_id)}/custom-objects/{jsonable_encoder(source_object_id)}/associations/{jsonable_encoder(target_class_id)}/{jsonable_encoder(target_object_id)}/{jsonable_encoder(association_type_id)}",
method="PUT",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Association, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Association,
+ parse_obj_as(
+ type_=Association, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -271,16 +286,24 @@ async def custom_object_classes_custom_objects_associations_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.associations.custom_object_classes_custom_objects_associations_list(
- custom_object_class_id="custom_object_class_id",
- object_id="object_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.associations.custom_object_classes_custom_objects_associations_list(
+ custom_object_class_id="custom_object_class_id",
+ object_id="object_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/custom-objects/{jsonable_encoder(object_id)}/associations",
@@ -300,9 +323,15 @@ async def custom_object_classes_custom_objects_associations_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAssociationList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAssociationList,
+ parse_obj_as(
+ type_=PaginatedAssociationList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -351,29 +380,46 @@ async def custom_object_classes_custom_objects_associations_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.associations.custom_object_classes_custom_objects_associations_update(
- association_type_id="association_type_id",
- source_class_id="source_class_id",
- source_object_id="source_object_id",
- target_class_id="target_class_id",
- target_object_id="target_object_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.associations.custom_object_classes_custom_objects_associations_update(
+ association_type_id="association_type_id",
+ source_class_id="source_class_id",
+ source_object_id="source_object_id",
+ target_class_id="target_class_id",
+ target_object_id="target_object_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(source_class_id)}/custom-objects/{jsonable_encoder(source_object_id)}/associations/{jsonable_encoder(target_class_id)}/{jsonable_encoder(target_object_id)}/{jsonable_encoder(association_type_id)}",
method="PUT",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Association, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Association,
+ parse_obj_as(
+ type_=Association, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/async_passthrough/client.py b/src/merge/resources/crm/resources/async_passthrough/client.py
index ed6e9adf..b6913372 100644
--- a/src/merge/resources/crm/resources/async_passthrough/client.py
+++ b/src/merge/resources/crm/resources/async_passthrough/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+from ...types.data_passthrough_request import DataPassthroughRequest
from .....core.request_options import RequestOptions
from ...types.async_passthrough_reciept import AsyncPassthroughReciept
-from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.remote_response import RemoteResponse
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -40,8 +40,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.crm import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.crm import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,17 +49,27 @@ def create(
)
client.crm.async_passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "crm/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,7 +95,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -100,9 +110,15 @@ def retrieve(
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,26 +149,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.crm import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.crm import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.async_passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.crm.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "crm/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -178,24 +212,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.async_passthrough.retrieve(
- async_passthrough_receipt_id="async_passthrough_receipt_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/async-passthrough/{jsonable_encoder(async_passthrough_receipt_id)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/audit_trail/client.py b/src/merge/resources/crm/resources/audit_trail/client.py
index 1aafcc07..6529bb59 100644
--- a/src/merge/resources/crm/resources/audit_trail/client.py
+++ b/src/merge/resources/crm/resources/audit_trail/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AuditTrailClient:
@@ -23,7 +23,7 @@ def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -58,7 +58,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -79,9 +79,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -101,7 +107,7 @@ async def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -136,13 +142,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.audit_trail.list()
+
+
+ async def main() -> None:
+ await client.crm.audit_trail.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/audit-trail",
@@ -157,9 +171,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/available_actions/client.py b/src/merge/resources/crm/resources/available_actions/client.py
index 4d4bb5a5..93bfc73b 100644
--- a/src/merge/resources/crm/resources/available_actions/client.py
+++ b/src/merge/resources/crm/resources/available_actions/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.available_actions import AvailableActions
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AvailableActionsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.crm.available_actions.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/available-actions", method="GET", request_options=request_options
+ "crm/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.available_actions.retrieve()
+
+
+ async def main() -> None:
+ await client.crm.available_actions.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/available-actions", method="GET", request_options=request_options
+ "crm/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/contacts/client.py b/src/merge/resources/crm/resources/contacts/client.py
index 7dc5cd45..149491d4 100644
--- a/src/merge/resources/crm/resources/contacts/client.py
+++ b/src/merge/resources/crm/resources/contacts/client.py
@@ -1,25 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.contacts_list_request_expand import ContactsListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_contact_list import PaginatedContactList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.contact import Contact
from ...types.contact_request import ContactRequest
from ...types.crm_contact_response import CrmContactResponse
+from .types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand
+from ...types.contact import Contact
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.patched_contact_request import PatchedContactRequest
from ...types.ignore_common_model_request import IgnoreCommonModelRequest
from ...types.meta_response import MetaResponse
-from ...types.paginated_contact_list import PaginatedContactList
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from ...types.patched_contact_request import PatchedContactRequest
-from .types.contacts_list_request_expand import ContactsListRequestExpand
-from .types.contacts_retrieve_request_expand import ContactsRetrieveRequestExpand
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -105,7 +105,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -134,9 +134,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedContactList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedContactList,
+ parse_obj_as(
+ type_=PaginatedContactList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -173,7 +179,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import ContactRequest
client = Merge(
@@ -187,14 +193,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/contacts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmContactResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmContactResponse,
+ parse_obj_as(
+ type_=CrmContactResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -235,7 +252,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -255,9 +272,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Contact, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Contact,
+ parse_obj_as(
+ type_=Contact, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -297,7 +320,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import PatchedContactRequest
client = Merge(
@@ -312,14 +335,25 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/contacts/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmContactResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmContactResponse,
+ parse_obj_as(
+ type_=CrmContactResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -350,8 +384,8 @@ def ignore_create(
Examples
--------
- from merge.client import Merge
- from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum
+ from merge import Merge
+ from merge.resources.crm import IgnoreCommonModelRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -360,7 +394,7 @@ def ignore_create(
client.crm.contacts.ignore_create(
model_id="model_id",
request=IgnoreCommonModelRequest(
- reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST,
+ reason="GENERAL_CUSTOMER_REQUEST",
),
)
"""
@@ -371,9 +405,9 @@ def ignore_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -397,7 +431,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -408,11 +442,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"crm/v1/contacts/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/contacts/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -434,7 +476,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -443,11 +485,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.crm.contacts.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/contacts/meta/post", method="GET", request_options=request_options
+ "crm/v1/contacts/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -497,7 +547,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -518,9 +568,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -607,13 +663,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.contacts.list()
+
+
+ async def main() -> None:
+ await client.crm.contacts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/contacts",
@@ -636,9 +700,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedContactList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedContactList,
+ parse_obj_as(
+ type_=PaginatedContactList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -675,28 +745,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import ContactRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.contacts.create(
- model=ContactRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.contacts.create(
+ model=ContactRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/contacts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmContactResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmContactResponse,
+ parse_obj_as(
+ type_=CrmContactResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -737,15 +826,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.contacts.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.contacts.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/contacts/{jsonable_encoder(id)}",
@@ -757,9 +854,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Contact, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Contact,
+ parse_obj_as(
+ type_=Contact, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -799,29 +902,48 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import PatchedContactRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.contacts.partial_update(
- id="id",
- model=PatchedContactRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.contacts.partial_update(
+ id="id",
+ model=PatchedContactRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/contacts/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmContactResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmContactResponse,
+ parse_obj_as(
+ type_=CrmContactResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -852,19 +974,27 @@ async def ignore_create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.crm import IgnoreCommonModelRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.contacts.ignore_create(
- model_id="model_id",
- request=IgnoreCommonModelRequest(
- reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST,
- ),
- )
+
+
+ async def main() -> None:
+ await client.crm.contacts.ignore_create(
+ model_id="model_id",
+ request=IgnoreCommonModelRequest(
+ reason="GENERAL_CUSTOMER_REQUEST",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/contacts/ignore/{jsonable_encoder(model_id)}",
@@ -873,9 +1003,9 @@ async def ignore_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -901,22 +1031,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.contacts.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.contacts.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"crm/v1/contacts/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/contacts/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -938,20 +1084,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.contacts.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.contacts.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/contacts/meta/post", method="GET", request_options=request_options
+ "crm/v1/contacts/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -1001,13 +1163,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.contacts.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.contacts.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/contacts/remote-field-classes",
@@ -1022,9 +1192,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/contacts/types/contacts_list_request_expand.py b/src/merge/resources/crm/resources/contacts/types/contacts_list_request_expand.py
index 628c8157..1ae6d2bd 100644
--- a/src/merge/resources/crm/resources/contacts/types/contacts_list_request_expand.py
+++ b/src/merge/resources/crm/resources/contacts/types/contacts_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ContactsListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_OWNER = "account,owner"
- OWNER = "owner"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_owner: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ContactsListRequestExpand.ACCOUNT:
- return account()
- if self is ContactsListRequestExpand.ACCOUNT_OWNER:
- return account_owner()
- if self is ContactsListRequestExpand.OWNER:
- return owner()
+ContactsListRequestExpand = typing.Union[typing.Literal["account", "account,owner", "owner"], typing.Any]
diff --git a/src/merge/resources/crm/resources/contacts/types/contacts_retrieve_request_expand.py b/src/merge/resources/crm/resources/contacts/types/contacts_retrieve_request_expand.py
index f9251068..f3fcee06 100644
--- a/src/merge/resources/crm/resources/contacts/types/contacts_retrieve_request_expand.py
+++ b/src/merge/resources/crm/resources/contacts/types/contacts_retrieve_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ContactsRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_OWNER = "account,owner"
- OWNER = "owner"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_owner: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ContactsRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is ContactsRetrieveRequestExpand.ACCOUNT_OWNER:
- return account_owner()
- if self is ContactsRetrieveRequestExpand.OWNER:
- return owner()
+ContactsRetrieveRequestExpand = typing.Union[typing.Literal["account", "account,owner", "owner"], typing.Any]
diff --git a/src/merge/resources/crm/resources/custom_object_classes/client.py b/src/merge/resources/crm/resources/custom_object_classes/client.py
index f85c8ef0..79d17e56 100644
--- a/src/merge/resources/crm/resources/custom_object_classes/client.py
+++ b/src/merge/resources/crm/resources/custom_object_classes/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_custom_object_class_list import PaginatedCustomObjectClassList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.custom_object_class import CustomObjectClass
-from ...types.paginated_custom_object_class_list import PaginatedCustomObjectClassList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class CustomObjectClassesClient:
@@ -78,7 +78,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -103,9 +103,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCustomObjectClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCustomObjectClassList,
+ parse_obj_as(
+ type_=PaginatedCustomObjectClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -142,7 +148,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -155,12 +161,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CustomObjectClass, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CustomObjectClass,
+ parse_obj_as(
+ type_=CustomObjectClass, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -231,13 +246,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.custom_object_classes.list()
+
+
+ async def main() -> None:
+ await client.crm.custom_object_classes.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/custom-object-classes",
@@ -256,9 +279,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCustomObjectClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCustomObjectClassList,
+ parse_obj_as(
+ type_=PaginatedCustomObjectClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -295,25 +324,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.custom_object_classes.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.custom_object_classes.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CustomObjectClass, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CustomObjectClass,
+ parse_obj_as(
+ type_=CustomObjectClass, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/custom_objects/client.py b/src/merge/resources/crm/resources/custom_objects/client.py
index 747176d5..7e9fb64f 100644
--- a/src/merge/resources/crm/resources/custom_objects/client.py
+++ b/src/merge/resources/crm/resources/custom_objects/client.py
@@ -1,21 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_custom_object_list import PaginatedCustomObjectList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from ...types.custom_object_request import CustomObjectRequest
from ...types.crm_custom_object_response import CrmCustomObjectResponse
from ...types.custom_object import CustomObject
-from ...types.custom_object_request import CustomObjectRequest
from ...types.meta_response import MetaResponse
-from ...types.paginated_custom_object_list import PaginatedCustomObjectList
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -88,7 +88,7 @@ def custom_object_classes_custom_objects_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -115,9 +115,15 @@ def custom_object_classes_custom_objects_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCustomObjectList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCustomObjectList,
+ parse_obj_as(
+ type_=PaginatedCustomObjectList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -157,7 +163,7 @@ def custom_object_classes_custom_objects_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import CustomObjectRequest
client = Merge(
@@ -174,14 +180,25 @@ def custom_object_classes_custom_objects_create(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/custom-objects",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmCustomObjectResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmCustomObjectResponse,
+ parse_obj_as(
+ type_=CrmCustomObjectResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -221,7 +238,7 @@ def custom_object_classes_custom_objects_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -235,12 +252,21 @@ def custom_object_classes_custom_objects_retrieve(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/custom-objects/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_remote_fields": include_remote_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CustomObject, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CustomObject,
+ parse_obj_as(
+ type_=CustomObject, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -266,7 +292,7 @@ def custom_object_classes_custom_objects_meta_post_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -281,9 +307,15 @@ def custom_object_classes_custom_objects_meta_post_retrieve(
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -333,7 +365,7 @@ def custom_object_classes_custom_objects_remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -354,9 +386,15 @@ def custom_object_classes_custom_objects_remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -430,15 +468,23 @@ async def custom_object_classes_custom_objects_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.custom_objects.custom_object_classes_custom_objects_list(
- custom_object_class_id="custom_object_class_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.custom_objects.custom_object_classes_custom_objects_list(
+ custom_object_class_id="custom_object_class_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/custom-objects",
@@ -457,9 +503,15 @@ async def custom_object_classes_custom_objects_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCustomObjectList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCustomObjectList,
+ parse_obj_as(
+ type_=PaginatedCustomObjectList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -499,31 +551,50 @@ async def custom_object_classes_custom_objects_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import CustomObjectRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.custom_objects.custom_object_classes_custom_objects_create(
- custom_object_class_id="custom_object_class_id",
- model=CustomObjectRequest(
- fields={"test_field": "hello"},
- ),
- )
+
+
+ async def main() -> None:
+ await client.crm.custom_objects.custom_object_classes_custom_objects_create(
+ custom_object_class_id="custom_object_class_id",
+ model=CustomObjectRequest(
+ fields={"test_field": "hello"},
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/custom-objects",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CrmCustomObjectResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CrmCustomObjectResponse,
+ parse_obj_as(
+ type_=CrmCustomObjectResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -563,26 +634,43 @@ async def custom_object_classes_custom_objects_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
- custom_object_class_id="custom_object_class_id",
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.custom_objects.custom_object_classes_custom_objects_retrieve(
+ custom_object_class_id="custom_object_class_id",
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/custom-objects/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_remote_fields": include_remote_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CustomObject, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CustomObject,
+ parse_obj_as(
+ type_=CustomObject, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -608,24 +696,38 @@ async def custom_object_classes_custom_objects_meta_post_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve(
- custom_object_class_id="custom_object_class_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve(
+ custom_object_class_id="custom_object_class_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/custom-object-classes/{jsonable_encoder(custom_object_class_id)}/custom-objects/meta/post",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -675,13 +777,21 @@ async def custom_object_classes_custom_objects_remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.custom_objects.custom_object_classes_custom_objects_remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/custom-object-classes/custom-objects/remote-field-classes",
@@ -696,9 +806,15 @@ async def custom_object_classes_custom_objects_remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/delete_account/client.py b/src/merge/resources/crm/resources/delete_account/client.py
index 8a6b2b96..5ab8c917 100644
--- a/src/merge/resources/crm/resources/delete_account/client.py
+++ b/src/merge/resources/crm/resources/delete_account/client.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
+from .....core.request_options import RequestOptions
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import AsyncClientWrapper
class DeleteAccountClient:
@@ -27,7 +27,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -36,11 +36,13 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
client.crm.delete_account.delete()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/delete-account", method="POST", request_options=request_options
+ "crm/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -66,20 +68,30 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.delete_account.delete()
+
+
+ async def main() -> None:
+ await client.crm.delete_account.delete()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/delete-account", method="POST", request_options=request_options
+ "crm/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/engagement_types/client.py b/src/merge/resources/crm/resources/engagement_types/client.py
index cff654cd..68a90558 100644
--- a/src/merge/resources/crm/resources/engagement_types/client.py
+++ b/src/merge/resources/crm/resources/engagement_types/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_engagement_type_list import PaginatedEngagementTypeList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.engagement_type import EngagementType
-from ...types.paginated_engagement_type_list import PaginatedEngagementTypeList
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from .....core.client_wrapper import AsyncClientWrapper
class EngagementTypesClient:
@@ -79,7 +79,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -104,9 +104,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEngagementTypeList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEngagementTypeList,
+ parse_obj_as(
+ type_=PaginatedEngagementTypeList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -143,7 +149,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -156,12 +162,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/engagement-types/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_remote_fields": include_remote_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EngagementType, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EngagementType,
+ parse_obj_as(
+ type_=EngagementType, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -211,7 +226,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -232,9 +247,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,13 +326,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagement_types.list()
+
+
+ async def main() -> None:
+ await client.crm.engagement_types.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/engagement-types",
@@ -330,9 +359,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEngagementTypeList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEngagementTypeList,
+ parse_obj_as(
+ type_=PaginatedEngagementTypeList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -369,25 +404,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagement_types.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.engagement_types.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/engagement-types/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_remote_fields": include_remote_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EngagementType, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EngagementType,
+ parse_obj_as(
+ type_=EngagementType, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -437,13 +489,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagement_types.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.engagement_types.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/engagement-types/remote-field-classes",
@@ -458,9 +518,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/engagements/client.py b/src/merge/resources/crm/resources/engagements/client.py
index 815038ca..c9c57756 100644
--- a/src/merge/resources/crm/resources/engagements/client.py
+++ b/src/merge/resources/crm/resources/engagements/client.py
@@ -1,24 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.engagements_list_request_expand import EngagementsListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_engagement_list import PaginatedEngagementList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.engagement import Engagement
from ...types.engagement_request import EngagementRequest
from ...types.engagement_response import EngagementResponse
+from .types.engagements_retrieve_request_expand import EngagementsRetrieveRequestExpand
+from ...types.engagement import Engagement
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.patched_engagement_request import PatchedEngagementRequest
from ...types.meta_response import MetaResponse
-from ...types.paginated_engagement_list import PaginatedEngagementList
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from ...types.patched_engagement_request import PatchedEngagementRequest
-from .types.engagements_list_request_expand import EngagementsListRequestExpand
-from .types.engagements_retrieve_request_expand import EngagementsRetrieveRequestExpand
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -100,7 +100,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -128,9 +128,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEngagementList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEngagementList,
+ parse_obj_as(
+ type_=PaginatedEngagementList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -167,7 +173,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import EngagementRequest
client = Merge(
@@ -181,14 +187,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/engagements",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EngagementResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EngagementResponse,
+ parse_obj_as(
+ type_=EngagementResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -229,7 +246,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -249,9 +266,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Engagement, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Engagement,
+ parse_obj_as(
+ type_=Engagement, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -291,7 +314,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import PatchedEngagementRequest
client = Merge(
@@ -306,14 +329,25 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/engagements/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EngagementResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EngagementResponse,
+ parse_obj_as(
+ type_=EngagementResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -337,7 +371,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -348,11 +382,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"crm/v1/engagements/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/engagements/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -374,7 +416,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -383,11 +425,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.crm.engagements.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/engagements/meta/post", method="GET", request_options=request_options
+ "crm/v1/engagements/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -437,7 +487,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -458,9 +508,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -543,13 +599,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagements.list()
+
+
+ async def main() -> None:
+ await client.crm.engagements.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/engagements",
@@ -571,9 +635,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEngagementList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEngagementList,
+ parse_obj_as(
+ type_=PaginatedEngagementList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -610,28 +680,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import EngagementRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagements.create(
- model=EngagementRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.engagements.create(
+ model=EngagementRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/engagements",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EngagementResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EngagementResponse,
+ parse_obj_as(
+ type_=EngagementResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -672,15 +761,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagements.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.engagements.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/engagements/{jsonable_encoder(id)}",
@@ -692,9 +789,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Engagement, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Engagement,
+ parse_obj_as(
+ type_=Engagement, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -734,29 +837,48 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import PatchedEngagementRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagements.partial_update(
- id="id",
- model=PatchedEngagementRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.engagements.partial_update(
+ id="id",
+ model=PatchedEngagementRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/engagements/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EngagementResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EngagementResponse,
+ parse_obj_as(
+ type_=EngagementResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -782,22 +904,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagements.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.engagements.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"crm/v1/engagements/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/engagements/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -819,20 +957,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagements.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.engagements.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/engagements/meta/post", method="GET", request_options=request_options
+ "crm/v1/engagements/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -882,13 +1036,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.engagements.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.engagements.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/engagements/remote-field-classes",
@@ -903,9 +1065,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/engagements/types/engagements_list_request_expand.py b/src/merge/resources/crm/resources/engagements/types/engagements_list_request_expand.py
index 33ee98e3..86a6d8bd 100644
--- a/src/merge/resources/crm/resources/engagements/types/engagements_list_request_expand.py
+++ b/src/merge/resources/crm/resources/engagements/types/engagements_list_request_expand.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EngagementsListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_ENGAGEMENT_TYPE = "account,engagement_type"
- CONTACTS = "contacts"
- CONTACTS_ACCOUNT = "contacts,account"
- CONTACTS_ACCOUNT_ENGAGEMENT_TYPE = "contacts,account,engagement_type"
- CONTACTS_ENGAGEMENT_TYPE = "contacts,engagement_type"
- CONTACTS_OWNER = "contacts,owner"
- CONTACTS_OWNER_ACCOUNT = "contacts,owner,account"
- CONTACTS_OWNER_ACCOUNT_ENGAGEMENT_TYPE = "contacts,owner,account,engagement_type"
- CONTACTS_OWNER_ENGAGEMENT_TYPE = "contacts,owner,engagement_type"
- ENGAGEMENT_TYPE = "engagement_type"
- OWNER = "owner"
- OWNER_ACCOUNT = "owner,account"
- OWNER_ACCOUNT_ENGAGEMENT_TYPE = "owner,account,engagement_type"
- OWNER_ENGAGEMENT_TYPE = "owner,engagement_type"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_engagement_type: typing.Callable[[], T_Result],
- contacts: typing.Callable[[], T_Result],
- contacts_account: typing.Callable[[], T_Result],
- contacts_account_engagement_type: typing.Callable[[], T_Result],
- contacts_engagement_type: typing.Callable[[], T_Result],
- contacts_owner: typing.Callable[[], T_Result],
- contacts_owner_account: typing.Callable[[], T_Result],
- contacts_owner_account_engagement_type: typing.Callable[[], T_Result],
- contacts_owner_engagement_type: typing.Callable[[], T_Result],
- engagement_type: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_account: typing.Callable[[], T_Result],
- owner_account_engagement_type: typing.Callable[[], T_Result],
- owner_engagement_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EngagementsListRequestExpand.ACCOUNT:
- return account()
- if self is EngagementsListRequestExpand.ACCOUNT_ENGAGEMENT_TYPE:
- return account_engagement_type()
- if self is EngagementsListRequestExpand.CONTACTS:
- return contacts()
- if self is EngagementsListRequestExpand.CONTACTS_ACCOUNT:
- return contacts_account()
- if self is EngagementsListRequestExpand.CONTACTS_ACCOUNT_ENGAGEMENT_TYPE:
- return contacts_account_engagement_type()
- if self is EngagementsListRequestExpand.CONTACTS_ENGAGEMENT_TYPE:
- return contacts_engagement_type()
- if self is EngagementsListRequestExpand.CONTACTS_OWNER:
- return contacts_owner()
- if self is EngagementsListRequestExpand.CONTACTS_OWNER_ACCOUNT:
- return contacts_owner_account()
- if self is EngagementsListRequestExpand.CONTACTS_OWNER_ACCOUNT_ENGAGEMENT_TYPE:
- return contacts_owner_account_engagement_type()
- if self is EngagementsListRequestExpand.CONTACTS_OWNER_ENGAGEMENT_TYPE:
- return contacts_owner_engagement_type()
- if self is EngagementsListRequestExpand.ENGAGEMENT_TYPE:
- return engagement_type()
- if self is EngagementsListRequestExpand.OWNER:
- return owner()
- if self is EngagementsListRequestExpand.OWNER_ACCOUNT:
- return owner_account()
- if self is EngagementsListRequestExpand.OWNER_ACCOUNT_ENGAGEMENT_TYPE:
- return owner_account_engagement_type()
- if self is EngagementsListRequestExpand.OWNER_ENGAGEMENT_TYPE:
- return owner_engagement_type()
+EngagementsListRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,engagement_type",
+ "contacts",
+ "contacts,account",
+ "contacts,account,engagement_type",
+ "contacts,engagement_type",
+ "contacts,owner",
+ "contacts,owner,account",
+ "contacts,owner,account,engagement_type",
+ "contacts,owner,engagement_type",
+ "engagement_type",
+ "owner",
+ "owner,account",
+ "owner,account,engagement_type",
+ "owner,engagement_type",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/engagements/types/engagements_retrieve_request_expand.py b/src/merge/resources/crm/resources/engagements/types/engagements_retrieve_request_expand.py
index 53b94d8c..5ccd7bc7 100644
--- a/src/merge/resources/crm/resources/engagements/types/engagements_retrieve_request_expand.py
+++ b/src/merge/resources/crm/resources/engagements/types/engagements_retrieve_request_expand.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EngagementsRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_ENGAGEMENT_TYPE = "account,engagement_type"
- CONTACTS = "contacts"
- CONTACTS_ACCOUNT = "contacts,account"
- CONTACTS_ACCOUNT_ENGAGEMENT_TYPE = "contacts,account,engagement_type"
- CONTACTS_ENGAGEMENT_TYPE = "contacts,engagement_type"
- CONTACTS_OWNER = "contacts,owner"
- CONTACTS_OWNER_ACCOUNT = "contacts,owner,account"
- CONTACTS_OWNER_ACCOUNT_ENGAGEMENT_TYPE = "contacts,owner,account,engagement_type"
- CONTACTS_OWNER_ENGAGEMENT_TYPE = "contacts,owner,engagement_type"
- ENGAGEMENT_TYPE = "engagement_type"
- OWNER = "owner"
- OWNER_ACCOUNT = "owner,account"
- OWNER_ACCOUNT_ENGAGEMENT_TYPE = "owner,account,engagement_type"
- OWNER_ENGAGEMENT_TYPE = "owner,engagement_type"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_engagement_type: typing.Callable[[], T_Result],
- contacts: typing.Callable[[], T_Result],
- contacts_account: typing.Callable[[], T_Result],
- contacts_account_engagement_type: typing.Callable[[], T_Result],
- contacts_engagement_type: typing.Callable[[], T_Result],
- contacts_owner: typing.Callable[[], T_Result],
- contacts_owner_account: typing.Callable[[], T_Result],
- contacts_owner_account_engagement_type: typing.Callable[[], T_Result],
- contacts_owner_engagement_type: typing.Callable[[], T_Result],
- engagement_type: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_account: typing.Callable[[], T_Result],
- owner_account_engagement_type: typing.Callable[[], T_Result],
- owner_engagement_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EngagementsRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is EngagementsRetrieveRequestExpand.ACCOUNT_ENGAGEMENT_TYPE:
- return account_engagement_type()
- if self is EngagementsRetrieveRequestExpand.CONTACTS:
- return contacts()
- if self is EngagementsRetrieveRequestExpand.CONTACTS_ACCOUNT:
- return contacts_account()
- if self is EngagementsRetrieveRequestExpand.CONTACTS_ACCOUNT_ENGAGEMENT_TYPE:
- return contacts_account_engagement_type()
- if self is EngagementsRetrieveRequestExpand.CONTACTS_ENGAGEMENT_TYPE:
- return contacts_engagement_type()
- if self is EngagementsRetrieveRequestExpand.CONTACTS_OWNER:
- return contacts_owner()
- if self is EngagementsRetrieveRequestExpand.CONTACTS_OWNER_ACCOUNT:
- return contacts_owner_account()
- if self is EngagementsRetrieveRequestExpand.CONTACTS_OWNER_ACCOUNT_ENGAGEMENT_TYPE:
- return contacts_owner_account_engagement_type()
- if self is EngagementsRetrieveRequestExpand.CONTACTS_OWNER_ENGAGEMENT_TYPE:
- return contacts_owner_engagement_type()
- if self is EngagementsRetrieveRequestExpand.ENGAGEMENT_TYPE:
- return engagement_type()
- if self is EngagementsRetrieveRequestExpand.OWNER:
- return owner()
- if self is EngagementsRetrieveRequestExpand.OWNER_ACCOUNT:
- return owner_account()
- if self is EngagementsRetrieveRequestExpand.OWNER_ACCOUNT_ENGAGEMENT_TYPE:
- return owner_account_engagement_type()
- if self is EngagementsRetrieveRequestExpand.OWNER_ENGAGEMENT_TYPE:
- return owner_engagement_type()
+EngagementsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,engagement_type",
+ "contacts",
+ "contacts,account",
+ "contacts,account,engagement_type",
+ "contacts,engagement_type",
+ "contacts,owner",
+ "contacts,owner,account",
+ "contacts,owner,account,engagement_type",
+ "contacts,owner,engagement_type",
+ "engagement_type",
+ "owner",
+ "owner,account",
+ "owner,account,engagement_type",
+ "owner,engagement_type",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/field_mapping/client.py b/src/merge/resources/crm/resources/field_mapping/client.py
index fe1ded8c..4704bd30 100644
--- a/src/merge/resources/crm/resources/field_mapping/client.py
+++ b/src/merge/resources/crm/resources/field_mapping/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
-from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
from ...types.field_mapping_api_instance_response import FieldMappingApiInstanceResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.field_mapping_instance_response import FieldMappingInstanceResponse
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.remote_field_api_response import RemoteFieldApiResponse
+from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -39,7 +39,7 @@ def field_mappings_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,11 +48,19 @@ def field_mappings_retrieve(
client.crm.field_mapping.field_mappings_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/field-mappings", method="GET", request_options=request_options
+ "crm/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -63,7 +71,7 @@ def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -80,7 +88,7 @@ def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -102,7 +110,7 @@ def field_mappings_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -131,9 +139,15 @@ def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -159,7 +173,7 @@ def field_mappings_destroy(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -174,9 +188,15 @@ def field_mappings_destroy(
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,7 +206,7 @@ def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -198,7 +218,7 @@ def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -217,7 +237,7 @@ def field_mappings_partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -238,9 +258,15 @@ def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -274,7 +300,7 @@ def remote_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -285,12 +311,21 @@ def remote_fields_retrieve(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -314,7 +349,7 @@ def target_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -323,11 +358,19 @@ def target_fields_retrieve(
client.crm.field_mapping.target_fields_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/target-fields", method="GET", request_options=request_options
+ "crm/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -356,20 +399,36 @@ async def field_mappings_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.field_mapping.field_mappings_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.field_mapping.field_mappings_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/field-mappings", method="GET", request_options=request_options
+ "crm/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -380,7 +439,7 @@ async def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -397,7 +456,7 @@ async def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -419,20 +478,28 @@ async def field_mappings_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.field_mapping.field_mappings_create(
- target_field_name="example_target_field_name",
- target_field_description="this is a example description of the target field",
- remote_field_traversal_path=["example_remote_field"],
- remote_method="GET",
- remote_url_path="/example-url-path",
- common_model_name="ExampleCommonModel",
- )
+
+
+ async def main() -> None:
+ await client.crm.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/field-mappings",
@@ -448,9 +515,15 @@ async def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -476,24 +549,38 @@ async def field_mappings_destroy(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.field_mapping.field_mappings_destroy(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -503,7 +590,7 @@ async def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -515,7 +602,7 @@ async def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -534,15 +621,23 @@ async def field_mappings_partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.field_mapping.field_mappings_partial_update(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.crm.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
@@ -555,9 +650,15 @@ async def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -591,23 +692,40 @@ async def remote_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.field_mapping.remote_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.field_mapping.remote_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -631,20 +749,36 @@ async def target_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.field_mapping.target_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.field_mapping.target_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/target-fields", method="GET", request_options=request_options
+ "crm/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/force_resync/client.py b/src/merge/resources/crm/resources/force_resync/client.py
index 5b966529..fc3a5a43 100644
--- a/src/merge/resources/crm/resources/force_resync/client.py
+++ b/src/merge/resources/crm/resources/force_resync/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.sync_status import SyncStatus
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class ForceResyncClient:
@@ -32,7 +32,7 @@ def sync_status_resync_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -41,11 +41,19 @@ def sync_status_resync_create(
client.crm.force_resync.sync_status_resync_create()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/sync-status/resync", method="POST", request_options=request_options
+ "crm/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,20 +82,36 @@ async def sync_status_resync_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.force_resync.sync_status_resync_create()
+
+
+ async def main() -> None:
+ await client.crm.force_resync.sync_status_resync_create()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/sync-status/resync", method="POST", request_options=request_options
+ "crm/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/generate_key/client.py b/src/merge/resources/crm/resources/generate_key/client.py
index 48c5a4c3..7b5be77b 100644
--- a/src/merge/resources/crm/resources/generate_key/client.py
+++ b/src/merge/resources/crm/resources/generate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,11 +47,23 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "crm/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,22 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.generate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.crm.generate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "crm/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/issues/client.py b/src/merge/resources/crm/resources/issues/client.py
index c4abacb9..538e187b 100644
--- a/src/merge/resources/crm/resources/issues/client.py
+++ b/src/merge/resources/crm/resources/issues/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_issue_list import PaginatedIssueList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.issue import Issue
-from ...types.paginated_issue_list import PaginatedIssueList
-from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class IssuesClient:
@@ -95,7 +95,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -132,9 +132,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -158,7 +164,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -169,11 +175,19 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"crm/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -260,13 +274,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.issues.list()
+
+
+ async def main() -> None:
+ await client.crm.issues.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/issues",
@@ -297,9 +319,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -323,22 +351,38 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.issues.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.issues.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"crm/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/issues/types/issues_list_request_status.py b/src/merge/resources/crm/resources/issues/types/issues_list_request_status.py
index 2bd3521e..3886423c 100644
--- a/src/merge/resources/crm/resources/issues/types/issues_list_request_status.py
+++ b/src/merge/resources/crm/resources/issues/types/issues_list_request_status.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssuesListRequestStatus(str, enum.Enum):
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssuesListRequestStatus.ONGOING:
- return ongoing()
- if self is IssuesListRequestStatus.RESOLVED:
- return resolved()
+IssuesListRequestStatus = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/crm/resources/leads/client.py b/src/merge/resources/crm/resources/leads/client.py
index 17d91ad8..fa384fef 100644
--- a/src/merge/resources/crm/resources/leads/client.py
+++ b/src/merge/resources/crm/resources/leads/client.py
@@ -1,23 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.leads_list_request_expand import LeadsListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_lead_list import PaginatedLeadList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.lead import Lead
from ...types.lead_request import LeadRequest
from ...types.lead_response import LeadResponse
+from .types.leads_retrieve_request_expand import LeadsRetrieveRequestExpand
+from ...types.lead import Lead
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.meta_response import MetaResponse
-from ...types.paginated_lead_list import PaginatedLeadList
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from .types.leads_list_request_expand import LeadsListRequestExpand
-from .types.leads_retrieve_request_expand import LeadsRetrieveRequestExpand
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -111,7 +111,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -142,9 +142,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedLeadList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedLeadList,
+ parse_obj_as(
+ type_=PaginatedLeadList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -181,7 +187,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import LeadRequest
client = Merge(
@@ -195,14 +201,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/leads",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LeadResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LeadResponse,
+ parse_obj_as(
+ type_=LeadResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -243,7 +260,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -263,9 +280,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Lead, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Lead,
+ parse_obj_as(
+ type_=Lead, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -287,7 +310,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -296,11 +319,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.crm.leads.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/leads/meta/post", method="GET", request_options=request_options
+ "crm/v1/leads/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -350,7 +381,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -371,9 +402,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -468,13 +505,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.leads.list()
+
+
+ async def main() -> None:
+ await client.crm.leads.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/leads",
@@ -499,9 +544,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedLeadList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedLeadList,
+ parse_obj_as(
+ type_=PaginatedLeadList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -538,28 +589,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import LeadRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.leads.create(
- model=LeadRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.leads.create(
+ model=LeadRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/leads",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LeadResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LeadResponse,
+ parse_obj_as(
+ type_=LeadResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -600,15 +670,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.leads.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.leads.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/leads/{jsonable_encoder(id)}",
@@ -620,9 +698,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Lead, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Lead,
+ parse_obj_as(
+ type_=Lead, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -644,20 +728,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.leads.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.leads.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/leads/meta/post", method="GET", request_options=request_options
+ "crm/v1/leads/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -707,13 +807,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.leads.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.leads.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/leads/remote-field-classes",
@@ -728,9 +836,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/leads/types/leads_list_request_expand.py b/src/merge/resources/crm/resources/leads/types/leads_list_request_expand.py
index b563b107..dba3d661 100644
--- a/src/merge/resources/crm/resources/leads/types/leads_list_request_expand.py
+++ b/src/merge/resources/crm/resources/leads/types/leads_list_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LeadsListRequestExpand(str, enum.Enum):
- CONVERTED_ACCOUNT = "converted_account"
- CONVERTED_CONTACT = "converted_contact"
- CONVERTED_CONTACT_CONVERTED_ACCOUNT = "converted_contact,converted_account"
- OWNER = "owner"
- OWNER_CONVERTED_ACCOUNT = "owner,converted_account"
- OWNER_CONVERTED_CONTACT = "owner,converted_contact"
- OWNER_CONVERTED_CONTACT_CONVERTED_ACCOUNT = "owner,converted_contact,converted_account"
-
- def visit(
- self,
- converted_account: typing.Callable[[], T_Result],
- converted_contact: typing.Callable[[], T_Result],
- converted_contact_converted_account: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_converted_account: typing.Callable[[], T_Result],
- owner_converted_contact: typing.Callable[[], T_Result],
- owner_converted_contact_converted_account: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is LeadsListRequestExpand.CONVERTED_ACCOUNT:
- return converted_account()
- if self is LeadsListRequestExpand.CONVERTED_CONTACT:
- return converted_contact()
- if self is LeadsListRequestExpand.CONVERTED_CONTACT_CONVERTED_ACCOUNT:
- return converted_contact_converted_account()
- if self is LeadsListRequestExpand.OWNER:
- return owner()
- if self is LeadsListRequestExpand.OWNER_CONVERTED_ACCOUNT:
- return owner_converted_account()
- if self is LeadsListRequestExpand.OWNER_CONVERTED_CONTACT:
- return owner_converted_contact()
- if self is LeadsListRequestExpand.OWNER_CONVERTED_CONTACT_CONVERTED_ACCOUNT:
- return owner_converted_contact_converted_account()
+LeadsListRequestExpand = typing.Union[
+ typing.Literal[
+ "converted_account",
+ "converted_contact",
+ "converted_contact,converted_account",
+ "owner",
+ "owner,converted_account",
+ "owner,converted_contact",
+ "owner,converted_contact,converted_account",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/leads/types/leads_retrieve_request_expand.py b/src/merge/resources/crm/resources/leads/types/leads_retrieve_request_expand.py
index 08f9bd3f..d493312a 100644
--- a/src/merge/resources/crm/resources/leads/types/leads_retrieve_request_expand.py
+++ b/src/merge/resources/crm/resources/leads/types/leads_retrieve_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LeadsRetrieveRequestExpand(str, enum.Enum):
- CONVERTED_ACCOUNT = "converted_account"
- CONVERTED_CONTACT = "converted_contact"
- CONVERTED_CONTACT_CONVERTED_ACCOUNT = "converted_contact,converted_account"
- OWNER = "owner"
- OWNER_CONVERTED_ACCOUNT = "owner,converted_account"
- OWNER_CONVERTED_CONTACT = "owner,converted_contact"
- OWNER_CONVERTED_CONTACT_CONVERTED_ACCOUNT = "owner,converted_contact,converted_account"
-
- def visit(
- self,
- converted_account: typing.Callable[[], T_Result],
- converted_contact: typing.Callable[[], T_Result],
- converted_contact_converted_account: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_converted_account: typing.Callable[[], T_Result],
- owner_converted_contact: typing.Callable[[], T_Result],
- owner_converted_contact_converted_account: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is LeadsRetrieveRequestExpand.CONVERTED_ACCOUNT:
- return converted_account()
- if self is LeadsRetrieveRequestExpand.CONVERTED_CONTACT:
- return converted_contact()
- if self is LeadsRetrieveRequestExpand.CONVERTED_CONTACT_CONVERTED_ACCOUNT:
- return converted_contact_converted_account()
- if self is LeadsRetrieveRequestExpand.OWNER:
- return owner()
- if self is LeadsRetrieveRequestExpand.OWNER_CONVERTED_ACCOUNT:
- return owner_converted_account()
- if self is LeadsRetrieveRequestExpand.OWNER_CONVERTED_CONTACT:
- return owner_converted_contact()
- if self is LeadsRetrieveRequestExpand.OWNER_CONVERTED_CONTACT_CONVERTED_ACCOUNT:
- return owner_converted_contact_converted_account()
+LeadsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "converted_account",
+ "converted_contact",
+ "converted_contact,converted_account",
+ "owner",
+ "owner,converted_account",
+ "owner,converted_contact",
+ "owner,converted_contact,converted_account",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/link_token/client.py b/src/merge/resources/crm/resources/link_token/client.py
index c6e90db2..2981578a 100644
--- a/src/merge/resources/crm/resources/link_token/client.py
+++ b/src/merge/resources/crm/resources/link_token/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.categories_enum import CategoriesEnum
from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.request_options import RequestOptions
from ...types.link_token import LinkToken
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,8 +36,8 @@ def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -77,7 +77,7 @@ def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -90,8 +90,7 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.crm import CategoriesEnum
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,7 +100,7 @@ def create(
end_user_email_address="example@gmail.com",
end_user_organization_name="Test Organization",
end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
+ categories=["hris", "ats"],
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -124,9 +123,15 @@ def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,8 +158,8 @@ async def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -194,7 +199,7 @@ async def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -207,19 +212,26 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.crm import CategoriesEnum
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.link_token.create(
- end_user_email_address="example@gmail.com",
- end_user_organization_name="Test Organization",
- end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
- )
+
+
+ async def main() -> None:
+ await client.crm.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/link-token",
@@ -241,9 +253,15 @@ async def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/linked_accounts/client.py b/src/merge/resources/crm/resources/linked_accounts/client.py
index 3291acb6..72724c4d 100644
--- a/src/merge/resources/crm/resources/linked_accounts/client.py
+++ b/src/merge/resources/crm/resources/linked_accounts/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
from .....core.request_options import RequestOptions
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
-from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class LinkedAccountsClient:
@@ -31,7 +31,7 @@ def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -122,9 +122,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -151,7 +157,7 @@ async def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -214,13 +220,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.linked_accounts.list()
+
+
+ async def main() -> None:
+ await client.crm.linked_accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/linked-accounts",
@@ -242,9 +256,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/linked_accounts/types/linked_accounts_list_request_category.py b/src/merge/resources/crm/resources/linked_accounts/types/linked_accounts_list_request_category.py
index bd873ea8..531279d5 100644
--- a/src/merge/resources/crm/resources/linked_accounts/types/linked_accounts_list_request_category.py
+++ b/src/merge/resources/crm/resources/linked_accounts/types/linked_accounts_list_request_category.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LinkedAccountsListRequestCategory(str, enum.Enum):
- ACCOUNTING = "accounting"
- ATS = "ats"
- CRM = "crm"
- FILESTORAGE = "filestorage"
- HRIS = "hris"
- MKTG = "mktg"
- TICKETING = "ticketing"
-
- def visit(
- self,
- accounting: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- hris: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is LinkedAccountsListRequestCategory.ACCOUNTING:
- return accounting()
- if self is LinkedAccountsListRequestCategory.ATS:
- return ats()
- if self is LinkedAccountsListRequestCategory.CRM:
- return crm()
- if self is LinkedAccountsListRequestCategory.FILESTORAGE:
- return filestorage()
- if self is LinkedAccountsListRequestCategory.HRIS:
- return hris()
- if self is LinkedAccountsListRequestCategory.MKTG:
- return mktg()
- if self is LinkedAccountsListRequestCategory.TICKETING:
- return ticketing()
+LinkedAccountsListRequestCategory = typing.Union[
+ typing.Literal["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"], typing.Any
+]
diff --git a/src/merge/resources/crm/resources/notes/client.py b/src/merge/resources/crm/resources/notes/client.py
index 2c7fbfb1..ef9d6525 100644
--- a/src/merge/resources/crm/resources/notes/client.py
+++ b/src/merge/resources/crm/resources/notes/client.py
@@ -1,23 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.notes_list_request_expand import NotesListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_note_list import PaginatedNoteList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
-from ...types.note import Note
from ...types.note_request import NoteRequest
from ...types.note_response import NoteResponse
-from ...types.paginated_note_list import PaginatedNoteList
-from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from .types.notes_list_request_expand import NotesListRequestExpand
from .types.notes_retrieve_request_expand import NotesRetrieveRequestExpand
+from ...types.note import Note
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -107,7 +107,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -137,9 +137,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedNoteList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedNoteList,
+ parse_obj_as(
+ type_=PaginatedNoteList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -176,7 +182,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import NoteRequest
client = Merge(
@@ -190,14 +196,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/notes",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(NoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ NoteResponse,
+ parse_obj_as(
+ type_=NoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -238,7 +255,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -258,9 +275,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Note, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Note,
+ parse_obj_as(
+ type_=Note, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -282,7 +305,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -291,11 +314,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.crm.notes.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/notes/meta/post", method="GET", request_options=request_options
+ "crm/v1/notes/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -345,7 +376,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -366,9 +397,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -459,13 +496,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.notes.list()
+
+
+ async def main() -> None:
+ await client.crm.notes.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/notes",
@@ -489,9 +534,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedNoteList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedNoteList,
+ parse_obj_as(
+ type_=PaginatedNoteList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -528,28 +579,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import NoteRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.notes.create(
- model=NoteRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.notes.create(
+ model=NoteRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/notes",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(NoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ NoteResponse,
+ parse_obj_as(
+ type_=NoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -590,15 +660,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.notes.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.notes.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/notes/{jsonable_encoder(id)}",
@@ -610,9 +688,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Note, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Note,
+ parse_obj_as(
+ type_=Note, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -634,20 +718,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.notes.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.notes.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/notes/meta/post", method="GET", request_options=request_options
+ "crm/v1/notes/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -697,13 +797,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.notes.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.notes.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/notes/remote-field-classes",
@@ -718,9 +826,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/notes/types/notes_list_request_expand.py b/src/merge/resources/crm/resources/notes/types/notes_list_request_expand.py
index 6ba7625f..7466b1f8 100644
--- a/src/merge/resources/crm/resources/notes/types/notes_list_request_expand.py
+++ b/src/merge/resources/crm/resources/notes/types/notes_list_request_expand.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class NotesListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_OPPORTUNITY = "account,opportunity"
- CONTACT = "contact"
- CONTACT_ACCOUNT = "contact,account"
- CONTACT_ACCOUNT_OPPORTUNITY = "contact,account,opportunity"
- CONTACT_OPPORTUNITY = "contact,opportunity"
- OPPORTUNITY = "opportunity"
- OWNER = "owner"
- OWNER_ACCOUNT = "owner,account"
- OWNER_ACCOUNT_OPPORTUNITY = "owner,account,opportunity"
- OWNER_CONTACT = "owner,contact"
- OWNER_CONTACT_ACCOUNT = "owner,contact,account"
- OWNER_CONTACT_ACCOUNT_OPPORTUNITY = "owner,contact,account,opportunity"
- OWNER_CONTACT_OPPORTUNITY = "owner,contact,opportunity"
- OWNER_OPPORTUNITY = "owner,opportunity"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_opportunity: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_account: typing.Callable[[], T_Result],
- contact_account_opportunity: typing.Callable[[], T_Result],
- contact_opportunity: typing.Callable[[], T_Result],
- opportunity: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_account: typing.Callable[[], T_Result],
- owner_account_opportunity: typing.Callable[[], T_Result],
- owner_contact: typing.Callable[[], T_Result],
- owner_contact_account: typing.Callable[[], T_Result],
- owner_contact_account_opportunity: typing.Callable[[], T_Result],
- owner_contact_opportunity: typing.Callable[[], T_Result],
- owner_opportunity: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is NotesListRequestExpand.ACCOUNT:
- return account()
- if self is NotesListRequestExpand.ACCOUNT_OPPORTUNITY:
- return account_opportunity()
- if self is NotesListRequestExpand.CONTACT:
- return contact()
- if self is NotesListRequestExpand.CONTACT_ACCOUNT:
- return contact_account()
- if self is NotesListRequestExpand.CONTACT_ACCOUNT_OPPORTUNITY:
- return contact_account_opportunity()
- if self is NotesListRequestExpand.CONTACT_OPPORTUNITY:
- return contact_opportunity()
- if self is NotesListRequestExpand.OPPORTUNITY:
- return opportunity()
- if self is NotesListRequestExpand.OWNER:
- return owner()
- if self is NotesListRequestExpand.OWNER_ACCOUNT:
- return owner_account()
- if self is NotesListRequestExpand.OWNER_ACCOUNT_OPPORTUNITY:
- return owner_account_opportunity()
- if self is NotesListRequestExpand.OWNER_CONTACT:
- return owner_contact()
- if self is NotesListRequestExpand.OWNER_CONTACT_ACCOUNT:
- return owner_contact_account()
- if self is NotesListRequestExpand.OWNER_CONTACT_ACCOUNT_OPPORTUNITY:
- return owner_contact_account_opportunity()
- if self is NotesListRequestExpand.OWNER_CONTACT_OPPORTUNITY:
- return owner_contact_opportunity()
- if self is NotesListRequestExpand.OWNER_OPPORTUNITY:
- return owner_opportunity()
+NotesListRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,opportunity",
+ "contact",
+ "contact,account",
+ "contact,account,opportunity",
+ "contact,opportunity",
+ "opportunity",
+ "owner",
+ "owner,account",
+ "owner,account,opportunity",
+ "owner,contact",
+ "owner,contact,account",
+ "owner,contact,account,opportunity",
+ "owner,contact,opportunity",
+ "owner,opportunity",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/notes/types/notes_retrieve_request_expand.py b/src/merge/resources/crm/resources/notes/types/notes_retrieve_request_expand.py
index a9e9b3d4..0c296fba 100644
--- a/src/merge/resources/crm/resources/notes/types/notes_retrieve_request_expand.py
+++ b/src/merge/resources/crm/resources/notes/types/notes_retrieve_request_expand.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class NotesRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_OPPORTUNITY = "account,opportunity"
- CONTACT = "contact"
- CONTACT_ACCOUNT = "contact,account"
- CONTACT_ACCOUNT_OPPORTUNITY = "contact,account,opportunity"
- CONTACT_OPPORTUNITY = "contact,opportunity"
- OPPORTUNITY = "opportunity"
- OWNER = "owner"
- OWNER_ACCOUNT = "owner,account"
- OWNER_ACCOUNT_OPPORTUNITY = "owner,account,opportunity"
- OWNER_CONTACT = "owner,contact"
- OWNER_CONTACT_ACCOUNT = "owner,contact,account"
- OWNER_CONTACT_ACCOUNT_OPPORTUNITY = "owner,contact,account,opportunity"
- OWNER_CONTACT_OPPORTUNITY = "owner,contact,opportunity"
- OWNER_OPPORTUNITY = "owner,opportunity"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_opportunity: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_account: typing.Callable[[], T_Result],
- contact_account_opportunity: typing.Callable[[], T_Result],
- contact_opportunity: typing.Callable[[], T_Result],
- opportunity: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_account: typing.Callable[[], T_Result],
- owner_account_opportunity: typing.Callable[[], T_Result],
- owner_contact: typing.Callable[[], T_Result],
- owner_contact_account: typing.Callable[[], T_Result],
- owner_contact_account_opportunity: typing.Callable[[], T_Result],
- owner_contact_opportunity: typing.Callable[[], T_Result],
- owner_opportunity: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is NotesRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is NotesRetrieveRequestExpand.ACCOUNT_OPPORTUNITY:
- return account_opportunity()
- if self is NotesRetrieveRequestExpand.CONTACT:
- return contact()
- if self is NotesRetrieveRequestExpand.CONTACT_ACCOUNT:
- return contact_account()
- if self is NotesRetrieveRequestExpand.CONTACT_ACCOUNT_OPPORTUNITY:
- return contact_account_opportunity()
- if self is NotesRetrieveRequestExpand.CONTACT_OPPORTUNITY:
- return contact_opportunity()
- if self is NotesRetrieveRequestExpand.OPPORTUNITY:
- return opportunity()
- if self is NotesRetrieveRequestExpand.OWNER:
- return owner()
- if self is NotesRetrieveRequestExpand.OWNER_ACCOUNT:
- return owner_account()
- if self is NotesRetrieveRequestExpand.OWNER_ACCOUNT_OPPORTUNITY:
- return owner_account_opportunity()
- if self is NotesRetrieveRequestExpand.OWNER_CONTACT:
- return owner_contact()
- if self is NotesRetrieveRequestExpand.OWNER_CONTACT_ACCOUNT:
- return owner_contact_account()
- if self is NotesRetrieveRequestExpand.OWNER_CONTACT_ACCOUNT_OPPORTUNITY:
- return owner_contact_account_opportunity()
- if self is NotesRetrieveRequestExpand.OWNER_CONTACT_OPPORTUNITY:
- return owner_contact_opportunity()
- if self is NotesRetrieveRequestExpand.OWNER_OPPORTUNITY:
- return owner_opportunity()
+NotesRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,opportunity",
+ "contact",
+ "contact,account",
+ "contact,account,opportunity",
+ "contact,opportunity",
+ "opportunity",
+ "owner",
+ "owner,account",
+ "owner,account,opportunity",
+ "owner,contact",
+ "owner,contact,account",
+ "owner,contact,account,opportunity",
+ "owner,contact,opportunity",
+ "owner,opportunity",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/opportunities/client.py b/src/merge/resources/crm/resources/opportunities/client.py
index bf4520dd..c0cd6ed4 100644
--- a/src/merge/resources/crm/resources/opportunities/client.py
+++ b/src/merge/resources/crm/resources/opportunities/client.py
@@ -1,25 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.opportunities_list_request_expand import OpportunitiesListRequestExpand
+from .types.opportunities_list_request_status import OpportunitiesListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_opportunity_list import PaginatedOpportunityList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
-from ...types.opportunity import Opportunity
from ...types.opportunity_request import OpportunityRequest
from ...types.opportunity_response import OpportunityResponse
-from ...types.paginated_opportunity_list import PaginatedOpportunityList
-from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from ...types.patched_opportunity_request import PatchedOpportunityRequest
-from .types.opportunities_list_request_expand import OpportunitiesListRequestExpand
-from .types.opportunities_list_request_status import OpportunitiesListRequestStatus
from .types.opportunities_retrieve_request_expand import OpportunitiesRetrieveRequestExpand
+from ...types.opportunity import Opportunity
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.patched_opportunity_request import PatchedOpportunityRequest
+from ...types.meta_response import MetaResponse
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -125,7 +125,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,9 +160,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedOpportunityList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedOpportunityList,
+ parse_obj_as(
+ type_=PaginatedOpportunityList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -199,7 +205,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import OpportunityRequest
client = Merge(
@@ -213,14 +219,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/opportunities",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(OpportunityResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ OpportunityResponse,
+ parse_obj_as(
+ type_=OpportunityResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -269,7 +286,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -291,9 +308,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Opportunity, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Opportunity,
+ parse_obj_as(
+ type_=Opportunity, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -333,7 +356,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import PatchedOpportunityRequest
client = Merge(
@@ -348,14 +371,25 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/opportunities/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(OpportunityResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ OpportunityResponse,
+ parse_obj_as(
+ type_=OpportunityResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -379,7 +413,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -390,11 +424,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"crm/v1/opportunities/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/opportunities/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -416,7 +458,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -425,11 +467,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.crm.opportunities.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/opportunities/meta/post", method="GET", request_options=request_options
+ "crm/v1/opportunities/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -479,7 +529,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -500,9 +550,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -609,13 +665,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.opportunities.list()
+
+
+ async def main() -> None:
+ await client.crm.opportunities.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/opportunities",
@@ -644,9 +708,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedOpportunityList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedOpportunityList,
+ parse_obj_as(
+ type_=PaginatedOpportunityList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -683,28 +753,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import OpportunityRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.opportunities.create(
- model=OpportunityRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.opportunities.create(
+ model=OpportunityRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/opportunities",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(OpportunityResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ OpportunityResponse,
+ parse_obj_as(
+ type_=OpportunityResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -753,15 +842,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.opportunities.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.opportunities.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/opportunities/{jsonable_encoder(id)}",
@@ -775,9 +872,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Opportunity, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Opportunity,
+ parse_obj_as(
+ type_=Opportunity, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -817,29 +920,48 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import PatchedOpportunityRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.opportunities.partial_update(
- id="id",
- model=PatchedOpportunityRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.opportunities.partial_update(
+ id="id",
+ model=PatchedOpportunityRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/opportunities/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(OpportunityResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ OpportunityResponse,
+ parse_obj_as(
+ type_=OpportunityResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -865,22 +987,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.opportunities.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.opportunities.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"crm/v1/opportunities/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/opportunities/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -902,20 +1040,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.opportunities.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.opportunities.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/opportunities/meta/post", method="GET", request_options=request_options
+ "crm/v1/opportunities/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -965,13 +1119,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.opportunities.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.opportunities.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/opportunities/remote-field-classes",
@@ -986,9 +1148,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/opportunities/types/opportunities_list_request_expand.py b/src/merge/resources/crm/resources/opportunities/types/opportunities_list_request_expand.py
index 04f0a2ee..e04851bd 100644
--- a/src/merge/resources/crm/resources/opportunities/types/opportunities_list_request_expand.py
+++ b/src/merge/resources/crm/resources/opportunities/types/opportunities_list_request_expand.py
@@ -1,41 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OpportunitiesListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- OWNER = "owner"
- OWNER_ACCOUNT = "owner,account"
- OWNER_STAGE = "owner,stage"
- OWNER_STAGE_ACCOUNT = "owner,stage,account"
- STAGE = "stage"
- STAGE_ACCOUNT = "stage,account"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_account: typing.Callable[[], T_Result],
- owner_stage: typing.Callable[[], T_Result],
- owner_stage_account: typing.Callable[[], T_Result],
- stage: typing.Callable[[], T_Result],
- stage_account: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OpportunitiesListRequestExpand.ACCOUNT:
- return account()
- if self is OpportunitiesListRequestExpand.OWNER:
- return owner()
- if self is OpportunitiesListRequestExpand.OWNER_ACCOUNT:
- return owner_account()
- if self is OpportunitiesListRequestExpand.OWNER_STAGE:
- return owner_stage()
- if self is OpportunitiesListRequestExpand.OWNER_STAGE_ACCOUNT:
- return owner_stage_account()
- if self is OpportunitiesListRequestExpand.STAGE:
- return stage()
- if self is OpportunitiesListRequestExpand.STAGE_ACCOUNT:
- return stage_account()
+OpportunitiesListRequestExpand = typing.Union[
+ typing.Literal["account", "owner", "owner,account", "owner,stage", "owner,stage,account", "stage", "stage,account"],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/opportunities/types/opportunities_list_request_status.py b/src/merge/resources/crm/resources/opportunities/types/opportunities_list_request_status.py
index e194cf42..d12d3ac0 100644
--- a/src/merge/resources/crm/resources/opportunities/types/opportunities_list_request_status.py
+++ b/src/merge/resources/crm/resources/opportunities/types/opportunities_list_request_status.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OpportunitiesListRequestStatus(str, enum.Enum):
- LOST = "LOST"
- OPEN = "OPEN"
- WON = "WON"
-
- def visit(
- self,
- lost: typing.Callable[[], T_Result],
- open: typing.Callable[[], T_Result],
- won: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OpportunitiesListRequestStatus.LOST:
- return lost()
- if self is OpportunitiesListRequestStatus.OPEN:
- return open()
- if self is OpportunitiesListRequestStatus.WON:
- return won()
+OpportunitiesListRequestStatus = typing.Union[typing.Literal["LOST", "OPEN", "WON"], typing.Any]
diff --git a/src/merge/resources/crm/resources/opportunities/types/opportunities_retrieve_request_expand.py b/src/merge/resources/crm/resources/opportunities/types/opportunities_retrieve_request_expand.py
index 8bf0a512..e5e566b6 100644
--- a/src/merge/resources/crm/resources/opportunities/types/opportunities_retrieve_request_expand.py
+++ b/src/merge/resources/crm/resources/opportunities/types/opportunities_retrieve_request_expand.py
@@ -1,41 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OpportunitiesRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- OWNER = "owner"
- OWNER_ACCOUNT = "owner,account"
- OWNER_STAGE = "owner,stage"
- OWNER_STAGE_ACCOUNT = "owner,stage,account"
- STAGE = "stage"
- STAGE_ACCOUNT = "stage,account"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_account: typing.Callable[[], T_Result],
- owner_stage: typing.Callable[[], T_Result],
- owner_stage_account: typing.Callable[[], T_Result],
- stage: typing.Callable[[], T_Result],
- stage_account: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OpportunitiesRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is OpportunitiesRetrieveRequestExpand.OWNER:
- return owner()
- if self is OpportunitiesRetrieveRequestExpand.OWNER_ACCOUNT:
- return owner_account()
- if self is OpportunitiesRetrieveRequestExpand.OWNER_STAGE:
- return owner_stage()
- if self is OpportunitiesRetrieveRequestExpand.OWNER_STAGE_ACCOUNT:
- return owner_stage_account()
- if self is OpportunitiesRetrieveRequestExpand.STAGE:
- return stage()
- if self is OpportunitiesRetrieveRequestExpand.STAGE_ACCOUNT:
- return stage_account()
+OpportunitiesRetrieveRequestExpand = typing.Union[
+ typing.Literal["account", "owner", "owner,account", "owner,stage", "owner,stage,account", "stage", "stage,account"],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/passthrough/client.py b/src/merge/resources/crm/resources/passthrough/client.py
index 68530e9f..90987610 100644
--- a/src/merge/resources/crm/resources/passthrough/client.py
+++ b/src/merge/resources/crm/resources/passthrough/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.request_options import RequestOptions
from ...types.remote_response import RemoteResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -38,8 +38,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.crm import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.crm import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,17 +47,27 @@ def create(
)
client.crm.passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "crm/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -88,26 +98,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.crm import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.crm import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.crm.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "crm/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/regenerate_key/client.py b/src/merge/resources/crm/resources/regenerate_key/client.py
index 8434bb94..13ba68e8 100644
--- a/src/merge/resources/crm/resources/regenerate_key/client.py
+++ b/src/merge/resources/crm/resources/regenerate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,11 +47,23 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/regenerate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "crm/v1/regenerate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,22 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.regenerate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.crm.regenerate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/regenerate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "crm/v1/regenerate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/scopes/client.py b/src/merge/resources/crm/resources/scopes/client.py
index 54e00986..e3588036 100644
--- a/src/merge/resources/crm/resources/scopes/client.py
+++ b/src/merge/resources/crm/resources/scopes/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.common_model_scope_api import CommonModelScopeApi
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def default_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -45,11 +45,19 @@ def default_scopes_retrieve(
client.crm.scopes.default_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/default-scopes", method="GET", request_options=request_options
+ "crm/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -73,7 +81,7 @@ def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -82,11 +90,19 @@ def linked_account_scopes_retrieve(
client.crm.scopes.linked_account_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/linked-account-scopes", method="GET", request_options=request_options
+ "crm/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -96,7 +112,7 @@ def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -116,7 +132,7 @@ def linked_account_scopes_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -153,13 +169,21 @@ def linked_account_scopes_create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -188,20 +212,36 @@ async def default_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.scopes.default_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.scopes.default_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/default-scopes", method="GET", request_options=request_options
+ "crm/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -225,20 +265,36 @@ async def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.scopes.linked_account_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.scopes.linked_account_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/linked-account-scopes", method="GET", request_options=request_options
+ "crm/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -248,7 +304,7 @@ async def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -268,7 +324,9 @@ async def linked_account_scopes_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -278,40 +336,54 @@ async def linked_account_scopes_create(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.scopes.linked_account_scopes_create(
- common_models=[
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Employee",
- model_permissions={
- "READ": ModelPermissionDeserializerRequest(
- is_enabled=True,
- ),
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- ),
- },
- ),
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Benefit",
- model_permissions={
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- )
- },
- ),
- ],
- )
+
+
+ async def main() -> None:
+ await client.crm.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/stages/client.py b/src/merge/resources/crm/resources/stages/client.py
index b089b3c5..5554e6bf 100644
--- a/src/merge/resources/crm/resources/stages/client.py
+++ b/src/merge/resources/crm/resources/stages/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_stage_list import PaginatedStageList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
+from ...types.stage import Stage
from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from ...types.paginated_stage_list import PaginatedStageList
-from ...types.stage import Stage
+from .....core.client_wrapper import AsyncClientWrapper
class StagesClient:
@@ -79,7 +79,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -104,9 +104,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedStageList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedStageList,
+ parse_obj_as(
+ type_=PaginatedStageList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -143,7 +149,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -156,12 +162,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/stages/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_remote_fields": include_remote_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Stage, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Stage,
+ parse_obj_as(
+ type_=Stage, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -211,7 +226,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -232,9 +247,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,13 +326,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.stages.list()
+
+
+ async def main() -> None:
+ await client.crm.stages.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/stages",
@@ -330,9 +359,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedStageList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedStageList,
+ parse_obj_as(
+ type_=PaginatedStageList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -369,25 +404,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.stages.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.stages.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/stages/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_remote_fields": include_remote_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Stage, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Stage,
+ parse_obj_as(
+ type_=Stage, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -437,13 +489,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.stages.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.stages.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/stages/remote-field-classes",
@@ -458,9 +518,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/sync_status/client.py b/src/merge/resources/crm/resources/sync_status/client.py
index 9dd4c789..e8e76ac8 100644
--- a/src/merge/resources/crm/resources/sync_status/client.py
+++ b/src/merge/resources/crm/resources/sync_status/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_sync_status_list import PaginatedSyncStatusList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class SyncStatusClient:
@@ -19,7 +19,7 @@ def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -42,7 +42,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -53,12 +53,21 @@ def list(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,7 +83,7 @@ async def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -97,23 +106,40 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.sync_status.list()
+
+
+ async def main() -> None:
+ await client.crm.sync_status.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/tasks/client.py b/src/merge/resources/crm/resources/tasks/client.py
index 6c3be09b..d6f14b88 100644
--- a/src/merge/resources/crm/resources/tasks/client.py
+++ b/src/merge/resources/crm/resources/tasks/client.py
@@ -1,24 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.tasks_list_request_expand import TasksListRequestExpand
from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
-from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
from ...types.paginated_task_list import PaginatedTaskList
-from ...types.patched_task_request import PatchedTaskRequest
-from ...types.task import Task
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.task_request import TaskRequest
from ...types.task_response import TaskResponse
-from .types.tasks_list_request_expand import TasksListRequestExpand
from .types.tasks_retrieve_request_expand import TasksRetrieveRequestExpand
+from ...types.task import Task
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.patched_task_request import PatchedTaskRequest
+from ...types.meta_response import MetaResponse
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -92,7 +92,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -118,9 +118,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTaskList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTaskList,
+ parse_obj_as(
+ type_=PaginatedTaskList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -157,7 +163,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import TaskRequest
client = Merge(
@@ -171,14 +177,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/tasks",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TaskResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TaskResponse,
+ parse_obj_as(
+ type_=TaskResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -219,7 +236,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -239,9 +256,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Task, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Task,
+ parse_obj_as(
+ type_=Task, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -281,7 +304,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.crm import PatchedTaskRequest
client = Merge(
@@ -296,14 +319,25 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/tasks/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TaskResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TaskResponse,
+ parse_obj_as(
+ type_=TaskResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -327,7 +361,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -338,11 +372,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"crm/v1/tasks/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/tasks/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -364,7 +406,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -373,11 +415,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.crm.tasks.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/tasks/meta/post", method="GET", request_options=request_options
+ "crm/v1/tasks/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -427,7 +477,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -448,9 +498,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -525,13 +581,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.tasks.list()
+
+
+ async def main() -> None:
+ await client.crm.tasks.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/tasks",
@@ -551,9 +615,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTaskList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTaskList,
+ parse_obj_as(
+ type_=PaginatedTaskList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -590,28 +660,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import TaskRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.tasks.create(
- model=TaskRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.tasks.create(
+ model=TaskRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/tasks",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TaskResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TaskResponse,
+ parse_obj_as(
+ type_=TaskResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -652,15 +741,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.tasks.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.tasks.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/tasks/{jsonable_encoder(id)}",
@@ -672,9 +769,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Task, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Task,
+ parse_obj_as(
+ type_=Task, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -714,29 +817,48 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.crm import PatchedTaskRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.tasks.partial_update(
- id="id",
- model=PatchedTaskRequest(),
- )
+
+
+ async def main() -> None:
+ await client.crm.tasks.partial_update(
+ id="id",
+ model=PatchedTaskRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/tasks/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TaskResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TaskResponse,
+ parse_obj_as(
+ type_=TaskResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -762,22 +884,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.tasks.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.tasks.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"crm/v1/tasks/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"crm/v1/tasks/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -799,20 +937,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.tasks.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.crm.tasks.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/tasks/meta/post", method="GET", request_options=request_options
+ "crm/v1/tasks/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -862,13 +1016,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.tasks.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.tasks.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/tasks/remote-field-classes",
@@ -883,9 +1045,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/tasks/types/tasks_list_request_expand.py b/src/merge/resources/crm/resources/tasks/types/tasks_list_request_expand.py
index 605edb65..f94aef13 100644
--- a/src/merge/resources/crm/resources/tasks/types/tasks_list_request_expand.py
+++ b/src/merge/resources/crm/resources/tasks/types/tasks_list_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TasksListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_OPPORTUNITY = "account,opportunity"
- OPPORTUNITY = "opportunity"
- OWNER = "owner"
- OWNER_ACCOUNT = "owner,account"
- OWNER_ACCOUNT_OPPORTUNITY = "owner,account,opportunity"
- OWNER_OPPORTUNITY = "owner,opportunity"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_opportunity: typing.Callable[[], T_Result],
- opportunity: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_account: typing.Callable[[], T_Result],
- owner_account_opportunity: typing.Callable[[], T_Result],
- owner_opportunity: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TasksListRequestExpand.ACCOUNT:
- return account()
- if self is TasksListRequestExpand.ACCOUNT_OPPORTUNITY:
- return account_opportunity()
- if self is TasksListRequestExpand.OPPORTUNITY:
- return opportunity()
- if self is TasksListRequestExpand.OWNER:
- return owner()
- if self is TasksListRequestExpand.OWNER_ACCOUNT:
- return owner_account()
- if self is TasksListRequestExpand.OWNER_ACCOUNT_OPPORTUNITY:
- return owner_account_opportunity()
- if self is TasksListRequestExpand.OWNER_OPPORTUNITY:
- return owner_opportunity()
+TasksListRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,opportunity",
+ "opportunity",
+ "owner",
+ "owner,account",
+ "owner,account,opportunity",
+ "owner,opportunity",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/tasks/types/tasks_retrieve_request_expand.py b/src/merge/resources/crm/resources/tasks/types/tasks_retrieve_request_expand.py
index 3fe53160..3a2183c3 100644
--- a/src/merge/resources/crm/resources/tasks/types/tasks_retrieve_request_expand.py
+++ b/src/merge/resources/crm/resources/tasks/types/tasks_retrieve_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TasksRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_OPPORTUNITY = "account,opportunity"
- OPPORTUNITY = "opportunity"
- OWNER = "owner"
- OWNER_ACCOUNT = "owner,account"
- OWNER_ACCOUNT_OPPORTUNITY = "owner,account,opportunity"
- OWNER_OPPORTUNITY = "owner,opportunity"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_opportunity: typing.Callable[[], T_Result],
- opportunity: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- owner_account: typing.Callable[[], T_Result],
- owner_account_opportunity: typing.Callable[[], T_Result],
- owner_opportunity: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TasksRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is TasksRetrieveRequestExpand.ACCOUNT_OPPORTUNITY:
- return account_opportunity()
- if self is TasksRetrieveRequestExpand.OPPORTUNITY:
- return opportunity()
- if self is TasksRetrieveRequestExpand.OWNER:
- return owner()
- if self is TasksRetrieveRequestExpand.OWNER_ACCOUNT:
- return owner_account()
- if self is TasksRetrieveRequestExpand.OWNER_ACCOUNT_OPPORTUNITY:
- return owner_account_opportunity()
- if self is TasksRetrieveRequestExpand.OWNER_OPPORTUNITY:
- return owner_opportunity()
+TasksRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,opportunity",
+ "opportunity",
+ "owner",
+ "owner,account",
+ "owner,account,opportunity",
+ "owner,opportunity",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/resources/users/client.py b/src/merge/resources/crm/resources/users/client.py
index 7d2d9d5c..42bfe67f 100644
--- a/src/merge/resources/crm/resources/users/client.py
+++ b/src/merge/resources/crm/resources/users/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_user_list import PaginatedUserList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
+from ...types.user import User
from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.ignore_common_model_request import IgnoreCommonModelRequest
from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from ...types.paginated_user_list import PaginatedUserList
-from ...types.user import User
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -83,7 +83,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -108,9 +108,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -147,7 +153,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,12 +166,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"crm/v1/users/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_remote_fields": include_remote_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(User, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ User,
+ parse_obj_as(
+ type_=User, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -196,8 +211,8 @@ def ignore_create(
Examples
--------
- from merge.client import Merge
- from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum
+ from merge import Merge
+ from merge.resources.crm import IgnoreCommonModelRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -206,7 +221,7 @@ def ignore_create(
client.crm.users.ignore_create(
model_id="model_id",
request=IgnoreCommonModelRequest(
- reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST,
+ reason="GENERAL_CUSTOMER_REQUEST",
),
)
"""
@@ -217,9 +232,9 @@ def ignore_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -269,7 +284,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -290,9 +305,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -363,13 +384,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.users.list()
+
+
+ async def main() -> None:
+ await client.crm.users.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/users",
@@ -388,9 +417,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -427,25 +462,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.users.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.crm.users.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/users/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_remote_fields": include_remote_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_remote_fields": include_remote_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(User, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ User,
+ parse_obj_as(
+ type_=User, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -476,19 +528,27 @@ async def ignore_create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.crm import IgnoreCommonModelRequest, ReasonEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.crm import IgnoreCommonModelRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.users.ignore_create(
- model_id="model_id",
- request=IgnoreCommonModelRequest(
- reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST,
- ),
- )
+
+
+ async def main() -> None:
+ await client.crm.users.ignore_create(
+ model_id="model_id",
+ request=IgnoreCommonModelRequest(
+ reason="GENERAL_CUSTOMER_REQUEST",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"crm/v1/users/ignore/{jsonable_encoder(model_id)}",
@@ -497,9 +557,9 @@ async def ignore_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -549,13 +609,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.users.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.crm.users.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/users/remote-field-classes",
@@ -570,9 +638,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/resources/webhook_receivers/client.py b/src/merge/resources/crm/resources/webhook_receivers/client.py
index 0ff5f9cf..29727354 100644
--- a/src/merge/resources/crm/resources/webhook_receivers/client.py
+++ b/src/merge/resources/crm/resources/webhook_receivers/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.webhook_receiver import WebhookReceiver
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -33,7 +33,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -42,11 +42,19 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
client.crm.webhook_receivers.list()
"""
_response = self._client_wrapper.httpx_client.request(
- "crm/v1/webhook-receivers", method="GET", request_options=request_options
+ "crm/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -58,7 +66,7 @@ def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -81,7 +89,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -95,13 +103,23 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"crm/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -128,20 +146,36 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None)
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.webhook_receivers.list()
+
+
+ async def main() -> None:
+ await client.crm.webhook_receivers.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "crm/v1/webhook-receivers", method="GET", request_options=request_options
+ "crm/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,7 +187,7 @@ async def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -176,27 +210,45 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.crm.webhook_receivers.create(
- event="event",
- is_active=True,
- )
+
+
+ async def main() -> None:
+ await client.crm.webhook_receivers.create(
+ event="event",
+ is_active=True,
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"crm/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/crm/types/account.py b/src/merge/resources/crm/types/account.py
index 1595f9ac..08ea438c 100644
--- a/src/merge/resources/crm/types/account.py
+++ b/src/merge/resources/crm/types/account.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .account_owner import AccountOwner
from .address import Address
from .phone_number import PhoneNumber
from .remote_data import RemoteData
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Account(pydantic_v1.BaseModel):
+class Account(UniversalBaseModel):
"""
# The Account Object
@@ -26,87 +26,78 @@ class Account(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- owner: typing.Optional[AccountOwner] = pydantic_v1.Field()
+ owner: typing.Optional[AccountOwner] = pydantic.Field()
"""
The account's owner.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The account's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The account's description.
"""
- industry: typing.Optional[str] = pydantic_v1.Field()
+ industry: typing.Optional[str] = pydantic.Field()
"""
The account's industry.
"""
- website: typing.Optional[str] = pydantic_v1.Field()
+ website: typing.Optional[str] = pydantic.Field()
"""
The account's website.
"""
- number_of_employees: typing.Optional[int] = pydantic_v1.Field()
+ number_of_employees: typing.Optional[int] = pydantic.Field()
"""
The account's number of employees.
"""
addresses: typing.Optional[typing.List[Address]]
phone_numbers: typing.Optional[typing.List[PhoneNumber]]
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The last date (either most recent or furthest in the future) of when an activity occurs in an account.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the CRM system account data was last modified by a user with a login.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's account was created.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/account_details.py b/src/merge/resources/crm/types/account_details.py
index 81f9587b..50a3736a 100644
--- a/src/merge/resources/crm/types/account_details.py
+++ b/src/merge/resources/crm/types/account_details.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .category_enum import CategoryEnum
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetails(pydantic_v1.BaseModel):
+class AccountDetails(UniversalBaseModel):
id: typing.Optional[str]
integration: typing.Optional[str]
integration_slug: typing.Optional[str]
@@ -18,27 +17,18 @@ class AccountDetails(pydantic_v1.BaseModel):
end_user_email_address: typing.Optional[str]
status: typing.Optional[str]
webhook_listener_url: typing.Optional[str]
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
account_type: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/account_details_and_actions.py b/src/merge/resources/crm/types/account_details_and_actions.py
index 6a1b2874..39a7b0da 100644
--- a/src/merge/resources/crm/types/account_details_and_actions.py
+++ b/src/merge/resources/crm/types/account_details_and_actions.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
-from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
from .category_enum import CategoryEnum
+from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
+import pydantic
+from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetailsAndActions(pydantic_v1.BaseModel):
+class AccountDetailsAndActions(UniversalBaseModel):
"""
# The LinkedAccount Object
@@ -30,13 +29,13 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
end_user_origin_id: typing.Optional[str]
end_user_organization_name: str
end_user_email_address: str
- subdomain: typing.Optional[str] = pydantic_v1.Field()
+ subdomain: typing.Optional[str] = pydantic.Field()
"""
The tenant or domain the customer has provided access to.
"""
webhook_listener_url: str
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
@@ -44,20 +43,11 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
integration: typing.Optional[AccountDetailsAndActionsIntegration]
account_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/account_details_and_actions_integration.py b/src/merge/resources/crm/types/account_details_and_actions_integration.py
index 7c300a2b..5779ac5b 100644
--- a/src/merge/resources/crm/types/account_details_and_actions_integration.py
+++ b/src/merge/resources/crm/types/account_details_and_actions_integration.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
+class AccountDetailsAndActionsIntegration(UniversalBaseModel):
name: str
categories: typing.List[CategoriesEnum]
image: typing.Optional[str]
@@ -19,20 +18,11 @@ class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/account_details_and_actions_status_enum.py b/src/merge/resources/crm/types/account_details_and_actions_status_enum.py
index a904e550..47a6e845 100644
--- a/src/merge/resources/crm/types/account_details_and_actions_status_enum.py
+++ b/src/merge/resources/crm/types/account_details_and_actions_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountDetailsAndActionsStatusEnum(str, enum.Enum):
- """
- - `COMPLETE` - COMPLETE
- - `INCOMPLETE` - INCOMPLETE
- - `RELINK_NEEDED` - RELINK_NEEDED
- """
-
- COMPLETE = "COMPLETE"
- INCOMPLETE = "INCOMPLETE"
- RELINK_NEEDED = "RELINK_NEEDED"
-
- def visit(
- self,
- complete: typing.Callable[[], T_Result],
- incomplete: typing.Callable[[], T_Result],
- relink_needed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountDetailsAndActionsStatusEnum.COMPLETE:
- return complete()
- if self is AccountDetailsAndActionsStatusEnum.INCOMPLETE:
- return incomplete()
- if self is AccountDetailsAndActionsStatusEnum.RELINK_NEEDED:
- return relink_needed()
+AccountDetailsAndActionsStatusEnum = typing.Union[typing.Literal["COMPLETE", "INCOMPLETE", "RELINK_NEEDED"], typing.Any]
diff --git a/src/merge/resources/crm/types/account_integration.py b/src/merge/resources/crm/types/account_integration.py
index ad3fd193..b1e4ec7e 100644
--- a/src/merge/resources/crm/types/account_integration.py
+++ b/src/merge/resources/crm/types/account_integration.py
@@ -1,74 +1,66 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountIntegration(pydantic_v1.BaseModel):
- name: str = pydantic_v1.Field()
+class AccountIntegration(UniversalBaseModel):
+ name: str = pydantic.Field()
"""
Company name.
"""
- abbreviated_name: typing.Optional[str] = pydantic_v1.Field()
+ abbreviated_name: typing.Optional[str] = pydantic.Field()
"""
Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).
Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)
"""
- categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic_v1.Field()
+ categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic.Field()
"""
Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].
"""
- image: typing.Optional[str] = pydantic_v1.Field()
+ image: typing.Optional[str] = pydantic.Field()
"""
Company logo in rectangular shape. Upload an image with a clear background.
"""
- square_image: typing.Optional[str] = pydantic_v1.Field()
+ square_image: typing.Optional[str] = pydantic.Field()
"""
Company logo in square shape. Upload an image with a white background.
"""
- color: typing.Optional[str] = pydantic_v1.Field()
+ color: typing.Optional[str] = pydantic.Field()
"""
The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color.
"""
slug: typing.Optional[str]
- api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = (
+ pydantic.Field()
+ )
"""
Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}
"""
- webhook_setup_guide_url: typing.Optional[str] = pydantic_v1.Field()
+ webhook_setup_guide_url: typing.Optional[str] = pydantic.Field()
"""
Setup guide URL for third party webhook creation. Exposed in Merge Docs.
"""
- category_beta_status: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ category_beta_status: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
Category or categories this integration is in beta status for.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/account_owner.py b/src/merge/resources/crm/types/account_owner.py
index eb20c8fc..11456c5d 100644
--- a/src/merge/resources/crm/types/account_owner.py
+++ b/src/merge/resources/crm/types/account_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
AccountOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/account_request.py b/src/merge/resources/crm/types/account_request.py
index fa550ba2..08e0235d 100644
--- a/src/merge/resources/crm/types/account_request.py
+++ b/src/merge/resources/crm/types/account_request.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account_request_owner import AccountRequestOwner
+import pydantic
from .address_request import AddressRequest
+import datetime as dt
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountRequest(pydantic_v1.BaseModel):
+class AccountRequest(UniversalBaseModel):
"""
# The Account Object
@@ -23,60 +23,51 @@ class AccountRequest(pydantic_v1.BaseModel):
TODO
"""
- owner: typing.Optional[AccountRequestOwner] = pydantic_v1.Field()
+ owner: typing.Optional[AccountRequestOwner] = pydantic.Field()
"""
The account's owner.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The account's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The account's description.
"""
- industry: typing.Optional[str] = pydantic_v1.Field()
+ industry: typing.Optional[str] = pydantic.Field()
"""
The account's industry.
"""
- website: typing.Optional[str] = pydantic_v1.Field()
+ website: typing.Optional[str] = pydantic.Field()
"""
The account's website.
"""
- number_of_employees: typing.Optional[int] = pydantic_v1.Field()
+ number_of_employees: typing.Optional[int] = pydantic.Field()
"""
The account's number of employees.
"""
addresses: typing.Optional[typing.List[AddressRequest]]
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The last date (either most recent or furthest in the future) of when an activity occurs in an account.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/account_request_owner.py b/src/merge/resources/crm/types/account_request_owner.py
index 790ba846..9ab51c35 100644
--- a/src/merge/resources/crm/types/account_request_owner.py
+++ b/src/merge/resources/crm/types/account_request_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
AccountRequestOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/account_token.py b/src/merge/resources/crm/types/account_token.py
index 4794fea3..fa8b76ec 100644
--- a/src/merge/resources/crm/types/account_token.py
+++ b/src/merge/resources/crm/types/account_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class AccountToken(pydantic_v1.BaseModel):
+class AccountToken(UniversalBaseModel):
account_token: str
integration: AccountIntegration
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/activity_type_enum.py b/src/merge/resources/crm/types/activity_type_enum.py
index b2452e70..21c0c925 100644
--- a/src/merge/resources/crm/types/activity_type_enum.py
+++ b/src/merge/resources/crm/types/activity_type_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ActivityTypeEnum(str, enum.Enum):
- """
- - `CALL` - CALL
- - `MEETING` - MEETING
- - `EMAIL` - EMAIL
- """
-
- CALL = "CALL"
- MEETING = "MEETING"
- EMAIL = "EMAIL"
-
- def visit(
- self,
- call: typing.Callable[[], T_Result],
- meeting: typing.Callable[[], T_Result],
- email: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ActivityTypeEnum.CALL:
- return call()
- if self is ActivityTypeEnum.MEETING:
- return meeting()
- if self is ActivityTypeEnum.EMAIL:
- return email()
+ActivityTypeEnum = typing.Union[typing.Literal["CALL", "MEETING", "EMAIL"], typing.Any]
diff --git a/src/merge/resources/crm/types/address.py b/src/merge/resources/crm/types/address.py
index 29ae0c0f..4f315038 100644
--- a/src/merge/resources/crm/types/address.py
+++ b/src/merge/resources/crm/types/address.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .address_address_type import AddressAddressType
+import datetime as dt
+import pydantic
from .address_country import AddressCountry
+from .address_address_type import AddressAddressType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Address(pydantic_v1.BaseModel):
+class Address(UniversalBaseModel):
"""
# The Address Object
@@ -22,42 +22,42 @@ class Address(pydantic_v1.BaseModel):
TODO
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- street_1: typing.Optional[str] = pydantic_v1.Field()
+ street_1: typing.Optional[str] = pydantic.Field()
"""
Line 1 of the address's street.
"""
- street_2: typing.Optional[str] = pydantic_v1.Field()
+ street_2: typing.Optional[str] = pydantic.Field()
"""
Line 2 of the address's street.
"""
- city: typing.Optional[str] = pydantic_v1.Field()
+ city: typing.Optional[str] = pydantic.Field()
"""
The address's city.
"""
- state: typing.Optional[str] = pydantic_v1.Field()
+ state: typing.Optional[str] = pydantic.Field()
"""
The address's state.
"""
- postal_code: typing.Optional[str] = pydantic_v1.Field()
+ postal_code: typing.Optional[str] = pydantic.Field()
"""
The address's postal code.
"""
- country: typing.Optional[AddressCountry] = pydantic_v1.Field()
+ country: typing.Optional[AddressCountry] = pydantic.Field()
"""
The address's country.
@@ -312,7 +312,7 @@ class Address(pydantic_v1.BaseModel):
- `ZW` - Zimbabwe
"""
- address_type: typing.Optional[AddressAddressType] = pydantic_v1.Field()
+ address_type: typing.Optional[AddressAddressType] = pydantic.Field()
"""
The address type.
@@ -320,20 +320,11 @@ class Address(pydantic_v1.BaseModel):
- `SHIPPING` - SHIPPING
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/address_address_type.py b/src/merge/resources/crm/types/address_address_type.py
index 54bc600b..28fa5845 100644
--- a/src/merge/resources/crm/types/address_address_type.py
+++ b/src/merge/resources/crm/types/address_address_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .address_type_enum import AddressTypeEnum
AddressAddressType = typing.Union[AddressTypeEnum, str]
diff --git a/src/merge/resources/crm/types/address_country.py b/src/merge/resources/crm/types/address_country.py
index b437f311..f8ff10fc 100644
--- a/src/merge/resources/crm/types/address_country.py
+++ b/src/merge/resources/crm/types/address_country.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .country_enum import CountryEnum
AddressCountry = typing.Union[CountryEnum, str]
diff --git a/src/merge/resources/crm/types/address_request.py b/src/merge/resources/crm/types/address_request.py
index 2fb17841..9b156d15 100644
--- a/src/merge/resources/crm/types/address_request.py
+++ b/src/merge/resources/crm/types/address_request.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .address_request_address_type import AddressRequestAddressType
+import pydantic
from .address_request_country import AddressRequestCountry
+from .address_request_address_type import AddressRequestAddressType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AddressRequest(pydantic_v1.BaseModel):
+class AddressRequest(UniversalBaseModel):
"""
# The Address Object
@@ -22,32 +21,32 @@ class AddressRequest(pydantic_v1.BaseModel):
TODO
"""
- street_1: typing.Optional[str] = pydantic_v1.Field()
+ street_1: typing.Optional[str] = pydantic.Field()
"""
Line 1 of the address's street.
"""
- street_2: typing.Optional[str] = pydantic_v1.Field()
+ street_2: typing.Optional[str] = pydantic.Field()
"""
Line 2 of the address's street.
"""
- city: typing.Optional[str] = pydantic_v1.Field()
+ city: typing.Optional[str] = pydantic.Field()
"""
The address's city.
"""
- state: typing.Optional[str] = pydantic_v1.Field()
+ state: typing.Optional[str] = pydantic.Field()
"""
The address's state.
"""
- postal_code: typing.Optional[str] = pydantic_v1.Field()
+ postal_code: typing.Optional[str] = pydantic.Field()
"""
The address's postal code.
"""
- country: typing.Optional[AddressRequestCountry] = pydantic_v1.Field()
+ country: typing.Optional[AddressRequestCountry] = pydantic.Field()
"""
The address's country.
@@ -302,7 +301,7 @@ class AddressRequest(pydantic_v1.BaseModel):
- `ZW` - Zimbabwe
"""
- address_type: typing.Optional[AddressRequestAddressType] = pydantic_v1.Field()
+ address_type: typing.Optional[AddressRequestAddressType] = pydantic.Field()
"""
The address type.
@@ -310,23 +309,14 @@ class AddressRequest(pydantic_v1.BaseModel):
- `SHIPPING` - SHIPPING
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/address_request_address_type.py b/src/merge/resources/crm/types/address_request_address_type.py
index 7052fc92..3855f4bc 100644
--- a/src/merge/resources/crm/types/address_request_address_type.py
+++ b/src/merge/resources/crm/types/address_request_address_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .address_type_enum import AddressTypeEnum
AddressRequestAddressType = typing.Union[AddressTypeEnum, str]
diff --git a/src/merge/resources/crm/types/address_request_country.py b/src/merge/resources/crm/types/address_request_country.py
index 02559f8d..28dfd7d3 100644
--- a/src/merge/resources/crm/types/address_request_country.py
+++ b/src/merge/resources/crm/types/address_request_country.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .country_enum import CountryEnum
AddressRequestCountry = typing.Union[CountryEnum, str]
diff --git a/src/merge/resources/crm/types/address_type_enum.py b/src/merge/resources/crm/types/address_type_enum.py
index 1483fc30..c81218e8 100644
--- a/src/merge/resources/crm/types/address_type_enum.py
+++ b/src/merge/resources/crm/types/address_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AddressTypeEnum(str, enum.Enum):
- """
- - `BILLING` - BILLING
- - `SHIPPING` - SHIPPING
- """
-
- BILLING = "BILLING"
- SHIPPING = "SHIPPING"
-
- def visit(self, billing: typing.Callable[[], T_Result], shipping: typing.Callable[[], T_Result]) -> T_Result:
- if self is AddressTypeEnum.BILLING:
- return billing()
- if self is AddressTypeEnum.SHIPPING:
- return shipping()
+AddressTypeEnum = typing.Union[typing.Literal["BILLING", "SHIPPING"], typing.Any]
diff --git a/src/merge/resources/crm/types/advanced_metadata.py b/src/merge/resources/crm/types/advanced_metadata.py
index 2aa7d1d6..6287a842 100644
--- a/src/merge/resources/crm/types/advanced_metadata.py
+++ b/src/merge/resources/crm/types/advanced_metadata.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AdvancedMetadata(pydantic_v1.BaseModel):
+class AdvancedMetadata(UniversalBaseModel):
id: str
display_name: typing.Optional[str]
description: typing.Optional[str]
is_required: typing.Optional[bool]
is_custom: typing.Optional[bool]
- field_choices: typing.Optional[typing.List[typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_choices: typing.Optional[typing.List[typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/association.py b/src/merge/resources/crm/types/association.py
index 9e026198..73ed1303 100644
--- a/src/merge/resources/crm/types/association.py
+++ b/src/merge/resources/crm/types/association.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
from .association_association_type import AssociationAssociationType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Association(pydantic_v1.BaseModel):
+class Association(UniversalBaseModel):
"""
# The Association Object
@@ -21,37 +21,28 @@ class Association(pydantic_v1.BaseModel):
TODO
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
source_object: typing.Optional[str]
target_object: typing.Optional[str]
- association_type: typing.Optional[AssociationAssociationType] = pydantic_v1.Field()
+ association_type: typing.Optional[AssociationAssociationType] = pydantic.Field()
"""
The association type the association belongs to.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/association_association_type.py b/src/merge/resources/crm/types/association_association_type.py
index 0395ebcc..28b18784 100644
--- a/src/merge/resources/crm/types/association_association_type.py
+++ b/src/merge/resources/crm/types/association_association_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .association_type import AssociationType
AssociationAssociationType = typing.Union[str, AssociationType]
diff --git a/src/merge/resources/crm/types/association_sub_type.py b/src/merge/resources/crm/types/association_sub_type.py
index db3977cc..9a0b34c6 100644
--- a/src/merge/resources/crm/types/association_sub_type.py
+++ b/src/merge/resources/crm/types/association_sub_type.py
@@ -1,40 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AssociationSubType(pydantic_v1.BaseModel):
+class AssociationSubType(UniversalBaseModel):
id: typing.Optional[str]
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
origin_type: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/association_type.py b/src/merge/resources/crm/types/association_type.py
index 4cce102e..e3939e0b 100644
--- a/src/merge/resources/crm/types/association_type.py
+++ b/src/merge/resources/crm/types/association_type.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .association_sub_type import AssociationSubType
from .association_type_cardinality import AssociationTypeCardinality
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AssociationType(pydantic_v1.BaseModel):
+class AssociationType(UniversalBaseModel):
"""
# The AssociationType Object
@@ -23,22 +23,22 @@ class AssociationType(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- source_object_class: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ source_object_class: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
The class of the source object (Custom Object or Common Model) for the association type.
"""
@@ -49,20 +49,11 @@ class AssociationType(pydantic_v1.BaseModel):
cardinality: typing.Optional[AssociationTypeCardinality]
is_required: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/association_type_cardinality.py b/src/merge/resources/crm/types/association_type_cardinality.py
index 8d59451c..7cfba4fb 100644
--- a/src/merge/resources/crm/types/association_type_cardinality.py
+++ b/src/merge/resources/crm/types/association_type_cardinality.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .cardinality_enum import CardinalityEnum
AssociationTypeCardinality = typing.Union[CardinalityEnum, str]
diff --git a/src/merge/resources/crm/types/association_type_request_request.py b/src/merge/resources/crm/types/association_type_request_request.py
index 389f6eb8..c1607e12 100644
--- a/src/merge/resources/crm/types/association_type_request_request.py
+++ b/src/merge/resources/crm/types/association_type_request_request.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from .object_class_description_request import ObjectClassDescriptionRequest
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .cardinality_enum import CardinalityEnum
-from .object_class_description_request import ObjectClassDescriptionRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AssociationTypeRequestRequest(pydantic_v1.BaseModel):
+class AssociationTypeRequestRequest(UniversalBaseModel):
source_object_class: ObjectClassDescriptionRequest
target_object_classes: typing.List[ObjectClassDescriptionRequest]
remote_key_name: str
@@ -17,20 +16,11 @@ class AssociationTypeRequestRequest(pydantic_v1.BaseModel):
cardinality: typing.Optional[CardinalityEnum]
is_required: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/async_passthrough_reciept.py b/src/merge/resources/crm/types/async_passthrough_reciept.py
index 2cc33210..43dc5284 100644
--- a/src/merge/resources/crm/types/async_passthrough_reciept.py
+++ b/src/merge/resources/crm/types/async_passthrough_reciept.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AsyncPassthroughReciept(pydantic_v1.BaseModel):
+class AsyncPassthroughReciept(UniversalBaseModel):
async_passthrough_receipt_id: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/audit_log_event.py b/src/merge/resources/crm/types/audit_log_event.py
index 051c0286..b57101fc 100644
--- a/src/merge/resources/crm/types/audit_log_event.py
+++ b/src/merge/resources/crm/types/audit_log_event.py
@@ -1,27 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .audit_log_event_event_type import AuditLogEventEventType
+import pydantic
from .audit_log_event_role import AuditLogEventRole
+from .audit_log_event_event_type import AuditLogEventEventType
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AuditLogEvent(pydantic_v1.BaseModel):
+class AuditLogEvent(UniversalBaseModel):
id: typing.Optional[str]
- user_name: typing.Optional[str] = pydantic_v1.Field()
+ user_name: typing.Optional[str] = pydantic.Field()
"""
The User's full name at the time of this Event occurring.
"""
- user_email: typing.Optional[str] = pydantic_v1.Field()
+ user_email: typing.Optional[str] = pydantic.Field()
"""
The User's email at the time of this Event occurring.
"""
- role: AuditLogEventRole = pydantic_v1.Field()
+ role: AuditLogEventRole = pydantic.Field()
"""
Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.
@@ -34,7 +34,7 @@ class AuditLogEvent(pydantic_v1.BaseModel):
"""
ip_address: str
- event_type: AuditLogEventEventType = pydantic_v1.Field()
+ event_type: AuditLogEventEventType = pydantic.Field()
"""
Designates the type of event that occurred.
@@ -81,20 +81,11 @@ class AuditLogEvent(pydantic_v1.BaseModel):
event_description: str
created_at: typing.Optional[dt.datetime]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/audit_log_event_event_type.py b/src/merge/resources/crm/types/audit_log_event_event_type.py
index f9c9d2b3..f9d43eed 100644
--- a/src/merge/resources/crm/types/audit_log_event_event_type.py
+++ b/src/merge/resources/crm/types/audit_log_event_event_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .event_type_enum import EventTypeEnum
AuditLogEventEventType = typing.Union[EventTypeEnum, str]
diff --git a/src/merge/resources/crm/types/audit_log_event_role.py b/src/merge/resources/crm/types/audit_log_event_role.py
index fe91ed6f..83ecd93a 100644
--- a/src/merge/resources/crm/types/audit_log_event_role.py
+++ b/src/merge/resources/crm/types/audit_log_event_role.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .role_enum import RoleEnum
AuditLogEventRole = typing.Union[RoleEnum, str]
diff --git a/src/merge/resources/crm/types/available_actions.py b/src/merge/resources/crm/types/available_actions.py
index bbd94581..5f164db6 100644
--- a/src/merge/resources/crm/types/available_actions.py
+++ b/src/merge/resources/crm/types/available_actions.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+import typing
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AvailableActions(pydantic_v1.BaseModel):
+class AvailableActions(UniversalBaseModel):
"""
# The AvailableActions Object
@@ -26,20 +25,11 @@ class AvailableActions(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/cardinality_enum.py b/src/merge/resources/crm/types/cardinality_enum.py
index 5037f78e..d98d5791 100644
--- a/src/merge/resources/crm/types/cardinality_enum.py
+++ b/src/merge/resources/crm/types/cardinality_enum.py
@@ -1,36 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CardinalityEnum(str, enum.Enum):
- """
- - `ONE_TO_ONE` - ONE_TO_ONE
- - `MANY_TO_ONE` - MANY_TO_ONE
- - `MANY_TO_MANY` - MANY_TO_MANY
- - `ONE_TO_MANY` - ONE_TO_MANY
- """
-
- ONE_TO_ONE = "ONE_TO_ONE"
- MANY_TO_ONE = "MANY_TO_ONE"
- MANY_TO_MANY = "MANY_TO_MANY"
- ONE_TO_MANY = "ONE_TO_MANY"
-
- def visit(
- self,
- one_to_one: typing.Callable[[], T_Result],
- many_to_one: typing.Callable[[], T_Result],
- many_to_many: typing.Callable[[], T_Result],
- one_to_many: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CardinalityEnum.ONE_TO_ONE:
- return one_to_one()
- if self is CardinalityEnum.MANY_TO_ONE:
- return many_to_one()
- if self is CardinalityEnum.MANY_TO_MANY:
- return many_to_many()
- if self is CardinalityEnum.ONE_TO_MANY:
- return one_to_many()
+CardinalityEnum = typing.Union[typing.Literal["ONE_TO_ONE", "MANY_TO_ONE", "MANY_TO_MANY", "ONE_TO_MANY"], typing.Any]
diff --git a/src/merge/resources/crm/types/categories_enum.py b/src/merge/resources/crm/types/categories_enum.py
index ee5cac33..14d064dd 100644
--- a/src/merge/resources/crm/types/categories_enum.py
+++ b/src/merge/resources/crm/types/categories_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoriesEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoriesEnum.HRIS:
- return hris()
- if self is CategoriesEnum.ATS:
- return ats()
- if self is CategoriesEnum.ACCOUNTING:
- return accounting()
- if self is CategoriesEnum.TICKETING:
- return ticketing()
- if self is CategoriesEnum.CRM:
- return crm()
- if self is CategoriesEnum.MKTG:
- return mktg()
- if self is CategoriesEnum.FILESTORAGE:
- return filestorage()
+CategoriesEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/crm/types/category_enum.py b/src/merge/resources/crm/types/category_enum.py
index ad5a0688..597342a8 100644
--- a/src/merge/resources/crm/types/category_enum.py
+++ b/src/merge/resources/crm/types/category_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoryEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoryEnum.HRIS:
- return hris()
- if self is CategoryEnum.ATS:
- return ats()
- if self is CategoryEnum.ACCOUNTING:
- return accounting()
- if self is CategoryEnum.TICKETING:
- return ticketing()
- if self is CategoryEnum.CRM:
- return crm()
- if self is CategoryEnum.MKTG:
- return mktg()
- if self is CategoryEnum.FILESTORAGE:
- return filestorage()
+CategoryEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/crm/types/common_model_scope_api.py b/src/merge/resources/crm/types/common_model_scope_api.py
index d6fdec56..c6a178b1 100644
--- a/src/merge/resources/crm/types/common_model_scope_api.py
+++ b/src/merge/resources/crm/types/common_model_scope_api.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .individual_common_model_scope_deserializer import IndividualCommonModelScopeDeserializer
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CommonModelScopeApi(pydantic_v1.BaseModel):
- common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic_v1.Field()
+class CommonModelScopeApi(UniversalBaseModel):
+ common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic.Field()
"""
The common models you want to update the scopes for
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/common_model_scopes_body_request.py b/src/merge/resources/crm/types/common_model_scopes_body_request.py
index e956cbdc..305ab44c 100644
--- a/src/merge/resources/crm/types/common_model_scopes_body_request.py
+++ b/src/merge/resources/crm/types/common_model_scopes_body_request.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .enabled_actions_enum import EnabledActionsEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CommonModelScopesBodyRequest(pydantic_v1.BaseModel):
+class CommonModelScopesBodyRequest(UniversalBaseModel):
model_id: str
enabled_actions: typing.List[EnabledActionsEnum]
disabled_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/contact.py b/src/merge/resources/crm/types/contact.py
index c1916f05..a2d71557 100644
--- a/src/merge/resources/crm/types/contact.py
+++ b/src/merge/resources/crm/types/contact.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .address import Address
+import pydantic
+import datetime as dt
from .contact_account import ContactAccount
from .contact_owner import ContactOwner
+from .address import Address
from .email_address import EmailAddress
from .phone_number import PhoneNumber
from .remote_data import RemoteData
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Contact(pydantic_v1.BaseModel):
+class Contact(UniversalBaseModel):
"""
# The Contact Object
@@ -28,37 +28,37 @@ class Contact(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The contact's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The contact's last name.
"""
- account: typing.Optional[ContactAccount] = pydantic_v1.Field()
+ account: typing.Optional[ContactAccount] = pydantic.Field()
"""
The contact's account.
"""
- owner: typing.Optional[ContactOwner] = pydantic_v1.Field()
+ owner: typing.Optional[ContactOwner] = pydantic.Field()
"""
The contact's owner.
"""
@@ -66,35 +66,26 @@ class Contact(pydantic_v1.BaseModel):
addresses: typing.Optional[typing.List[Address]]
email_addresses: typing.Optional[typing.List[EmailAddress]]
phone_numbers: typing.Optional[typing.List[PhoneNumber]]
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the contact's last activity occurred.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's contact was created.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/contact_account.py b/src/merge/resources/crm/types/contact_account.py
index f21ef820..b58782ef 100644
--- a/src/merge/resources/crm/types/contact_account.py
+++ b/src/merge/resources/crm/types/contact_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ContactAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/contact_owner.py b/src/merge/resources/crm/types/contact_owner.py
index 24fc6dc1..5e4bd7c5 100644
--- a/src/merge/resources/crm/types/contact_owner.py
+++ b/src/merge/resources/crm/types/contact_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
ContactOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/contact_request.py b/src/merge/resources/crm/types/contact_request.py
index ef7b0827..82ec878f 100644
--- a/src/merge/resources/crm/types/contact_request.py
+++ b/src/merge/resources/crm/types/contact_request.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .address_request import AddressRequest
+import pydantic
from .contact_request_account import ContactRequestAccount
from .contact_request_owner import ContactRequestOwner
+from .address_request import AddressRequest
from .email_address_request import EmailAddressRequest
from .phone_number_request import PhoneNumberRequest
+import datetime as dt
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ContactRequest(pydantic_v1.BaseModel):
+class ContactRequest(UniversalBaseModel):
"""
# The Contact Object
@@ -26,22 +26,22 @@ class ContactRequest(pydantic_v1.BaseModel):
TODO
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The contact's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The contact's last name.
"""
- account: typing.Optional[ContactRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[ContactRequestAccount] = pydantic.Field()
"""
The contact's account.
"""
- owner: typing.Optional[ContactRequestOwner] = pydantic_v1.Field()
+ owner: typing.Optional[ContactRequestOwner] = pydantic.Field()
"""
The contact's owner.
"""
@@ -49,29 +49,20 @@ class ContactRequest(pydantic_v1.BaseModel):
addresses: typing.Optional[typing.List[AddressRequest]]
email_addresses: typing.Optional[typing.List[EmailAddressRequest]]
phone_numbers: typing.Optional[typing.List[PhoneNumberRequest]]
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the contact's last activity occurred.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/contact_request_account.py b/src/merge/resources/crm/types/contact_request_account.py
index 449187af..89a6048f 100644
--- a/src/merge/resources/crm/types/contact_request_account.py
+++ b/src/merge/resources/crm/types/contact_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ContactRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/contact_request_owner.py b/src/merge/resources/crm/types/contact_request_owner.py
index c41de073..594f76bc 100644
--- a/src/merge/resources/crm/types/contact_request_owner.py
+++ b/src/merge/resources/crm/types/contact_request_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
ContactRequestOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/country_enum.py b/src/merge/resources/crm/types/country_enum.py
index 7e6b7a0e..3aab022f 100644
--- a/src/merge/resources/crm/types/country_enum.py
+++ b/src/merge/resources/crm/types/country_enum.py
@@ -1,1261 +1,258 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CountryEnum(str, enum.Enum):
- """
- - `AF` - Afghanistan
- - `AX` - Γ
land Islands
- - `AL` - Albania
- - `DZ` - Algeria
- - `AS` - American Samoa
- - `AD` - Andorra
- - `AO` - Angola
- - `AI` - Anguilla
- - `AQ` - Antarctica
- - `AG` - Antigua and Barbuda
- - `AR` - Argentina
- - `AM` - Armenia
- - `AW` - Aruba
- - `AU` - Australia
- - `AT` - Austria
- - `AZ` - Azerbaijan
- - `BS` - Bahamas
- - `BH` - Bahrain
- - `BD` - Bangladesh
- - `BB` - Barbados
- - `BY` - Belarus
- - `BE` - Belgium
- - `BZ` - Belize
- - `BJ` - Benin
- - `BM` - Bermuda
- - `BT` - Bhutan
- - `BO` - Bolivia
- - `BQ` - Bonaire, Sint Eustatius and Saba
- - `BA` - Bosnia and Herzegovina
- - `BW` - Botswana
- - `BV` - Bouvet Island
- - `BR` - Brazil
- - `IO` - British Indian Ocean Territory
- - `BN` - Brunei
- - `BG` - Bulgaria
- - `BF` - Burkina Faso
- - `BI` - Burundi
- - `CV` - Cabo Verde
- - `KH` - Cambodia
- - `CM` - Cameroon
- - `CA` - Canada
- - `KY` - Cayman Islands
- - `CF` - Central African Republic
- - `TD` - Chad
- - `CL` - Chile
- - `CN` - China
- - `CX` - Christmas Island
- - `CC` - Cocos (Keeling) Islands
- - `CO` - Colombia
- - `KM` - Comoros
- - `CG` - Congo
- - `CD` - Congo (the Democratic Republic of the)
- - `CK` - Cook Islands
- - `CR` - Costa Rica
- - `CI` - CΓ΄te d'Ivoire
- - `HR` - Croatia
- - `CU` - Cuba
- - `CW` - CuraΓ§ao
- - `CY` - Cyprus
- - `CZ` - Czechia
- - `DK` - Denmark
- - `DJ` - Djibouti
- - `DM` - Dominica
- - `DO` - Dominican Republic
- - `EC` - Ecuador
- - `EG` - Egypt
- - `SV` - El Salvador
- - `GQ` - Equatorial Guinea
- - `ER` - Eritrea
- - `EE` - Estonia
- - `SZ` - Eswatini
- - `ET` - Ethiopia
- - `FK` - Falkland Islands (Malvinas)
- - `FO` - Faroe Islands
- - `FJ` - Fiji
- - `FI` - Finland
- - `FR` - France
- - `GF` - French Guiana
- - `PF` - French Polynesia
- - `TF` - French Southern Territories
- - `GA` - Gabon
- - `GM` - Gambia
- - `GE` - Georgia
- - `DE` - Germany
- - `GH` - Ghana
- - `GI` - Gibraltar
- - `GR` - Greece
- - `GL` - Greenland
- - `GD` - Grenada
- - `GP` - Guadeloupe
- - `GU` - Guam
- - `GT` - Guatemala
- - `GG` - Guernsey
- - `GN` - Guinea
- - `GW` - Guinea-Bissau
- - `GY` - Guyana
- - `HT` - Haiti
- - `HM` - Heard Island and McDonald Islands
- - `VA` - Holy See
- - `HN` - Honduras
- - `HK` - Hong Kong
- - `HU` - Hungary
- - `IS` - Iceland
- - `IN` - India
- - `ID` - Indonesia
- - `IR` - Iran
- - `IQ` - Iraq
- - `IE` - Ireland
- - `IM` - Isle of Man
- - `IL` - Israel
- - `IT` - Italy
- - `JM` - Jamaica
- - `JP` - Japan
- - `JE` - Jersey
- - `JO` - Jordan
- - `KZ` - Kazakhstan
- - `KE` - Kenya
- - `KI` - Kiribati
- - `KW` - Kuwait
- - `KG` - Kyrgyzstan
- - `LA` - Laos
- - `LV` - Latvia
- - `LB` - Lebanon
- - `LS` - Lesotho
- - `LR` - Liberia
- - `LY` - Libya
- - `LI` - Liechtenstein
- - `LT` - Lithuania
- - `LU` - Luxembourg
- - `MO` - Macao
- - `MG` - Madagascar
- - `MW` - Malawi
- - `MY` - Malaysia
- - `MV` - Maldives
- - `ML` - Mali
- - `MT` - Malta
- - `MH` - Marshall Islands
- - `MQ` - Martinique
- - `MR` - Mauritania
- - `MU` - Mauritius
- - `YT` - Mayotte
- - `MX` - Mexico
- - `FM` - Micronesia (Federated States of)
- - `MD` - Moldova
- - `MC` - Monaco
- - `MN` - Mongolia
- - `ME` - Montenegro
- - `MS` - Montserrat
- - `MA` - Morocco
- - `MZ` - Mozambique
- - `MM` - Myanmar
- - `NA` - Namibia
- - `NR` - Nauru
- - `NP` - Nepal
- - `NL` - Netherlands
- - `NC` - New Caledonia
- - `NZ` - New Zealand
- - `NI` - Nicaragua
- - `NE` - Niger
- - `NG` - Nigeria
- - `NU` - Niue
- - `NF` - Norfolk Island
- - `KP` - North Korea
- - `MK` - North Macedonia
- - `MP` - Northern Mariana Islands
- - `NO` - Norway
- - `OM` - Oman
- - `PK` - Pakistan
- - `PW` - Palau
- - `PS` - Palestine, State of
- - `PA` - Panama
- - `PG` - Papua New Guinea
- - `PY` - Paraguay
- - `PE` - Peru
- - `PH` - Philippines
- - `PN` - Pitcairn
- - `PL` - Poland
- - `PT` - Portugal
- - `PR` - Puerto Rico
- - `QA` - Qatar
- - `RE` - RΓ©union
- - `RO` - Romania
- - `RU` - Russia
- - `RW` - Rwanda
- - `BL` - Saint BarthΓ©lemy
- - `SH` - Saint Helena, Ascension and Tristan da Cunha
- - `KN` - Saint Kitts and Nevis
- - `LC` - Saint Lucia
- - `MF` - Saint Martin (French part)
- - `PM` - Saint Pierre and Miquelon
- - `VC` - Saint Vincent and the Grenadines
- - `WS` - Samoa
- - `SM` - San Marino
- - `ST` - Sao Tome and Principe
- - `SA` - Saudi Arabia
- - `SN` - Senegal
- - `RS` - Serbia
- - `SC` - Seychelles
- - `SL` - Sierra Leone
- - `SG` - Singapore
- - `SX` - Sint Maarten (Dutch part)
- - `SK` - Slovakia
- - `SI` - Slovenia
- - `SB` - Solomon Islands
- - `SO` - Somalia
- - `ZA` - South Africa
- - `GS` - South Georgia and the South Sandwich Islands
- - `KR` - South Korea
- - `SS` - South Sudan
- - `ES` - Spain
- - `LK` - Sri Lanka
- - `SD` - Sudan
- - `SR` - Suriname
- - `SJ` - Svalbard and Jan Mayen
- - `SE` - Sweden
- - `CH` - Switzerland
- - `SY` - Syria
- - `TW` - Taiwan
- - `TJ` - Tajikistan
- - `TZ` - Tanzania
- - `TH` - Thailand
- - `TL` - Timor-Leste
- - `TG` - Togo
- - `TK` - Tokelau
- - `TO` - Tonga
- - `TT` - Trinidad and Tobago
- - `TN` - Tunisia
- - `TR` - Turkey
- - `TM` - Turkmenistan
- - `TC` - Turks and Caicos Islands
- - `TV` - Tuvalu
- - `UG` - Uganda
- - `UA` - Ukraine
- - `AE` - United Arab Emirates
- - `GB` - United Kingdom
- - `UM` - United States Minor Outlying Islands
- - `US` - United States of America
- - `UY` - Uruguay
- - `UZ` - Uzbekistan
- - `VU` - Vanuatu
- - `VE` - Venezuela
- - `VN` - Vietnam
- - `VG` - Virgin Islands (British)
- - `VI` - Virgin Islands (U.S.)
- - `WF` - Wallis and Futuna
- - `EH` - Western Sahara
- - `YE` - Yemen
- - `ZM` - Zambia
- - `ZW` - Zimbabwe
- """
-
- AF = "AF"
- AX = "AX"
- AL = "AL"
- DZ = "DZ"
- AS = "AS"
- AD = "AD"
- AO = "AO"
- AI = "AI"
- AQ = "AQ"
- AG = "AG"
- AR = "AR"
- AM = "AM"
- AW = "AW"
- AU = "AU"
- AT = "AT"
- AZ = "AZ"
- BS = "BS"
- BH = "BH"
- BD = "BD"
- BB = "BB"
- BY = "BY"
- BE = "BE"
- BZ = "BZ"
- BJ = "BJ"
- BM = "BM"
- BT = "BT"
- BO = "BO"
- BQ = "BQ"
- BA = "BA"
- BW = "BW"
- BV = "BV"
- BR = "BR"
- IO = "IO"
- BN = "BN"
- BG = "BG"
- BF = "BF"
- BI = "BI"
- CV = "CV"
- KH = "KH"
- CM = "CM"
- CA = "CA"
- KY = "KY"
- CF = "CF"
- TD = "TD"
- CL = "CL"
- CN = "CN"
- CX = "CX"
- CC = "CC"
- CO = "CO"
- KM = "KM"
- CG = "CG"
- CD = "CD"
- CK = "CK"
- CR = "CR"
- CI = "CI"
- HR = "HR"
- CU = "CU"
- CW = "CW"
- CY = "CY"
- CZ = "CZ"
- DK = "DK"
- DJ = "DJ"
- DM = "DM"
- DO = "DO"
- EC = "EC"
- EG = "EG"
- SV = "SV"
- GQ = "GQ"
- ER = "ER"
- EE = "EE"
- SZ = "SZ"
- ET = "ET"
- FK = "FK"
- FO = "FO"
- FJ = "FJ"
- FI = "FI"
- FR = "FR"
- GF = "GF"
- PF = "PF"
- TF = "TF"
- GA = "GA"
- GM = "GM"
- GE = "GE"
- DE = "DE"
- GH = "GH"
- GI = "GI"
- GR = "GR"
- GL = "GL"
- GD = "GD"
- GP = "GP"
- GU = "GU"
- GT = "GT"
- GG = "GG"
- GN = "GN"
- GW = "GW"
- GY = "GY"
- HT = "HT"
- HM = "HM"
- VA = "VA"
- HN = "HN"
- HK = "HK"
- HU = "HU"
- IS = "IS"
- IN = "IN"
- ID = "ID"
- IR = "IR"
- IQ = "IQ"
- IE = "IE"
- IM = "IM"
- IL = "IL"
- IT = "IT"
- JM = "JM"
- JP = "JP"
- JE = "JE"
- JO = "JO"
- KZ = "KZ"
- KE = "KE"
- KI = "KI"
- KW = "KW"
- KG = "KG"
- LA = "LA"
- LV = "LV"
- LB = "LB"
- LS = "LS"
- LR = "LR"
- LY = "LY"
- LI = "LI"
- LT = "LT"
- LU = "LU"
- MO = "MO"
- MG = "MG"
- MW = "MW"
- MY = "MY"
- MV = "MV"
- ML = "ML"
- MT = "MT"
- MH = "MH"
- MQ = "MQ"
- MR = "MR"
- MU = "MU"
- YT = "YT"
- MX = "MX"
- FM = "FM"
- MD = "MD"
- MC = "MC"
- MN = "MN"
- ME = "ME"
- MS = "MS"
- MA = "MA"
- MZ = "MZ"
- MM = "MM"
- NA = "NA"
- NR = "NR"
- NP = "NP"
- NL = "NL"
- NC = "NC"
- NZ = "NZ"
- NI = "NI"
- NE = "NE"
- NG = "NG"
- NU = "NU"
- NF = "NF"
- KP = "KP"
- MK = "MK"
- MP = "MP"
- NO = "NO"
- OM = "OM"
- PK = "PK"
- PW = "PW"
- PS = "PS"
- PA = "PA"
- PG = "PG"
- PY = "PY"
- PE = "PE"
- PH = "PH"
- PN = "PN"
- PL = "PL"
- PT = "PT"
- PR = "PR"
- QA = "QA"
- RE = "RE"
- RO = "RO"
- RU = "RU"
- RW = "RW"
- BL = "BL"
- SH = "SH"
- KN = "KN"
- LC = "LC"
- MF = "MF"
- PM = "PM"
- VC = "VC"
- WS = "WS"
- SM = "SM"
- ST = "ST"
- SA = "SA"
- SN = "SN"
- RS = "RS"
- SC = "SC"
- SL = "SL"
- SG = "SG"
- SX = "SX"
- SK = "SK"
- SI = "SI"
- SB = "SB"
- SO = "SO"
- ZA = "ZA"
- GS = "GS"
- KR = "KR"
- SS = "SS"
- ES = "ES"
- LK = "LK"
- SD = "SD"
- SR = "SR"
- SJ = "SJ"
- SE = "SE"
- CH = "CH"
- SY = "SY"
- TW = "TW"
- TJ = "TJ"
- TZ = "TZ"
- TH = "TH"
- TL = "TL"
- TG = "TG"
- TK = "TK"
- TO = "TO"
- TT = "TT"
- TN = "TN"
- TR = "TR"
- TM = "TM"
- TC = "TC"
- TV = "TV"
- UG = "UG"
- UA = "UA"
- AE = "AE"
- GB = "GB"
- UM = "UM"
- US = "US"
- UY = "UY"
- UZ = "UZ"
- VU = "VU"
- VE = "VE"
- VN = "VN"
- VG = "VG"
- VI = "VI"
- WF = "WF"
- EH = "EH"
- YE = "YE"
- ZM = "ZM"
- ZW = "ZW"
-
- def visit(
- self,
- af: typing.Callable[[], T_Result],
- ax: typing.Callable[[], T_Result],
- al: typing.Callable[[], T_Result],
- dz: typing.Callable[[], T_Result],
- as_: typing.Callable[[], T_Result],
- ad: typing.Callable[[], T_Result],
- ao: typing.Callable[[], T_Result],
- ai: typing.Callable[[], T_Result],
- aq: typing.Callable[[], T_Result],
- ag: typing.Callable[[], T_Result],
- ar: typing.Callable[[], T_Result],
- am: typing.Callable[[], T_Result],
- aw: typing.Callable[[], T_Result],
- au: typing.Callable[[], T_Result],
- at: typing.Callable[[], T_Result],
- az: typing.Callable[[], T_Result],
- bs: typing.Callable[[], T_Result],
- bh: typing.Callable[[], T_Result],
- bd: typing.Callable[[], T_Result],
- bb: typing.Callable[[], T_Result],
- by: typing.Callable[[], T_Result],
- be: typing.Callable[[], T_Result],
- bz: typing.Callable[[], T_Result],
- bj: typing.Callable[[], T_Result],
- bm: typing.Callable[[], T_Result],
- bt: typing.Callable[[], T_Result],
- bo: typing.Callable[[], T_Result],
- bq: typing.Callable[[], T_Result],
- ba: typing.Callable[[], T_Result],
- bw: typing.Callable[[], T_Result],
- bv: typing.Callable[[], T_Result],
- br: typing.Callable[[], T_Result],
- io: typing.Callable[[], T_Result],
- bn: typing.Callable[[], T_Result],
- bg: typing.Callable[[], T_Result],
- bf: typing.Callable[[], T_Result],
- bi: typing.Callable[[], T_Result],
- cv: typing.Callable[[], T_Result],
- kh: typing.Callable[[], T_Result],
- cm: typing.Callable[[], T_Result],
- ca: typing.Callable[[], T_Result],
- ky: typing.Callable[[], T_Result],
- cf: typing.Callable[[], T_Result],
- td: typing.Callable[[], T_Result],
- cl: typing.Callable[[], T_Result],
- cn: typing.Callable[[], T_Result],
- cx: typing.Callable[[], T_Result],
- cc: typing.Callable[[], T_Result],
- co: typing.Callable[[], T_Result],
- km: typing.Callable[[], T_Result],
- cg: typing.Callable[[], T_Result],
- cd: typing.Callable[[], T_Result],
- ck: typing.Callable[[], T_Result],
- cr: typing.Callable[[], T_Result],
- ci: typing.Callable[[], T_Result],
- hr: typing.Callable[[], T_Result],
- cu: typing.Callable[[], T_Result],
- cw: typing.Callable[[], T_Result],
- cy: typing.Callable[[], T_Result],
- cz: typing.Callable[[], T_Result],
- dk: typing.Callable[[], T_Result],
- dj: typing.Callable[[], T_Result],
- dm: typing.Callable[[], T_Result],
- do: typing.Callable[[], T_Result],
- ec: typing.Callable[[], T_Result],
- eg: typing.Callable[[], T_Result],
- sv: typing.Callable[[], T_Result],
- gq: typing.Callable[[], T_Result],
- er: typing.Callable[[], T_Result],
- ee: typing.Callable[[], T_Result],
- sz: typing.Callable[[], T_Result],
- et: typing.Callable[[], T_Result],
- fk: typing.Callable[[], T_Result],
- fo: typing.Callable[[], T_Result],
- fj: typing.Callable[[], T_Result],
- fi: typing.Callable[[], T_Result],
- fr: typing.Callable[[], T_Result],
- gf: typing.Callable[[], T_Result],
- pf: typing.Callable[[], T_Result],
- tf: typing.Callable[[], T_Result],
- ga: typing.Callable[[], T_Result],
- gm: typing.Callable[[], T_Result],
- ge: typing.Callable[[], T_Result],
- de: typing.Callable[[], T_Result],
- gh: typing.Callable[[], T_Result],
- gi: typing.Callable[[], T_Result],
- gr: typing.Callable[[], T_Result],
- gl: typing.Callable[[], T_Result],
- gd: typing.Callable[[], T_Result],
- gp: typing.Callable[[], T_Result],
- gu: typing.Callable[[], T_Result],
- gt: typing.Callable[[], T_Result],
- gg: typing.Callable[[], T_Result],
- gn: typing.Callable[[], T_Result],
- gw: typing.Callable[[], T_Result],
- gy: typing.Callable[[], T_Result],
- ht: typing.Callable[[], T_Result],
- hm: typing.Callable[[], T_Result],
- va: typing.Callable[[], T_Result],
- hn: typing.Callable[[], T_Result],
- hk: typing.Callable[[], T_Result],
- hu: typing.Callable[[], T_Result],
- is_: typing.Callable[[], T_Result],
- in_: typing.Callable[[], T_Result],
- id: typing.Callable[[], T_Result],
- ir: typing.Callable[[], T_Result],
- iq: typing.Callable[[], T_Result],
- ie: typing.Callable[[], T_Result],
- im: typing.Callable[[], T_Result],
- il: typing.Callable[[], T_Result],
- it: typing.Callable[[], T_Result],
- jm: typing.Callable[[], T_Result],
- jp: typing.Callable[[], T_Result],
- je: typing.Callable[[], T_Result],
- jo: typing.Callable[[], T_Result],
- kz: typing.Callable[[], T_Result],
- ke: typing.Callable[[], T_Result],
- ki: typing.Callable[[], T_Result],
- kw: typing.Callable[[], T_Result],
- kg: typing.Callable[[], T_Result],
- la: typing.Callable[[], T_Result],
- lv: typing.Callable[[], T_Result],
- lb: typing.Callable[[], T_Result],
- ls: typing.Callable[[], T_Result],
- lr: typing.Callable[[], T_Result],
- ly: typing.Callable[[], T_Result],
- li: typing.Callable[[], T_Result],
- lt: typing.Callable[[], T_Result],
- lu: typing.Callable[[], T_Result],
- mo: typing.Callable[[], T_Result],
- mg: typing.Callable[[], T_Result],
- mw: typing.Callable[[], T_Result],
- my: typing.Callable[[], T_Result],
- mv: typing.Callable[[], T_Result],
- ml: typing.Callable[[], T_Result],
- mt: typing.Callable[[], T_Result],
- mh: typing.Callable[[], T_Result],
- mq: typing.Callable[[], T_Result],
- mr: typing.Callable[[], T_Result],
- mu: typing.Callable[[], T_Result],
- yt: typing.Callable[[], T_Result],
- mx: typing.Callable[[], T_Result],
- fm: typing.Callable[[], T_Result],
- md: typing.Callable[[], T_Result],
- mc: typing.Callable[[], T_Result],
- mn: typing.Callable[[], T_Result],
- me: typing.Callable[[], T_Result],
- ms: typing.Callable[[], T_Result],
- ma: typing.Callable[[], T_Result],
- mz: typing.Callable[[], T_Result],
- mm: typing.Callable[[], T_Result],
- na: typing.Callable[[], T_Result],
- nr: typing.Callable[[], T_Result],
- np: typing.Callable[[], T_Result],
- nl: typing.Callable[[], T_Result],
- nc: typing.Callable[[], T_Result],
- nz: typing.Callable[[], T_Result],
- ni: typing.Callable[[], T_Result],
- ne: typing.Callable[[], T_Result],
- ng: typing.Callable[[], T_Result],
- nu: typing.Callable[[], T_Result],
- nf: typing.Callable[[], T_Result],
- kp: typing.Callable[[], T_Result],
- mk: typing.Callable[[], T_Result],
- mp: typing.Callable[[], T_Result],
- no: typing.Callable[[], T_Result],
- om: typing.Callable[[], T_Result],
- pk: typing.Callable[[], T_Result],
- pw: typing.Callable[[], T_Result],
- ps: typing.Callable[[], T_Result],
- pa: typing.Callable[[], T_Result],
- pg: typing.Callable[[], T_Result],
- py: typing.Callable[[], T_Result],
- pe: typing.Callable[[], T_Result],
- ph: typing.Callable[[], T_Result],
- pn: typing.Callable[[], T_Result],
- pl: typing.Callable[[], T_Result],
- pt: typing.Callable[[], T_Result],
- pr: typing.Callable[[], T_Result],
- qa: typing.Callable[[], T_Result],
- re: typing.Callable[[], T_Result],
- ro: typing.Callable[[], T_Result],
- ru: typing.Callable[[], T_Result],
- rw: typing.Callable[[], T_Result],
- bl: typing.Callable[[], T_Result],
- sh: typing.Callable[[], T_Result],
- kn: typing.Callable[[], T_Result],
- lc: typing.Callable[[], T_Result],
- mf: typing.Callable[[], T_Result],
- pm: typing.Callable[[], T_Result],
- vc: typing.Callable[[], T_Result],
- ws: typing.Callable[[], T_Result],
- sm: typing.Callable[[], T_Result],
- st: typing.Callable[[], T_Result],
- sa: typing.Callable[[], T_Result],
- sn: typing.Callable[[], T_Result],
- rs: typing.Callable[[], T_Result],
- sc: typing.Callable[[], T_Result],
- sl: typing.Callable[[], T_Result],
- sg: typing.Callable[[], T_Result],
- sx: typing.Callable[[], T_Result],
- sk: typing.Callable[[], T_Result],
- si: typing.Callable[[], T_Result],
- sb: typing.Callable[[], T_Result],
- so: typing.Callable[[], T_Result],
- za: typing.Callable[[], T_Result],
- gs: typing.Callable[[], T_Result],
- kr: typing.Callable[[], T_Result],
- ss: typing.Callable[[], T_Result],
- es: typing.Callable[[], T_Result],
- lk: typing.Callable[[], T_Result],
- sd: typing.Callable[[], T_Result],
- sr: typing.Callable[[], T_Result],
- sj: typing.Callable[[], T_Result],
- se: typing.Callable[[], T_Result],
- ch: typing.Callable[[], T_Result],
- sy: typing.Callable[[], T_Result],
- tw: typing.Callable[[], T_Result],
- tj: typing.Callable[[], T_Result],
- tz: typing.Callable[[], T_Result],
- th: typing.Callable[[], T_Result],
- tl: typing.Callable[[], T_Result],
- tg: typing.Callable[[], T_Result],
- tk: typing.Callable[[], T_Result],
- to: typing.Callable[[], T_Result],
- tt: typing.Callable[[], T_Result],
- tn: typing.Callable[[], T_Result],
- tr: typing.Callable[[], T_Result],
- tm: typing.Callable[[], T_Result],
- tc: typing.Callable[[], T_Result],
- tv: typing.Callable[[], T_Result],
- ug: typing.Callable[[], T_Result],
- ua: typing.Callable[[], T_Result],
- ae: typing.Callable[[], T_Result],
- gb: typing.Callable[[], T_Result],
- um: typing.Callable[[], T_Result],
- us: typing.Callable[[], T_Result],
- uy: typing.Callable[[], T_Result],
- uz: typing.Callable[[], T_Result],
- vu: typing.Callable[[], T_Result],
- ve: typing.Callable[[], T_Result],
- vn: typing.Callable[[], T_Result],
- vg: typing.Callable[[], T_Result],
- vi: typing.Callable[[], T_Result],
- wf: typing.Callable[[], T_Result],
- eh: typing.Callable[[], T_Result],
- ye: typing.Callable[[], T_Result],
- zm: typing.Callable[[], T_Result],
- zw: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CountryEnum.AF:
- return af()
- if self is CountryEnum.AX:
- return ax()
- if self is CountryEnum.AL:
- return al()
- if self is CountryEnum.DZ:
- return dz()
- if self is CountryEnum.AS:
- return as_()
- if self is CountryEnum.AD:
- return ad()
- if self is CountryEnum.AO:
- return ao()
- if self is CountryEnum.AI:
- return ai()
- if self is CountryEnum.AQ:
- return aq()
- if self is CountryEnum.AG:
- return ag()
- if self is CountryEnum.AR:
- return ar()
- if self is CountryEnum.AM:
- return am()
- if self is CountryEnum.AW:
- return aw()
- if self is CountryEnum.AU:
- return au()
- if self is CountryEnum.AT:
- return at()
- if self is CountryEnum.AZ:
- return az()
- if self is CountryEnum.BS:
- return bs()
- if self is CountryEnum.BH:
- return bh()
- if self is CountryEnum.BD:
- return bd()
- if self is CountryEnum.BB:
- return bb()
- if self is CountryEnum.BY:
- return by()
- if self is CountryEnum.BE:
- return be()
- if self is CountryEnum.BZ:
- return bz()
- if self is CountryEnum.BJ:
- return bj()
- if self is CountryEnum.BM:
- return bm()
- if self is CountryEnum.BT:
- return bt()
- if self is CountryEnum.BO:
- return bo()
- if self is CountryEnum.BQ:
- return bq()
- if self is CountryEnum.BA:
- return ba()
- if self is CountryEnum.BW:
- return bw()
- if self is CountryEnum.BV:
- return bv()
- if self is CountryEnum.BR:
- return br()
- if self is CountryEnum.IO:
- return io()
- if self is CountryEnum.BN:
- return bn()
- if self is CountryEnum.BG:
- return bg()
- if self is CountryEnum.BF:
- return bf()
- if self is CountryEnum.BI:
- return bi()
- if self is CountryEnum.CV:
- return cv()
- if self is CountryEnum.KH:
- return kh()
- if self is CountryEnum.CM:
- return cm()
- if self is CountryEnum.CA:
- return ca()
- if self is CountryEnum.KY:
- return ky()
- if self is CountryEnum.CF:
- return cf()
- if self is CountryEnum.TD:
- return td()
- if self is CountryEnum.CL:
- return cl()
- if self is CountryEnum.CN:
- return cn()
- if self is CountryEnum.CX:
- return cx()
- if self is CountryEnum.CC:
- return cc()
- if self is CountryEnum.CO:
- return co()
- if self is CountryEnum.KM:
- return km()
- if self is CountryEnum.CG:
- return cg()
- if self is CountryEnum.CD:
- return cd()
- if self is CountryEnum.CK:
- return ck()
- if self is CountryEnum.CR:
- return cr()
- if self is CountryEnum.CI:
- return ci()
- if self is CountryEnum.HR:
- return hr()
- if self is CountryEnum.CU:
- return cu()
- if self is CountryEnum.CW:
- return cw()
- if self is CountryEnum.CY:
- return cy()
- if self is CountryEnum.CZ:
- return cz()
- if self is CountryEnum.DK:
- return dk()
- if self is CountryEnum.DJ:
- return dj()
- if self is CountryEnum.DM:
- return dm()
- if self is CountryEnum.DO:
- return do()
- if self is CountryEnum.EC:
- return ec()
- if self is CountryEnum.EG:
- return eg()
- if self is CountryEnum.SV:
- return sv()
- if self is CountryEnum.GQ:
- return gq()
- if self is CountryEnum.ER:
- return er()
- if self is CountryEnum.EE:
- return ee()
- if self is CountryEnum.SZ:
- return sz()
- if self is CountryEnum.ET:
- return et()
- if self is CountryEnum.FK:
- return fk()
- if self is CountryEnum.FO:
- return fo()
- if self is CountryEnum.FJ:
- return fj()
- if self is CountryEnum.FI:
- return fi()
- if self is CountryEnum.FR:
- return fr()
- if self is CountryEnum.GF:
- return gf()
- if self is CountryEnum.PF:
- return pf()
- if self is CountryEnum.TF:
- return tf()
- if self is CountryEnum.GA:
- return ga()
- if self is CountryEnum.GM:
- return gm()
- if self is CountryEnum.GE:
- return ge()
- if self is CountryEnum.DE:
- return de()
- if self is CountryEnum.GH:
- return gh()
- if self is CountryEnum.GI:
- return gi()
- if self is CountryEnum.GR:
- return gr()
- if self is CountryEnum.GL:
- return gl()
- if self is CountryEnum.GD:
- return gd()
- if self is CountryEnum.GP:
- return gp()
- if self is CountryEnum.GU:
- return gu()
- if self is CountryEnum.GT:
- return gt()
- if self is CountryEnum.GG:
- return gg()
- if self is CountryEnum.GN:
- return gn()
- if self is CountryEnum.GW:
- return gw()
- if self is CountryEnum.GY:
- return gy()
- if self is CountryEnum.HT:
- return ht()
- if self is CountryEnum.HM:
- return hm()
- if self is CountryEnum.VA:
- return va()
- if self is CountryEnum.HN:
- return hn()
- if self is CountryEnum.HK:
- return hk()
- if self is CountryEnum.HU:
- return hu()
- if self is CountryEnum.IS:
- return is_()
- if self is CountryEnum.IN:
- return in_()
- if self is CountryEnum.ID:
- return id()
- if self is CountryEnum.IR:
- return ir()
- if self is CountryEnum.IQ:
- return iq()
- if self is CountryEnum.IE:
- return ie()
- if self is CountryEnum.IM:
- return im()
- if self is CountryEnum.IL:
- return il()
- if self is CountryEnum.IT:
- return it()
- if self is CountryEnum.JM:
- return jm()
- if self is CountryEnum.JP:
- return jp()
- if self is CountryEnum.JE:
- return je()
- if self is CountryEnum.JO:
- return jo()
- if self is CountryEnum.KZ:
- return kz()
- if self is CountryEnum.KE:
- return ke()
- if self is CountryEnum.KI:
- return ki()
- if self is CountryEnum.KW:
- return kw()
- if self is CountryEnum.KG:
- return kg()
- if self is CountryEnum.LA:
- return la()
- if self is CountryEnum.LV:
- return lv()
- if self is CountryEnum.LB:
- return lb()
- if self is CountryEnum.LS:
- return ls()
- if self is CountryEnum.LR:
- return lr()
- if self is CountryEnum.LY:
- return ly()
- if self is CountryEnum.LI:
- return li()
- if self is CountryEnum.LT:
- return lt()
- if self is CountryEnum.LU:
- return lu()
- if self is CountryEnum.MO:
- return mo()
- if self is CountryEnum.MG:
- return mg()
- if self is CountryEnum.MW:
- return mw()
- if self is CountryEnum.MY:
- return my()
- if self is CountryEnum.MV:
- return mv()
- if self is CountryEnum.ML:
- return ml()
- if self is CountryEnum.MT:
- return mt()
- if self is CountryEnum.MH:
- return mh()
- if self is CountryEnum.MQ:
- return mq()
- if self is CountryEnum.MR:
- return mr()
- if self is CountryEnum.MU:
- return mu()
- if self is CountryEnum.YT:
- return yt()
- if self is CountryEnum.MX:
- return mx()
- if self is CountryEnum.FM:
- return fm()
- if self is CountryEnum.MD:
- return md()
- if self is CountryEnum.MC:
- return mc()
- if self is CountryEnum.MN:
- return mn()
- if self is CountryEnum.ME:
- return me()
- if self is CountryEnum.MS:
- return ms()
- if self is CountryEnum.MA:
- return ma()
- if self is CountryEnum.MZ:
- return mz()
- if self is CountryEnum.MM:
- return mm()
- if self is CountryEnum.NA:
- return na()
- if self is CountryEnum.NR:
- return nr()
- if self is CountryEnum.NP:
- return np()
- if self is CountryEnum.NL:
- return nl()
- if self is CountryEnum.NC:
- return nc()
- if self is CountryEnum.NZ:
- return nz()
- if self is CountryEnum.NI:
- return ni()
- if self is CountryEnum.NE:
- return ne()
- if self is CountryEnum.NG:
- return ng()
- if self is CountryEnum.NU:
- return nu()
- if self is CountryEnum.NF:
- return nf()
- if self is CountryEnum.KP:
- return kp()
- if self is CountryEnum.MK:
- return mk()
- if self is CountryEnum.MP:
- return mp()
- if self is CountryEnum.NO:
- return no()
- if self is CountryEnum.OM:
- return om()
- if self is CountryEnum.PK:
- return pk()
- if self is CountryEnum.PW:
- return pw()
- if self is CountryEnum.PS:
- return ps()
- if self is CountryEnum.PA:
- return pa()
- if self is CountryEnum.PG:
- return pg()
- if self is CountryEnum.PY:
- return py()
- if self is CountryEnum.PE:
- return pe()
- if self is CountryEnum.PH:
- return ph()
- if self is CountryEnum.PN:
- return pn()
- if self is CountryEnum.PL:
- return pl()
- if self is CountryEnum.PT:
- return pt()
- if self is CountryEnum.PR:
- return pr()
- if self is CountryEnum.QA:
- return qa()
- if self is CountryEnum.RE:
- return re()
- if self is CountryEnum.RO:
- return ro()
- if self is CountryEnum.RU:
- return ru()
- if self is CountryEnum.RW:
- return rw()
- if self is CountryEnum.BL:
- return bl()
- if self is CountryEnum.SH:
- return sh()
- if self is CountryEnum.KN:
- return kn()
- if self is CountryEnum.LC:
- return lc()
- if self is CountryEnum.MF:
- return mf()
- if self is CountryEnum.PM:
- return pm()
- if self is CountryEnum.VC:
- return vc()
- if self is CountryEnum.WS:
- return ws()
- if self is CountryEnum.SM:
- return sm()
- if self is CountryEnum.ST:
- return st()
- if self is CountryEnum.SA:
- return sa()
- if self is CountryEnum.SN:
- return sn()
- if self is CountryEnum.RS:
- return rs()
- if self is CountryEnum.SC:
- return sc()
- if self is CountryEnum.SL:
- return sl()
- if self is CountryEnum.SG:
- return sg()
- if self is CountryEnum.SX:
- return sx()
- if self is CountryEnum.SK:
- return sk()
- if self is CountryEnum.SI:
- return si()
- if self is CountryEnum.SB:
- return sb()
- if self is CountryEnum.SO:
- return so()
- if self is CountryEnum.ZA:
- return za()
- if self is CountryEnum.GS:
- return gs()
- if self is CountryEnum.KR:
- return kr()
- if self is CountryEnum.SS:
- return ss()
- if self is CountryEnum.ES:
- return es()
- if self is CountryEnum.LK:
- return lk()
- if self is CountryEnum.SD:
- return sd()
- if self is CountryEnum.SR:
- return sr()
- if self is CountryEnum.SJ:
- return sj()
- if self is CountryEnum.SE:
- return se()
- if self is CountryEnum.CH:
- return ch()
- if self is CountryEnum.SY:
- return sy()
- if self is CountryEnum.TW:
- return tw()
- if self is CountryEnum.TJ:
- return tj()
- if self is CountryEnum.TZ:
- return tz()
- if self is CountryEnum.TH:
- return th()
- if self is CountryEnum.TL:
- return tl()
- if self is CountryEnum.TG:
- return tg()
- if self is CountryEnum.TK:
- return tk()
- if self is CountryEnum.TO:
- return to()
- if self is CountryEnum.TT:
- return tt()
- if self is CountryEnum.TN:
- return tn()
- if self is CountryEnum.TR:
- return tr()
- if self is CountryEnum.TM:
- return tm()
- if self is CountryEnum.TC:
- return tc()
- if self is CountryEnum.TV:
- return tv()
- if self is CountryEnum.UG:
- return ug()
- if self is CountryEnum.UA:
- return ua()
- if self is CountryEnum.AE:
- return ae()
- if self is CountryEnum.GB:
- return gb()
- if self is CountryEnum.UM:
- return um()
- if self is CountryEnum.US:
- return us()
- if self is CountryEnum.UY:
- return uy()
- if self is CountryEnum.UZ:
- return uz()
- if self is CountryEnum.VU:
- return vu()
- if self is CountryEnum.VE:
- return ve()
- if self is CountryEnum.VN:
- return vn()
- if self is CountryEnum.VG:
- return vg()
- if self is CountryEnum.VI:
- return vi()
- if self is CountryEnum.WF:
- return wf()
- if self is CountryEnum.EH:
- return eh()
- if self is CountryEnum.YE:
- return ye()
- if self is CountryEnum.ZM:
- return zm()
- if self is CountryEnum.ZW:
- return zw()
+CountryEnum = typing.Union[
+ typing.Literal[
+ "AF",
+ "AX",
+ "AL",
+ "DZ",
+ "AS",
+ "AD",
+ "AO",
+ "AI",
+ "AQ",
+ "AG",
+ "AR",
+ "AM",
+ "AW",
+ "AU",
+ "AT",
+ "AZ",
+ "BS",
+ "BH",
+ "BD",
+ "BB",
+ "BY",
+ "BE",
+ "BZ",
+ "BJ",
+ "BM",
+ "BT",
+ "BO",
+ "BQ",
+ "BA",
+ "BW",
+ "BV",
+ "BR",
+ "IO",
+ "BN",
+ "BG",
+ "BF",
+ "BI",
+ "CV",
+ "KH",
+ "CM",
+ "CA",
+ "KY",
+ "CF",
+ "TD",
+ "CL",
+ "CN",
+ "CX",
+ "CC",
+ "CO",
+ "KM",
+ "CG",
+ "CD",
+ "CK",
+ "CR",
+ "CI",
+ "HR",
+ "CU",
+ "CW",
+ "CY",
+ "CZ",
+ "DK",
+ "DJ",
+ "DM",
+ "DO",
+ "EC",
+ "EG",
+ "SV",
+ "GQ",
+ "ER",
+ "EE",
+ "SZ",
+ "ET",
+ "FK",
+ "FO",
+ "FJ",
+ "FI",
+ "FR",
+ "GF",
+ "PF",
+ "TF",
+ "GA",
+ "GM",
+ "GE",
+ "DE",
+ "GH",
+ "GI",
+ "GR",
+ "GL",
+ "GD",
+ "GP",
+ "GU",
+ "GT",
+ "GG",
+ "GN",
+ "GW",
+ "GY",
+ "HT",
+ "HM",
+ "VA",
+ "HN",
+ "HK",
+ "HU",
+ "IS",
+ "IN",
+ "ID",
+ "IR",
+ "IQ",
+ "IE",
+ "IM",
+ "IL",
+ "IT",
+ "JM",
+ "JP",
+ "JE",
+ "JO",
+ "KZ",
+ "KE",
+ "KI",
+ "KW",
+ "KG",
+ "LA",
+ "LV",
+ "LB",
+ "LS",
+ "LR",
+ "LY",
+ "LI",
+ "LT",
+ "LU",
+ "MO",
+ "MG",
+ "MW",
+ "MY",
+ "MV",
+ "ML",
+ "MT",
+ "MH",
+ "MQ",
+ "MR",
+ "MU",
+ "YT",
+ "MX",
+ "FM",
+ "MD",
+ "MC",
+ "MN",
+ "ME",
+ "MS",
+ "MA",
+ "MZ",
+ "MM",
+ "NA",
+ "NR",
+ "NP",
+ "NL",
+ "NC",
+ "NZ",
+ "NI",
+ "NE",
+ "NG",
+ "NU",
+ "NF",
+ "KP",
+ "MK",
+ "MP",
+ "NO",
+ "OM",
+ "PK",
+ "PW",
+ "PS",
+ "PA",
+ "PG",
+ "PY",
+ "PE",
+ "PH",
+ "PN",
+ "PL",
+ "PT",
+ "PR",
+ "QA",
+ "RE",
+ "RO",
+ "RU",
+ "RW",
+ "BL",
+ "SH",
+ "KN",
+ "LC",
+ "MF",
+ "PM",
+ "VC",
+ "WS",
+ "SM",
+ "ST",
+ "SA",
+ "SN",
+ "RS",
+ "SC",
+ "SL",
+ "SG",
+ "SX",
+ "SK",
+ "SI",
+ "SB",
+ "SO",
+ "ZA",
+ "GS",
+ "KR",
+ "SS",
+ "ES",
+ "LK",
+ "SD",
+ "SR",
+ "SJ",
+ "SE",
+ "CH",
+ "SY",
+ "TW",
+ "TJ",
+ "TZ",
+ "TH",
+ "TL",
+ "TG",
+ "TK",
+ "TO",
+ "TT",
+ "TN",
+ "TR",
+ "TM",
+ "TC",
+ "TV",
+ "UG",
+ "UA",
+ "AE",
+ "GB",
+ "UM",
+ "US",
+ "UY",
+ "UZ",
+ "VU",
+ "VE",
+ "VN",
+ "VG",
+ "VI",
+ "WF",
+ "EH",
+ "YE",
+ "ZM",
+ "ZW",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/types/crm_account_response.py b/src/merge/resources/crm/types/crm_account_response.py
index 13e87b6d..659b5c83 100644
--- a/src/merge/resources/crm/types/crm_account_response.py
+++ b/src/merge/resources/crm/types/crm_account_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account import Account
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CrmAccountResponse(pydantic_v1.BaseModel):
+class CrmAccountResponse(UniversalBaseModel):
model: Account
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/crm_association_type_response.py b/src/merge/resources/crm/types/crm_association_type_response.py
index f22834e6..662f14f3 100644
--- a/src/merge/resources/crm/types/crm_association_type_response.py
+++ b/src/merge/resources/crm/types/crm_association_type_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .association_type import AssociationType
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CrmAssociationTypeResponse(pydantic_v1.BaseModel):
+class CrmAssociationTypeResponse(UniversalBaseModel):
model: AssociationType
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/crm_contact_response.py b/src/merge/resources/crm/types/crm_contact_response.py
index 9efa6e58..b684b406 100644
--- a/src/merge/resources/crm/types/crm_contact_response.py
+++ b/src/merge/resources/crm/types/crm_contact_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .contact import Contact
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CrmContactResponse(pydantic_v1.BaseModel):
+class CrmContactResponse(UniversalBaseModel):
model: Contact
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/crm_custom_object_response.py b/src/merge/resources/crm/types/crm_custom_object_response.py
index 0d9d8849..cac5d642 100644
--- a/src/merge/resources/crm/types/crm_custom_object_response.py
+++ b/src/merge/resources/crm/types/crm_custom_object_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .custom_object import CustomObject
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CrmCustomObjectResponse(pydantic_v1.BaseModel):
+class CrmCustomObjectResponse(UniversalBaseModel):
model: CustomObject
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/custom_object.py b/src/merge/resources/crm/types/custom_object.py
index 19fde14a..1a637020 100644
--- a/src/merge/resources/crm/types/custom_object.py
+++ b/src/merge/resources/crm/types/custom_object.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CustomObject(pydantic_v1.BaseModel):
+class CustomObject(UniversalBaseModel):
"""
# The CustomObject Object
@@ -22,47 +22,38 @@ class CustomObject(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- object_class: typing.Optional[str] = pydantic_v1.Field()
+ object_class: typing.Optional[str] = pydantic.Field()
"""
The custom object class the custom object record belongs to.
"""
- fields: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ fields: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
The fields and values contained within the custom object record.
"""
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/custom_object_class.py b/src/merge/resources/crm/types/custom_object_class.py
index 768eba43..d837c78f 100644
--- a/src/merge/resources/crm/types/custom_object_class.py
+++ b/src/merge/resources/crm/types/custom_object_class.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_field_class_for_custom_object_class import RemoteFieldClassForCustomObjectClass
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CustomObjectClass(pydantic_v1.BaseModel):
+class CustomObjectClass(UniversalBaseModel):
"""
# The Custom Object Class Object
@@ -22,48 +22,39 @@ class CustomObjectClass(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
created_at: typing.Optional[dt.datetime]
modified_at: typing.Optional[dt.datetime]
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The custom object class's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The custom object class's description.
"""
- labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic_v1.Field()
+ labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field()
"""
The custom object class's singular and plural labels.
"""
fields: typing.Optional[typing.List[RemoteFieldClassForCustomObjectClass]]
- association_types: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic_v1.Field()
+ association_types: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field()
"""
The types of associations with other models that the custom object class can have.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/custom_object_request.py b/src/merge/resources/crm/types/custom_object_request.py
index f9fd9510..cb0b508a 100644
--- a/src/merge/resources/crm/types/custom_object_request.py
+++ b/src/merge/resources/crm/types/custom_object_request.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class CustomObjectRequest(UniversalBaseModel):
+ fields: typing.Dict[str, typing.Optional[typing.Any]]
-class CustomObjectRequest(pydantic_v1.BaseModel):
- fields: typing.Dict[str, typing.Any]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/data_passthrough_request.py b/src/merge/resources/crm/types/data_passthrough_request.py
index fdf9b18c..f2718105 100644
--- a/src/merge/resources/crm/types/data_passthrough_request.py
+++ b/src/merge/resources/crm/types/data_passthrough_request.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .method_enum import MethodEnum
+import pydantic
+import typing
from .multipart_form_field_request import MultipartFormFieldRequest
from .request_format_enum import RequestFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class DataPassthroughRequest(pydantic_v1.BaseModel):
+class DataPassthroughRequest(UniversalBaseModel):
"""
# The DataPassthrough Object
@@ -24,51 +23,42 @@ class DataPassthroughRequest(pydantic_v1.BaseModel):
"""
method: MethodEnum
- path: str = pydantic_v1.Field()
+ path: str = pydantic.Field()
"""
The path of the request in the third party's platform.
"""
- base_url_override: typing.Optional[str] = pydantic_v1.Field()
+ base_url_override: typing.Optional[str] = pydantic.Field()
"""
An optional override of the third party's base url for the request.
"""
- data: typing.Optional[str] = pydantic_v1.Field()
+ data: typing.Optional[str] = pydantic.Field()
"""
The data with the request. You must include a `request_format` parameter matching the data's format
"""
- multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic_v1.Field()
+ multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field()
"""
Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`.
"""
- headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server.
"""
request_format: typing.Optional[RequestFormatEnum]
- normalize_response: typing.Optional[bool] = pydantic_v1.Field()
+ normalize_response: typing.Optional[bool] = pydantic.Field()
"""
Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/debug_mode_log.py b/src/merge/resources/crm/types/debug_mode_log.py
index 321c9090..2b02c1b9 100644
--- a/src/merge/resources/crm/types/debug_mode_log.py
+++ b/src/merge/resources/crm/types/debug_mode_log.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .debug_model_log_summary import DebugModelLogSummary
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class DebugModeLog(pydantic_v1.BaseModel):
+class DebugModeLog(UniversalBaseModel):
log_id: str
dashboard_view: str
log_summary: DebugModelLogSummary
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/debug_model_log_summary.py b/src/merge/resources/crm/types/debug_model_log_summary.py
index 06bb154b..b4f48752 100644
--- a/src/merge/resources/crm/types/debug_model_log_summary.py
+++ b/src/merge/resources/crm/types/debug_model_log_summary.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class DebugModelLogSummary(pydantic_v1.BaseModel):
+class DebugModelLogSummary(UniversalBaseModel):
url: str
method: str
status_code: int
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/direction_enum.py b/src/merge/resources/crm/types/direction_enum.py
index 359a68a2..275bb09a 100644
--- a/src/merge/resources/crm/types/direction_enum.py
+++ b/src/merge/resources/crm/types/direction_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class DirectionEnum(str, enum.Enum):
- """
- - `INBOUND` - INBOUND
- - `OUTBOUND` - OUTBOUND
- """
-
- INBOUND = "INBOUND"
- OUTBOUND = "OUTBOUND"
-
- def visit(self, inbound: typing.Callable[[], T_Result], outbound: typing.Callable[[], T_Result]) -> T_Result:
- if self is DirectionEnum.INBOUND:
- return inbound()
- if self is DirectionEnum.OUTBOUND:
- return outbound()
+DirectionEnum = typing.Union[typing.Literal["INBOUND", "OUTBOUND"], typing.Any]
diff --git a/src/merge/resources/crm/types/email_address.py b/src/merge/resources/crm/types/email_address.py
index 9e381c42..55aab508 100644
--- a/src/merge/resources/crm/types/email_address.py
+++ b/src/merge/resources/crm/types/email_address.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class EmailAddress(pydantic_v1.BaseModel):
+class EmailAddress(UniversalBaseModel):
"""
# The EmailAddress Object
@@ -20,40 +20,31 @@ class EmailAddress(pydantic_v1.BaseModel):
Fetch from the `GET Contact` endpoint and view their email addresses.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- email_address: typing.Optional[str] = pydantic_v1.Field()
+ email_address: typing.Optional[str] = pydantic.Field()
"""
The email address.
"""
- email_address_type: typing.Optional[str] = pydantic_v1.Field()
+ email_address_type: typing.Optional[str] = pydantic.Field()
"""
The email address's type.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/email_address_request.py b/src/merge/resources/crm/types/email_address_request.py
index 9892f3af..0bf4df19 100644
--- a/src/merge/resources/crm/types/email_address_request.py
+++ b/src/merge/resources/crm/types/email_address_request.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class EmailAddressRequest(pydantic_v1.BaseModel):
+class EmailAddressRequest(UniversalBaseModel):
"""
# The EmailAddress Object
@@ -20,33 +19,24 @@ class EmailAddressRequest(pydantic_v1.BaseModel):
Fetch from the `GET Contact` endpoint and view their email addresses.
"""
- email_address: typing.Optional[str] = pydantic_v1.Field()
+ email_address: typing.Optional[str] = pydantic.Field()
"""
The email address.
"""
- email_address_type: typing.Optional[str] = pydantic_v1.Field()
+ email_address_type: typing.Optional[str] = pydantic.Field()
"""
The email address's type.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/enabled_actions_enum.py b/src/merge/resources/crm/types/enabled_actions_enum.py
index 949d69dc..fa6c674e 100644
--- a/src/merge/resources/crm/types/enabled_actions_enum.py
+++ b/src/merge/resources/crm/types/enabled_actions_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EnabledActionsEnum(str, enum.Enum):
- """
- - `READ` - READ
- - `WRITE` - WRITE
- """
-
- READ = "READ"
- WRITE = "WRITE"
-
- def visit(self, read: typing.Callable[[], T_Result], write: typing.Callable[[], T_Result]) -> T_Result:
- if self is EnabledActionsEnum.READ:
- return read()
- if self is EnabledActionsEnum.WRITE:
- return write()
+EnabledActionsEnum = typing.Union[typing.Literal["READ", "WRITE"], typing.Any]
diff --git a/src/merge/resources/crm/types/encoding_enum.py b/src/merge/resources/crm/types/encoding_enum.py
index fed12372..4c4997b2 100644
--- a/src/merge/resources/crm/types/encoding_enum.py
+++ b/src/merge/resources/crm/types/encoding_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EncodingEnum(str, enum.Enum):
- """
- - `RAW` - RAW
- - `BASE64` - BASE64
- - `GZIP_BASE64` - GZIP_BASE64
- """
-
- RAW = "RAW"
- BASE_64 = "BASE64"
- GZIP_BASE_64 = "GZIP_BASE64"
-
- def visit(
- self,
- raw: typing.Callable[[], T_Result],
- base_64: typing.Callable[[], T_Result],
- gzip_base_64: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EncodingEnum.RAW:
- return raw()
- if self is EncodingEnum.BASE_64:
- return base_64()
- if self is EncodingEnum.GZIP_BASE_64:
- return gzip_base_64()
+EncodingEnum = typing.Union[typing.Literal["RAW", "BASE64", "GZIP_BASE64"], typing.Any]
diff --git a/src/merge/resources/crm/types/engagement.py b/src/merge/resources/crm/types/engagement.py
index 0e2ffade..f386e554 100644
--- a/src/merge/resources/crm/types/engagement.py
+++ b/src/merge/resources/crm/types/engagement.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .engagement_account import EngagementAccount
-from .engagement_contacts_item import EngagementContactsItem
+import pydantic
+import datetime as dt
+from .engagement_owner import EngagementOwner
from .engagement_direction import EngagementDirection
from .engagement_engagement_type import EngagementEngagementType
-from .engagement_owner import EngagementOwner
+from .engagement_account import EngagementAccount
+from .engagement_contacts_item import EngagementContactsItem
from .remote_data import RemoteData
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Engagement(pydantic_v1.BaseModel):
+class Engagement(UniversalBaseModel):
"""
# The Engagement Object
@@ -28,37 +28,37 @@ class Engagement(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- owner: typing.Optional[EngagementOwner] = pydantic_v1.Field()
+ owner: typing.Optional[EngagementOwner] = pydantic.Field()
"""
The engagement's owner.
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The engagement's content.
"""
- subject: typing.Optional[str] = pydantic_v1.Field()
+ subject: typing.Optional[str] = pydantic.Field()
"""
The engagement's subject.
"""
- direction: typing.Optional[EngagementDirection] = pydantic_v1.Field()
+ direction: typing.Optional[EngagementDirection] = pydantic.Field()
"""
The engagement's direction.
@@ -66,50 +66,41 @@ class Engagement(pydantic_v1.BaseModel):
- `OUTBOUND` - OUTBOUND
"""
- engagement_type: typing.Optional[EngagementEngagementType] = pydantic_v1.Field()
+ engagement_type: typing.Optional[EngagementEngagementType] = pydantic.Field()
"""
The engagement type of the engagement.
"""
- start_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the engagement started.
"""
- end_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the engagement ended.
"""
- account: typing.Optional[EngagementAccount] = pydantic_v1.Field()
+ account: typing.Optional[EngagementAccount] = pydantic.Field()
"""
The account of the engagement.
"""
contacts: typing.Optional[typing.List[typing.Optional[EngagementContactsItem]]]
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/engagement_account.py b/src/merge/resources/crm/types/engagement_account.py
index 670fbbd5..62cb6dc7 100644
--- a/src/merge/resources/crm/types/engagement_account.py
+++ b/src/merge/resources/crm/types/engagement_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
EngagementAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/engagement_contacts_item.py b/src/merge/resources/crm/types/engagement_contacts_item.py
index 12faa1ae..3bcb997d 100644
--- a/src/merge/resources/crm/types/engagement_contacts_item.py
+++ b/src/merge/resources/crm/types/engagement_contacts_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
EngagementContactsItem = typing.Union[str, Contact]
diff --git a/src/merge/resources/crm/types/engagement_direction.py b/src/merge/resources/crm/types/engagement_direction.py
index b37a6226..27ef3e9f 100644
--- a/src/merge/resources/crm/types/engagement_direction.py
+++ b/src/merge/resources/crm/types/engagement_direction.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .direction_enum import DirectionEnum
EngagementDirection = typing.Union[DirectionEnum, str]
diff --git a/src/merge/resources/crm/types/engagement_engagement_type.py b/src/merge/resources/crm/types/engagement_engagement_type.py
index 9eee8736..cb03f2a0 100644
--- a/src/merge/resources/crm/types/engagement_engagement_type.py
+++ b/src/merge/resources/crm/types/engagement_engagement_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .engagement_type import EngagementType
EngagementEngagementType = typing.Union[str, EngagementType]
diff --git a/src/merge/resources/crm/types/engagement_owner.py b/src/merge/resources/crm/types/engagement_owner.py
index ec8d6da5..9c099114 100644
--- a/src/merge/resources/crm/types/engagement_owner.py
+++ b/src/merge/resources/crm/types/engagement_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
EngagementOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/engagement_request.py b/src/merge/resources/crm/types/engagement_request.py
index df8418cf..e65bd1f1 100644
--- a/src/merge/resources/crm/types/engagement_request.py
+++ b/src/merge/resources/crm/types/engagement_request.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .engagement_request_account import EngagementRequestAccount
-from .engagement_request_contacts_item import EngagementRequestContactsItem
+from .engagement_request_owner import EngagementRequestOwner
+import pydantic
from .engagement_request_direction import EngagementRequestDirection
from .engagement_request_engagement_type import EngagementRequestEngagementType
-from .engagement_request_owner import EngagementRequestOwner
+import datetime as dt
+from .engagement_request_account import EngagementRequestAccount
+from .engagement_request_contacts_item import EngagementRequestContactsItem
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class EngagementRequest(pydantic_v1.BaseModel):
+class EngagementRequest(UniversalBaseModel):
"""
# The Engagement Object
@@ -26,22 +26,22 @@ class EngagementRequest(pydantic_v1.BaseModel):
TODO
"""
- owner: typing.Optional[EngagementRequestOwner] = pydantic_v1.Field()
+ owner: typing.Optional[EngagementRequestOwner] = pydantic.Field()
"""
The engagement's owner.
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The engagement's content.
"""
- subject: typing.Optional[str] = pydantic_v1.Field()
+ subject: typing.Optional[str] = pydantic.Field()
"""
The engagement's subject.
"""
- direction: typing.Optional[EngagementRequestDirection] = pydantic_v1.Field()
+ direction: typing.Optional[EngagementRequestDirection] = pydantic.Field()
"""
The engagement's direction.
@@ -49,45 +49,36 @@ class EngagementRequest(pydantic_v1.BaseModel):
- `OUTBOUND` - OUTBOUND
"""
- engagement_type: typing.Optional[EngagementRequestEngagementType] = pydantic_v1.Field()
+ engagement_type: typing.Optional[EngagementRequestEngagementType] = pydantic.Field()
"""
The engagement type of the engagement.
"""
- start_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the engagement started.
"""
- end_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the engagement ended.
"""
- account: typing.Optional[EngagementRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[EngagementRequestAccount] = pydantic.Field()
"""
The account of the engagement.
"""
contacts: typing.Optional[typing.List[typing.Optional[EngagementRequestContactsItem]]]
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/engagement_request_account.py b/src/merge/resources/crm/types/engagement_request_account.py
index 4cb22f6d..8093d6d1 100644
--- a/src/merge/resources/crm/types/engagement_request_account.py
+++ b/src/merge/resources/crm/types/engagement_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
EngagementRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/engagement_request_contacts_item.py b/src/merge/resources/crm/types/engagement_request_contacts_item.py
index 677c7247..8dcdef7e 100644
--- a/src/merge/resources/crm/types/engagement_request_contacts_item.py
+++ b/src/merge/resources/crm/types/engagement_request_contacts_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
EngagementRequestContactsItem = typing.Union[str, Contact]
diff --git a/src/merge/resources/crm/types/engagement_request_direction.py b/src/merge/resources/crm/types/engagement_request_direction.py
index eeb8027e..cd1d30f0 100644
--- a/src/merge/resources/crm/types/engagement_request_direction.py
+++ b/src/merge/resources/crm/types/engagement_request_direction.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .direction_enum import DirectionEnum
EngagementRequestDirection = typing.Union[DirectionEnum, str]
diff --git a/src/merge/resources/crm/types/engagement_request_engagement_type.py b/src/merge/resources/crm/types/engagement_request_engagement_type.py
index 37803788..940b3948 100644
--- a/src/merge/resources/crm/types/engagement_request_engagement_type.py
+++ b/src/merge/resources/crm/types/engagement_request_engagement_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .engagement_type import EngagementType
EngagementRequestEngagementType = typing.Union[str, EngagementType]
diff --git a/src/merge/resources/crm/types/engagement_request_owner.py b/src/merge/resources/crm/types/engagement_request_owner.py
index 11fd7891..aa6b6624 100644
--- a/src/merge/resources/crm/types/engagement_request_owner.py
+++ b/src/merge/resources/crm/types/engagement_request_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
EngagementRequestOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/engagement_response.py b/src/merge/resources/crm/types/engagement_response.py
index e316f2df..ac42b08a 100644
--- a/src/merge/resources/crm/types/engagement_response.py
+++ b/src/merge/resources/crm/types/engagement_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import UniversalBaseModel
from .engagement import Engagement
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class EngagementResponse(pydantic_v1.BaseModel):
+class EngagementResponse(UniversalBaseModel):
model: Engagement
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/engagement_type.py b/src/merge/resources/crm/types/engagement_type.py
index fae7975a..a5497cbd 100644
--- a/src/merge/resources/crm/types/engagement_type.py
+++ b/src/merge/resources/crm/types/engagement_type.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .engagement_type_activity_type import EngagementTypeActivityType
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class EngagementType(pydantic_v1.BaseModel):
+class EngagementType(UniversalBaseModel):
"""
# The Engagement Type Object
@@ -23,22 +23,22 @@ class EngagementType(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- activity_type: typing.Optional[EngagementTypeActivityType] = pydantic_v1.Field()
+ activity_type: typing.Optional[EngagementTypeActivityType] = pydantic.Field()
"""
The engagement type's activity type.
@@ -47,27 +47,18 @@ class EngagementType(pydantic_v1.BaseModel):
- `EMAIL` - EMAIL
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The engagement type's name.
"""
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/engagement_type_activity_type.py b/src/merge/resources/crm/types/engagement_type_activity_type.py
index c5845a91..ae4eb719 100644
--- a/src/merge/resources/crm/types/engagement_type_activity_type.py
+++ b/src/merge/resources/crm/types/engagement_type_activity_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .activity_type_enum import ActivityTypeEnum
EngagementTypeActivityType = typing.Union[ActivityTypeEnum, str]
diff --git a/src/merge/resources/crm/types/error_validation_problem.py b/src/merge/resources/crm/types/error_validation_problem.py
index 425af45c..58ea87e6 100644
--- a/src/merge/resources/crm/types/error_validation_problem.py
+++ b/src/merge/resources/crm/types/error_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ErrorValidationProblem(pydantic_v1.BaseModel):
+class ErrorValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/event_type_enum.py b/src/merge/resources/crm/types/event_type_enum.py
index c10cd701..2693c646 100644
--- a/src/merge/resources/crm/types/event_type_enum.py
+++ b/src/merge/resources/crm/types/event_type_enum.py
@@ -1,206 +1,47 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EventTypeEnum(str, enum.Enum):
- """
- - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY
- - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY
- - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY
- - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY
- - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY
- - `INVITED_USER` - INVITED_USER
- - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED
- - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED
- - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT
- - `CREATED_DESTINATION` - CREATED_DESTINATION
- - `DELETED_DESTINATION` - DELETED_DESTINATION
- - `CHANGED_DESTINATION` - CHANGED_DESTINATION
- - `CHANGED_SCOPES` - CHANGED_SCOPES
- - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION
- - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS
- - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION
- - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION
- - `ENABLED_CATEGORY` - ENABLED_CATEGORY
- - `DISABLED_CATEGORY` - DISABLED_CATEGORY
- - `CHANGED_PASSWORD` - CHANGED_PASSWORD
- - `RESET_PASSWORD` - RESET_PASSWORD
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING
- - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING
- - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING
- - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING
- - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC
- - `MUTED_ISSUE` - MUTED_ISSUE
- - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK
- - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
- - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
- - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
- - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
- """
-
- CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY"
- DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY"
- CREATED_TEST_API_KEY = "CREATED_TEST_API_KEY"
- DELETED_TEST_API_KEY = "DELETED_TEST_API_KEY"
- REGENERATED_PRODUCTION_API_KEY = "REGENERATED_PRODUCTION_API_KEY"
- INVITED_USER = "INVITED_USER"
- TWO_FACTOR_AUTH_ENABLED = "TWO_FACTOR_AUTH_ENABLED"
- TWO_FACTOR_AUTH_DISABLED = "TWO_FACTOR_AUTH_DISABLED"
- DELETED_LINKED_ACCOUNT = "DELETED_LINKED_ACCOUNT"
- CREATED_DESTINATION = "CREATED_DESTINATION"
- DELETED_DESTINATION = "DELETED_DESTINATION"
- CHANGED_DESTINATION = "CHANGED_DESTINATION"
- CHANGED_SCOPES = "CHANGED_SCOPES"
- CHANGED_PERSONAL_INFORMATION = "CHANGED_PERSONAL_INFORMATION"
- CHANGED_ORGANIZATION_SETTINGS = "CHANGED_ORGANIZATION_SETTINGS"
- ENABLED_INTEGRATION = "ENABLED_INTEGRATION"
- DISABLED_INTEGRATION = "DISABLED_INTEGRATION"
- ENABLED_CATEGORY = "ENABLED_CATEGORY"
- DISABLED_CATEGORY = "DISABLED_CATEGORY"
- CHANGED_PASSWORD = "CHANGED_PASSWORD"
- RESET_PASSWORD = "RESET_PASSWORD"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- CREATED_INTEGRATION_WIDE_FIELD_MAPPING = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING"
- CREATED_LINKED_ACCOUNT_FIELD_MAPPING = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING"
- CHANGED_INTEGRATION_WIDE_FIELD_MAPPING = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING"
- CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING"
- DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING"
- DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING"
- FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC"
- MUTED_ISSUE = "MUTED_ISSUE"
- GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK"
- ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK"
- DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK"
- MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED"
- END_USER_CREDENTIALS_ACCESSED = "END_USER_CREDENTIALS_ACCESSED"
-
- def visit(
- self,
- created_remote_production_api_key: typing.Callable[[], T_Result],
- deleted_remote_production_api_key: typing.Callable[[], T_Result],
- created_test_api_key: typing.Callable[[], T_Result],
- deleted_test_api_key: typing.Callable[[], T_Result],
- regenerated_production_api_key: typing.Callable[[], T_Result],
- invited_user: typing.Callable[[], T_Result],
- two_factor_auth_enabled: typing.Callable[[], T_Result],
- two_factor_auth_disabled: typing.Callable[[], T_Result],
- deleted_linked_account: typing.Callable[[], T_Result],
- created_destination: typing.Callable[[], T_Result],
- deleted_destination: typing.Callable[[], T_Result],
- changed_destination: typing.Callable[[], T_Result],
- changed_scopes: typing.Callable[[], T_Result],
- changed_personal_information: typing.Callable[[], T_Result],
- changed_organization_settings: typing.Callable[[], T_Result],
- enabled_integration: typing.Callable[[], T_Result],
- disabled_integration: typing.Callable[[], T_Result],
- enabled_category: typing.Callable[[], T_Result],
- disabled_category: typing.Callable[[], T_Result],
- changed_password: typing.Callable[[], T_Result],
- reset_password: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- created_integration_wide_field_mapping: typing.Callable[[], T_Result],
- created_linked_account_field_mapping: typing.Callable[[], T_Result],
- changed_integration_wide_field_mapping: typing.Callable[[], T_Result],
- changed_linked_account_field_mapping: typing.Callable[[], T_Result],
- deleted_integration_wide_field_mapping: typing.Callable[[], T_Result],
- deleted_linked_account_field_mapping: typing.Callable[[], T_Result],
- forced_linked_account_resync: typing.Callable[[], T_Result],
- muted_issue: typing.Callable[[], T_Result],
- generated_magic_link: typing.Callable[[], T_Result],
- enabled_merge_webhook: typing.Callable[[], T_Result],
- disabled_merge_webhook: typing.Callable[[], T_Result],
- merge_webhook_target_changed: typing.Callable[[], T_Result],
- end_user_credentials_accessed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY:
- return created_remote_production_api_key()
- if self is EventTypeEnum.DELETED_REMOTE_PRODUCTION_API_KEY:
- return deleted_remote_production_api_key()
- if self is EventTypeEnum.CREATED_TEST_API_KEY:
- return created_test_api_key()
- if self is EventTypeEnum.DELETED_TEST_API_KEY:
- return deleted_test_api_key()
- if self is EventTypeEnum.REGENERATED_PRODUCTION_API_KEY:
- return regenerated_production_api_key()
- if self is EventTypeEnum.INVITED_USER:
- return invited_user()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_ENABLED:
- return two_factor_auth_enabled()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_DISABLED:
- return two_factor_auth_disabled()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT:
- return deleted_linked_account()
- if self is EventTypeEnum.CREATED_DESTINATION:
- return created_destination()
- if self is EventTypeEnum.DELETED_DESTINATION:
- return deleted_destination()
- if self is EventTypeEnum.CHANGED_DESTINATION:
- return changed_destination()
- if self is EventTypeEnum.CHANGED_SCOPES:
- return changed_scopes()
- if self is EventTypeEnum.CHANGED_PERSONAL_INFORMATION:
- return changed_personal_information()
- if self is EventTypeEnum.CHANGED_ORGANIZATION_SETTINGS:
- return changed_organization_settings()
- if self is EventTypeEnum.ENABLED_INTEGRATION:
- return enabled_integration()
- if self is EventTypeEnum.DISABLED_INTEGRATION:
- return disabled_integration()
- if self is EventTypeEnum.ENABLED_CATEGORY:
- return enabled_category()
- if self is EventTypeEnum.DISABLED_CATEGORY:
- return disabled_category()
- if self is EventTypeEnum.CHANGED_PASSWORD:
- return changed_password()
- if self is EventTypeEnum.RESET_PASSWORD:
- return reset_password()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return enabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return enabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return disabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return disabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.CREATED_INTEGRATION_WIDE_FIELD_MAPPING:
- return created_integration_wide_field_mapping()
- if self is EventTypeEnum.CREATED_LINKED_ACCOUNT_FIELD_MAPPING:
- return created_linked_account_field_mapping()
- if self is EventTypeEnum.CHANGED_INTEGRATION_WIDE_FIELD_MAPPING:
- return changed_integration_wide_field_mapping()
- if self is EventTypeEnum.CHANGED_LINKED_ACCOUNT_FIELD_MAPPING:
- return changed_linked_account_field_mapping()
- if self is EventTypeEnum.DELETED_INTEGRATION_WIDE_FIELD_MAPPING:
- return deleted_integration_wide_field_mapping()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING:
- return deleted_linked_account_field_mapping()
- if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC:
- return forced_linked_account_resync()
- if self is EventTypeEnum.MUTED_ISSUE:
- return muted_issue()
- if self is EventTypeEnum.GENERATED_MAGIC_LINK:
- return generated_magic_link()
- if self is EventTypeEnum.ENABLED_MERGE_WEBHOOK:
- return enabled_merge_webhook()
- if self is EventTypeEnum.DISABLED_MERGE_WEBHOOK:
- return disabled_merge_webhook()
- if self is EventTypeEnum.MERGE_WEBHOOK_TARGET_CHANGED:
- return merge_webhook_target_changed()
- if self is EventTypeEnum.END_USER_CREDENTIALS_ACCESSED:
- return end_user_credentials_accessed()
+EventTypeEnum = typing.Union[
+ typing.Literal[
+ "CREATED_REMOTE_PRODUCTION_API_KEY",
+ "DELETED_REMOTE_PRODUCTION_API_KEY",
+ "CREATED_TEST_API_KEY",
+ "DELETED_TEST_API_KEY",
+ "REGENERATED_PRODUCTION_API_KEY",
+ "INVITED_USER",
+ "TWO_FACTOR_AUTH_ENABLED",
+ "TWO_FACTOR_AUTH_DISABLED",
+ "DELETED_LINKED_ACCOUNT",
+ "CREATED_DESTINATION",
+ "DELETED_DESTINATION",
+ "CHANGED_DESTINATION",
+ "CHANGED_SCOPES",
+ "CHANGED_PERSONAL_INFORMATION",
+ "CHANGED_ORGANIZATION_SETTINGS",
+ "ENABLED_INTEGRATION",
+ "DISABLED_INTEGRATION",
+ "ENABLED_CATEGORY",
+ "DISABLED_CATEGORY",
+ "CHANGED_PASSWORD",
+ "RESET_PASSWORD",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "CREATED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CREATED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "DELETED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "DELETED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "FORCED_LINKED_ACCOUNT_RESYNC",
+ "MUTED_ISSUE",
+ "GENERATED_MAGIC_LINK",
+ "ENABLED_MERGE_WEBHOOK",
+ "DISABLED_MERGE_WEBHOOK",
+ "MERGE_WEBHOOK_TARGET_CHANGED",
+ "END_USER_CREDENTIALS_ACCESSED",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/crm/types/external_target_field_api.py b/src/merge/resources/crm/types/external_target_field_api.py
index a97d536a..18988d44 100644
--- a/src/merge/resources/crm/types/external_target_field_api.py
+++ b/src/merge/resources/crm/types/external_target_field_api.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ExternalTargetFieldApi(pydantic_v1.BaseModel):
+class ExternalTargetFieldApi(UniversalBaseModel):
name: typing.Optional[str]
description: typing.Optional[str]
is_mapped: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/external_target_field_api_response.py b/src/merge/resources/crm/types/external_target_field_api_response.py
index ff73a940..3f54e5de 100644
--- a/src/merge/resources/crm/types/external_target_field_api_response.py
+++ b/src/merge/resources/crm/types/external_target_field_api_response.py
@@ -1,40 +1,28 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .external_target_field_api import ExternalTargetFieldApi
-
-
-class ExternalTargetFieldApiResponse(pydantic_v1.BaseModel):
- account: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Account")
- contact: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Contact")
- lead: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Lead")
- note: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Note")
- opportunity: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Opportunity")
- stage: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Stage")
- user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="User")
- task: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Task")
- engagement: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Engagement")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class ExternalTargetFieldApiResponse(UniversalBaseModel):
+ account: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Account")
+ contact: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Contact")
+ lead: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Lead")
+ note: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Note")
+ opportunity: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Opportunity")
+ stage: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Stage")
+ user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="User")
+ task: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Task")
+ engagement: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Engagement")
+
+ 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/merge/resources/crm/types/field_format_enum.py b/src/merge/resources/crm/types/field_format_enum.py
index 9d80b73d..9c904dc8 100644
--- a/src/merge/resources/crm/types/field_format_enum.py
+++ b/src/merge/resources/crm/types/field_format_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FieldFormatEnum(str, enum.Enum):
- """
- - `string` - string
- - `number` - number
- - `date` - date
- - `datetime` - datetime
- - `bool` - bool
- - `list` - list
- """
-
- STRING = "string"
- NUMBER = "number"
- DATE = "date"
- DATETIME = "datetime"
- BOOL = "bool"
- LIST = "list"
-
- def visit(
- self,
- string: typing.Callable[[], T_Result],
- number: typing.Callable[[], T_Result],
- date: typing.Callable[[], T_Result],
- datetime: typing.Callable[[], T_Result],
- bool_: typing.Callable[[], T_Result],
- list_: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FieldFormatEnum.STRING:
- return string()
- if self is FieldFormatEnum.NUMBER:
- return number()
- if self is FieldFormatEnum.DATE:
- return date()
- if self is FieldFormatEnum.DATETIME:
- return datetime()
- if self is FieldFormatEnum.BOOL:
- return bool_()
- if self is FieldFormatEnum.LIST:
- return list_()
+FieldFormatEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/crm/types/field_mapping_api_instance.py b/src/merge/resources/crm/types/field_mapping_api_instance.py
index d9d7670d..ef4d9c48 100644
--- a/src/merge/resources/crm/types/field_mapping_api_instance.py
+++ b/src/merge/resources/crm/types/field_mapping_api_instance.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
from .field_mapping_api_instance_target_field import FieldMappingApiInstanceTargetField
+from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingApiInstance(pydantic_v1.BaseModel):
+class FieldMappingApiInstance(UniversalBaseModel):
id: typing.Optional[str]
is_integration_wide: typing.Optional[bool]
target_field: typing.Optional[FieldMappingApiInstanceTargetField]
remote_field: typing.Optional[FieldMappingApiInstanceRemoteField]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/field_mapping_api_instance_remote_field.py b/src/merge/resources/crm/types/field_mapping_api_instance_remote_field.py
index 9539d3dc..ddfff4da 100644
--- a/src/merge/resources/crm/types/field_mapping_api_instance_remote_field.py
+++ b/src/merge/resources/crm/types/field_mapping_api_instance_remote_field.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .field_mapping_api_instance_remote_field_remote_endpoint_info import (
FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo,
)
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceRemoteField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteField(UniversalBaseModel):
remote_key_name: str
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py b/src/merge/resources/crm/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
index d9fcc276..14c37c76 100644
--- a/src/merge/resources/crm/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
+++ b/src/merge/resources/crm/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(UniversalBaseModel):
method: typing.Optional[str]
url_path: typing.Optional[str]
field_traversal_path: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/field_mapping_api_instance_response.py b/src/merge/resources/crm/types/field_mapping_api_instance_response.py
index 66614cfa..9cbff6e6 100644
--- a/src/merge/resources/crm/types/field_mapping_api_instance_response.py
+++ b/src/merge/resources/crm/types/field_mapping_api_instance_response.py
@@ -1,40 +1,28 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .field_mapping_api_instance import FieldMappingApiInstance
-
-
-class FieldMappingApiInstanceResponse(pydantic_v1.BaseModel):
- account: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Account")
- contact: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Contact")
- lead: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Lead")
- note: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Note")
- opportunity: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Opportunity")
- stage: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Stage")
- user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="User")
- task: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Task")
- engagement: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Engagement")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class FieldMappingApiInstanceResponse(UniversalBaseModel):
+ account: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Account")
+ contact: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Contact")
+ lead: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Lead")
+ note: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Note")
+ opportunity: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Opportunity")
+ stage: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Stage")
+ user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="User")
+ task: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Task")
+ engagement: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Engagement")
+
+ 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/merge/resources/crm/types/field_mapping_api_instance_target_field.py b/src/merge/resources/crm/types/field_mapping_api_instance_target_field.py
index 25a8dcff..a1b51052 100644
--- a/src/merge/resources/crm/types/field_mapping_api_instance_target_field.py
+++ b/src/merge/resources/crm/types/field_mapping_api_instance_target_field.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceTargetField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceTargetField(UniversalBaseModel):
name: str
description: str
is_organization_wide: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/field_mapping_instance_response.py b/src/merge/resources/crm/types/field_mapping_instance_response.py
index b55d2c40..a56aeb93 100644
--- a/src/merge/resources/crm/types/field_mapping_instance_response.py
+++ b/src/merge/resources/crm/types/field_mapping_instance_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .field_mapping_api_instance import FieldMappingApiInstance
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingInstanceResponse(pydantic_v1.BaseModel):
+class FieldMappingInstanceResponse(UniversalBaseModel):
model: FieldMappingApiInstance
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/field_permission_deserializer.py b/src/merge/resources/crm/types/field_permission_deserializer.py
index 124f3deb..9670537a 100644
--- a/src/merge/resources/crm/types/field_permission_deserializer.py
+++ b/src/merge/resources/crm/types/field_permission_deserializer.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializer(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializer(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/field_permission_deserializer_request.py b/src/merge/resources/crm/types/field_permission_deserializer_request.py
index 65e80e75..04e14608 100644
--- a/src/merge/resources/crm/types/field_permission_deserializer_request.py
+++ b/src/merge/resources/crm/types/field_permission_deserializer_request.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializerRequest(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializerRequest(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/field_type_enum.py b/src/merge/resources/crm/types/field_type_enum.py
index d05a1ae4..e6fa6d6f 100644
--- a/src/merge/resources/crm/types/field_type_enum.py
+++ b/src/merge/resources/crm/types/field_type_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FieldTypeEnum(str, enum.Enum):
- """
- - `string` - string
- - `number` - number
- - `date` - date
- - `datetime` - datetime
- - `bool` - bool
- - `list` - list
- """
-
- STRING = "string"
- NUMBER = "number"
- DATE = "date"
- DATETIME = "datetime"
- BOOL = "bool"
- LIST = "list"
-
- def visit(
- self,
- string: typing.Callable[[], T_Result],
- number: typing.Callable[[], T_Result],
- date: typing.Callable[[], T_Result],
- datetime: typing.Callable[[], T_Result],
- bool_: typing.Callable[[], T_Result],
- list_: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FieldTypeEnum.STRING:
- return string()
- if self is FieldTypeEnum.NUMBER:
- return number()
- if self is FieldTypeEnum.DATE:
- return date()
- if self is FieldTypeEnum.DATETIME:
- return datetime()
- if self is FieldTypeEnum.BOOL:
- return bool_()
- if self is FieldTypeEnum.LIST:
- return list_()
+FieldTypeEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/crm/types/ignore_common_model_request.py b/src/merge/resources/crm/types/ignore_common_model_request.py
index b3c84ced..c43672c1 100644
--- a/src/merge/resources/crm/types/ignore_common_model_request.py
+++ b/src/merge/resources/crm/types/ignore_common_model_request.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .reason_enum import ReasonEnum
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IgnoreCommonModelRequest(pydantic_v1.BaseModel):
+class IgnoreCommonModelRequest(UniversalBaseModel):
reason: ReasonEnum
message: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/individual_common_model_scope_deserializer.py b/src/merge/resources/crm/types/individual_common_model_scope_deserializer.py
index d80ca06e..122df11c 100644
--- a/src/merge/resources/crm/types/individual_common_model_scope_deserializer.py
+++ b/src/merge/resources/crm/types/individual_common_model_scope_deserializer.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer import FieldPermissionDeserializer
from .model_permission_deserializer import ModelPermissionDeserializer
+from .field_permission_deserializer import FieldPermissionDeserializer
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializer(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializer(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializer]]
field_permissions: typing.Optional[FieldPermissionDeserializer]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/individual_common_model_scope_deserializer_request.py b/src/merge/resources/crm/types/individual_common_model_scope_deserializer_request.py
index 8f2e7de5..a1a80902 100644
--- a/src/merge/resources/crm/types/individual_common_model_scope_deserializer_request.py
+++ b/src/merge/resources/crm/types/individual_common_model_scope_deserializer_request.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
from .model_permission_deserializer_request import ModelPermissionDeserializerRequest
+from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializerRequest(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializerRequest(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializerRequest]]
field_permissions: typing.Optional[FieldPermissionDeserializerRequest]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/issue.py b/src/merge/resources/crm/types/issue.py
index 086a0db2..5a584515 100644
--- a/src/merge/resources/crm/types/issue.py
+++ b/src/merge/resources/crm/types/issue.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue_status import IssueStatus
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Issue(pydantic_v1.BaseModel):
+class Issue(UniversalBaseModel):
id: typing.Optional[str]
- status: typing.Optional[IssueStatus] = pydantic_v1.Field()
+ status: typing.Optional[IssueStatus] = pydantic.Field()
"""
Status of the issue. Options: ('ONGOING', 'RESOLVED')
@@ -19,26 +19,17 @@ class Issue(pydantic_v1.BaseModel):
"""
error_description: str
- end_user: typing.Optional[typing.Dict[str, typing.Any]]
+ end_user: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
first_incident_time: typing.Optional[dt.datetime]
last_incident_time: typing.Optional[dt.datetime]
is_muted: typing.Optional[bool]
error_details: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/issue_status.py b/src/merge/resources/crm/types/issue_status.py
index 8e4d6516..59d004d8 100644
--- a/src/merge/resources/crm/types/issue_status.py
+++ b/src/merge/resources/crm/types/issue_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .issue_status_enum import IssueStatusEnum
IssueStatus = typing.Union[IssueStatusEnum, str]
diff --git a/src/merge/resources/crm/types/issue_status_enum.py b/src/merge/resources/crm/types/issue_status_enum.py
index fc2ef2b5..76eb5549 100644
--- a/src/merge/resources/crm/types/issue_status_enum.py
+++ b/src/merge/resources/crm/types/issue_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssueStatusEnum(str, enum.Enum):
- """
- - `ONGOING` - ONGOING
- - `RESOLVED` - RESOLVED
- """
-
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssueStatusEnum.ONGOING:
- return ongoing()
- if self is IssueStatusEnum.RESOLVED:
- return resolved()
+IssueStatusEnum = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/crm/types/item_format_enum.py b/src/merge/resources/crm/types/item_format_enum.py
index 2e4854df..37140f1f 100644
--- a/src/merge/resources/crm/types/item_format_enum.py
+++ b/src/merge/resources/crm/types/item_format_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ItemFormatEnum(str, enum.Enum):
- """
- - `string` - uuid
- - `number` - url
- - `date` - email
- - `datetime` - phone
- - `bool` - currency
- - `list` - decimal
- """
-
- STRING = "string"
- NUMBER = "number"
- DATE = "date"
- DATETIME = "datetime"
- BOOL = "bool"
- LIST = "list"
-
- def visit(
- self,
- string: typing.Callable[[], T_Result],
- number: typing.Callable[[], T_Result],
- date: typing.Callable[[], T_Result],
- datetime: typing.Callable[[], T_Result],
- bool_: typing.Callable[[], T_Result],
- list_: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ItemFormatEnum.STRING:
- return string()
- if self is ItemFormatEnum.NUMBER:
- return number()
- if self is ItemFormatEnum.DATE:
- return date()
- if self is ItemFormatEnum.DATETIME:
- return datetime()
- if self is ItemFormatEnum.BOOL:
- return bool_()
- if self is ItemFormatEnum.LIST:
- return list_()
+ItemFormatEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/crm/types/item_schema.py b/src/merge/resources/crm/types/item_schema.py
index 45059fd0..cfe24209 100644
--- a/src/merge/resources/crm/types/item_schema.py
+++ b/src/merge/resources/crm/types/item_schema.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .item_format_enum import ItemFormatEnum
from .item_type_enum import ItemTypeEnum
+from .item_format_enum import ItemFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ItemSchema(pydantic_v1.BaseModel):
+class ItemSchema(UniversalBaseModel):
item_type: typing.Optional[ItemTypeEnum]
item_format: typing.Optional[ItemFormatEnum]
item_choices: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/item_type_enum.py b/src/merge/resources/crm/types/item_type_enum.py
index d9b50e3f..e8873e07 100644
--- a/src/merge/resources/crm/types/item_type_enum.py
+++ b/src/merge/resources/crm/types/item_type_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ItemTypeEnum(str, enum.Enum):
- """
- - `string` - string
- - `number` - number
- - `date` - date
- - `datetime` - datetime
- - `bool` - bool
- - `list` - list
- """
-
- STRING = "string"
- NUMBER = "number"
- DATE = "date"
- DATETIME = "datetime"
- BOOL = "bool"
- LIST = "list"
-
- def visit(
- self,
- string: typing.Callable[[], T_Result],
- number: typing.Callable[[], T_Result],
- date: typing.Callable[[], T_Result],
- datetime: typing.Callable[[], T_Result],
- bool_: typing.Callable[[], T_Result],
- list_: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ItemTypeEnum.STRING:
- return string()
- if self is ItemTypeEnum.NUMBER:
- return number()
- if self is ItemTypeEnum.DATE:
- return date()
- if self is ItemTypeEnum.DATETIME:
- return datetime()
- if self is ItemTypeEnum.BOOL:
- return bool_()
- if self is ItemTypeEnum.LIST:
- return list_()
+ItemTypeEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/crm/types/lead.py b/src/merge/resources/crm/types/lead.py
index b1faad46..6dddfe9b 100644
--- a/src/merge/resources/crm/types/lead.py
+++ b/src/merge/resources/crm/types/lead.py
@@ -1,21 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from .lead_owner import LeadOwner
from .address import Address
from .email_address import EmailAddress
-from .lead_converted_account import LeadConvertedAccount
-from .lead_converted_contact import LeadConvertedContact
-from .lead_owner import LeadOwner
from .phone_number import PhoneNumber
+from .lead_converted_contact import LeadConvertedContact
+from .lead_converted_account import LeadConvertedAccount
from .remote_data import RemoteData
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Lead(pydantic_v1.BaseModel):
+class Lead(UniversalBaseModel):
"""
# The Lead Object
@@ -29,47 +29,47 @@ class Lead(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- owner: typing.Optional[LeadOwner] = pydantic_v1.Field()
+ owner: typing.Optional[LeadOwner] = pydantic.Field()
"""
The lead's owner.
"""
- lead_source: typing.Optional[str] = pydantic_v1.Field()
+ lead_source: typing.Optional[str] = pydantic.Field()
"""
The lead's source.
"""
- title: typing.Optional[str] = pydantic_v1.Field()
+ title: typing.Optional[str] = pydantic.Field()
"""
The lead's title.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The lead's company.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The lead's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The lead's last name.
"""
@@ -77,50 +77,41 @@ class Lead(pydantic_v1.BaseModel):
addresses: typing.Optional[typing.List[Address]]
email_addresses: typing.Optional[typing.List[EmailAddress]]
phone_numbers: typing.Optional[typing.List[PhoneNumber]]
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's lead was updated.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's lead was created.
"""
- converted_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ converted_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the lead was converted.
"""
- converted_contact: typing.Optional[LeadConvertedContact] = pydantic_v1.Field()
+ converted_contact: typing.Optional[LeadConvertedContact] = pydantic.Field()
"""
The contact of the converted lead.
"""
- converted_account: typing.Optional[LeadConvertedAccount] = pydantic_v1.Field()
+ converted_account: typing.Optional[LeadConvertedAccount] = pydantic.Field()
"""
The account of the converted lead.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/lead_converted_account.py b/src/merge/resources/crm/types/lead_converted_account.py
index 9fa3a0fb..d256923e 100644
--- a/src/merge/resources/crm/types/lead_converted_account.py
+++ b/src/merge/resources/crm/types/lead_converted_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
LeadConvertedAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/lead_converted_contact.py b/src/merge/resources/crm/types/lead_converted_contact.py
index dc7f376b..859e0926 100644
--- a/src/merge/resources/crm/types/lead_converted_contact.py
+++ b/src/merge/resources/crm/types/lead_converted_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
LeadConvertedContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/crm/types/lead_owner.py b/src/merge/resources/crm/types/lead_owner.py
index 15b1c97f..fa682823 100644
--- a/src/merge/resources/crm/types/lead_owner.py
+++ b/src/merge/resources/crm/types/lead_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
LeadOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/lead_request.py b/src/merge/resources/crm/types/lead_request.py
index 4f3ef7df..b8628b87 100644
--- a/src/merge/resources/crm/types/lead_request.py
+++ b/src/merge/resources/crm/types/lead_request.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from .lead_request_owner import LeadRequestOwner
+import pydantic
from .address_request import AddressRequest
from .email_address_request import EmailAddressRequest
-from .lead_request_converted_account import LeadRequestConvertedAccount
-from .lead_request_converted_contact import LeadRequestConvertedContact
-from .lead_request_owner import LeadRequestOwner
from .phone_number_request import PhoneNumberRequest
+import datetime as dt
+from .lead_request_converted_contact import LeadRequestConvertedContact
+from .lead_request_converted_account import LeadRequestConvertedAccount
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class LeadRequest(pydantic_v1.BaseModel):
+class LeadRequest(UniversalBaseModel):
"""
# The Lead Object
@@ -27,32 +27,32 @@ class LeadRequest(pydantic_v1.BaseModel):
TODO
"""
- owner: typing.Optional[LeadRequestOwner] = pydantic_v1.Field()
+ owner: typing.Optional[LeadRequestOwner] = pydantic.Field()
"""
The lead's owner.
"""
- lead_source: typing.Optional[str] = pydantic_v1.Field()
+ lead_source: typing.Optional[str] = pydantic.Field()
"""
The lead's source.
"""
- title: typing.Optional[str] = pydantic_v1.Field()
+ title: typing.Optional[str] = pydantic.Field()
"""
The lead's title.
"""
- company: typing.Optional[str] = pydantic_v1.Field()
+ company: typing.Optional[str] = pydantic.Field()
"""
The lead's company.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The lead's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The lead's last name.
"""
@@ -60,39 +60,30 @@ class LeadRequest(pydantic_v1.BaseModel):
addresses: typing.Optional[typing.List[AddressRequest]]
email_addresses: typing.Optional[typing.List[EmailAddressRequest]]
phone_numbers: typing.Optional[typing.List[PhoneNumberRequest]]
- converted_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ converted_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the lead was converted.
"""
- converted_contact: typing.Optional[LeadRequestConvertedContact] = pydantic_v1.Field()
+ converted_contact: typing.Optional[LeadRequestConvertedContact] = pydantic.Field()
"""
The contact of the converted lead.
"""
- converted_account: typing.Optional[LeadRequestConvertedAccount] = pydantic_v1.Field()
+ converted_account: typing.Optional[LeadRequestConvertedAccount] = pydantic.Field()
"""
The account of the converted lead.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/lead_request_converted_account.py b/src/merge/resources/crm/types/lead_request_converted_account.py
index 6c66e7d6..0ad4044e 100644
--- a/src/merge/resources/crm/types/lead_request_converted_account.py
+++ b/src/merge/resources/crm/types/lead_request_converted_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
LeadRequestConvertedAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/lead_request_converted_contact.py b/src/merge/resources/crm/types/lead_request_converted_contact.py
index 8d7e5a8d..3bad706d 100644
--- a/src/merge/resources/crm/types/lead_request_converted_contact.py
+++ b/src/merge/resources/crm/types/lead_request_converted_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
LeadRequestConvertedContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/crm/types/lead_request_owner.py b/src/merge/resources/crm/types/lead_request_owner.py
index f0c6e51c..c5a043a7 100644
--- a/src/merge/resources/crm/types/lead_request_owner.py
+++ b/src/merge/resources/crm/types/lead_request_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
LeadRequestOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/lead_response.py b/src/merge/resources/crm/types/lead_response.py
index 2f4ed2bc..a8d60426 100644
--- a/src/merge/resources/crm/types/lead_response.py
+++ b/src/merge/resources/crm/types/lead_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .lead import Lead
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class LeadResponse(pydantic_v1.BaseModel):
+class LeadResponse(UniversalBaseModel):
model: Lead
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/link_token.py b/src/merge/resources/crm/types/link_token.py
index 1c82d1ac..1d25dddb 100644
--- a/src/merge/resources/crm/types/link_token.py
+++ b/src/merge/resources/crm/types/link_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkToken(pydantic_v1.BaseModel):
+class LinkToken(UniversalBaseModel):
link_token: str
integration_name: typing.Optional[str]
magic_link_url: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/linked_account_status.py b/src/merge/resources/crm/types/linked_account_status.py
index 60e21a98..2e27df33 100644
--- a/src/merge/resources/crm/types/linked_account_status.py
+++ b/src/merge/resources/crm/types/linked_account_status.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkedAccountStatus(pydantic_v1.BaseModel):
+class LinkedAccountStatus(UniversalBaseModel):
linked_account_status: str
can_make_request: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/meta_response.py b/src/merge/resources/crm/types/meta_response.py
index debaf4ef..44e57fde 100644
--- a/src/merge/resources/crm/types/meta_response.py
+++ b/src/merge/resources/crm/types/meta_response.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .linked_account_status import LinkedAccountStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class MetaResponse(pydantic_v1.BaseModel):
- request_schema: typing.Dict[str, typing.Any]
- remote_field_classes: typing.Optional[typing.Dict[str, typing.Any]]
+class MetaResponse(UniversalBaseModel):
+ request_schema: typing.Dict[str, typing.Optional[typing.Any]]
+ remote_field_classes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
status: typing.Optional[LinkedAccountStatus]
has_conditional_params: bool
has_required_linked_account_params: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/method_enum.py b/src/merge/resources/crm/types/method_enum.py
index c2418a83..e782e49c 100644
--- a/src/merge/resources/crm/types/method_enum.py
+++ b/src/merge/resources/crm/types/method_enum.py
@@ -1,51 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MethodEnum(str, enum.Enum):
- """
- - `GET` - GET
- - `OPTIONS` - OPTIONS
- - `HEAD` - HEAD
- - `POST` - POST
- - `PUT` - PUT
- - `PATCH` - PATCH
- - `DELETE` - DELETE
- """
-
- GET = "GET"
- OPTIONS = "OPTIONS"
- HEAD = "HEAD"
- POST = "POST"
- PUT = "PUT"
- PATCH = "PATCH"
- DELETE = "DELETE"
-
- def visit(
- self,
- get: typing.Callable[[], T_Result],
- options: typing.Callable[[], T_Result],
- head: typing.Callable[[], T_Result],
- post: typing.Callable[[], T_Result],
- put: typing.Callable[[], T_Result],
- patch: typing.Callable[[], T_Result],
- delete: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MethodEnum.GET:
- return get()
- if self is MethodEnum.OPTIONS:
- return options()
- if self is MethodEnum.HEAD:
- return head()
- if self is MethodEnum.POST:
- return post()
- if self is MethodEnum.PUT:
- return put()
- if self is MethodEnum.PATCH:
- return patch()
- if self is MethodEnum.DELETE:
- return delete()
+MethodEnum = typing.Union[typing.Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"], typing.Any]
diff --git a/src/merge/resources/crm/types/model_operation.py b/src/merge/resources/crm/types/model_operation.py
index 0f4429ec..2a12b6d5 100644
--- a/src/merge/resources/crm/types/model_operation.py
+++ b/src/merge/resources/crm/types/model_operation.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelOperation(pydantic_v1.BaseModel):
+class ModelOperation(UniversalBaseModel):
"""
# The ModelOperation Object
@@ -25,20 +24,11 @@ class ModelOperation(pydantic_v1.BaseModel):
required_post_parameters: typing.List[str]
supported_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/model_permission_deserializer.py b/src/merge/resources/crm/types/model_permission_deserializer.py
index 5a6adf20..b6d813e4 100644
--- a/src/merge/resources/crm/types/model_permission_deserializer.py
+++ b/src/merge/resources/crm/types/model_permission_deserializer.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializer(pydantic_v1.BaseModel):
+class ModelPermissionDeserializer(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/model_permission_deserializer_request.py b/src/merge/resources/crm/types/model_permission_deserializer_request.py
index 3f72b9ac..5885627b 100644
--- a/src/merge/resources/crm/types/model_permission_deserializer_request.py
+++ b/src/merge/resources/crm/types/model_permission_deserializer_request.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializerRequest(pydantic_v1.BaseModel):
+class ModelPermissionDeserializerRequest(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/multipart_form_field_request.py b/src/merge/resources/crm/types/multipart_form_field_request.py
index 9c8ffb21..80099016 100644
--- a/src/merge/resources/crm/types/multipart_form_field_request.py
+++ b/src/merge/resources/crm/types/multipart_form_field_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class MultipartFormFieldRequest(pydantic_v1.BaseModel):
+class MultipartFormFieldRequest(UniversalBaseModel):
"""
# The MultipartFormField Object
@@ -21,17 +20,17 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
Create a `MultipartFormField` to define a multipart form entry.
"""
- name: str = pydantic_v1.Field()
+ name: str = pydantic.Field()
"""
The name of the form field
"""
- data: str = pydantic_v1.Field()
+ data: str = pydantic.Field()
"""
The data for the form field.
"""
- encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic_v1.Field()
+ encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic.Field()
"""
The encoding of the value of `data`. Defaults to `RAW` if not defined.
@@ -40,30 +39,21 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
- `GZIP_BASE64` - GZIP_BASE64
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The file name of the form field, if the field is for a file.
"""
- content_type: typing.Optional[str] = pydantic_v1.Field()
+ content_type: typing.Optional[str] = pydantic.Field()
"""
The MIME type of the file, if the field is for a file.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/multipart_form_field_request_encoding.py b/src/merge/resources/crm/types/multipart_form_field_request_encoding.py
index c6513b6b..2b1db5ad 100644
--- a/src/merge/resources/crm/types/multipart_form_field_request_encoding.py
+++ b/src/merge/resources/crm/types/multipart_form_field_request_encoding.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .encoding_enum import EncodingEnum
MultipartFormFieldRequestEncoding = typing.Union[EncodingEnum, str]
diff --git a/src/merge/resources/crm/types/note.py b/src/merge/resources/crm/types/note.py
index cfdc9f29..69e7af49 100644
--- a/src/merge/resources/crm/types/note.py
+++ b/src/merge/resources/crm/types/note.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .note_account import NoteAccount
+import pydantic
+import datetime as dt
+from .note_owner import NoteOwner
from .note_contact import NoteContact
+from .note_account import NoteAccount
from .note_opportunity import NoteOpportunity
-from .note_owner import NoteOwner
from .remote_data import RemoteData
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Note(pydantic_v1.BaseModel):
+class Note(UniversalBaseModel):
"""
# The Note Object
@@ -27,75 +27,66 @@ class Note(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- owner: typing.Optional[NoteOwner] = pydantic_v1.Field()
+ owner: typing.Optional[NoteOwner] = pydantic.Field()
"""
The note's owner.
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The note's content.
"""
- contact: typing.Optional[NoteContact] = pydantic_v1.Field()
+ contact: typing.Optional[NoteContact] = pydantic.Field()
"""
The note's contact.
"""
- account: typing.Optional[NoteAccount] = pydantic_v1.Field()
+ account: typing.Optional[NoteAccount] = pydantic.Field()
"""
The note's account.
"""
- opportunity: typing.Optional[NoteOpportunity] = pydantic_v1.Field()
+ opportunity: typing.Optional[NoteOpportunity] = pydantic.Field()
"""
The note's opportunity.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's lead was updated.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's lead was created.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/note_account.py b/src/merge/resources/crm/types/note_account.py
index 5dcfbb0f..60b1fa69 100644
--- a/src/merge/resources/crm/types/note_account.py
+++ b/src/merge/resources/crm/types/note_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
NoteAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/note_contact.py b/src/merge/resources/crm/types/note_contact.py
index c1e000f6..a993da36 100644
--- a/src/merge/resources/crm/types/note_contact.py
+++ b/src/merge/resources/crm/types/note_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
NoteContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/crm/types/note_opportunity.py b/src/merge/resources/crm/types/note_opportunity.py
index c2c035a6..ae7a3b26 100644
--- a/src/merge/resources/crm/types/note_opportunity.py
+++ b/src/merge/resources/crm/types/note_opportunity.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .opportunity import Opportunity
NoteOpportunity = typing.Union[str, Opportunity]
diff --git a/src/merge/resources/crm/types/note_owner.py b/src/merge/resources/crm/types/note_owner.py
index 27f125fd..8efc4ec7 100644
--- a/src/merge/resources/crm/types/note_owner.py
+++ b/src/merge/resources/crm/types/note_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
NoteOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/note_request.py b/src/merge/resources/crm/types/note_request.py
index b93d31ca..e783a748 100644
--- a/src/merge/resources/crm/types/note_request.py
+++ b/src/merge/resources/crm/types/note_request.py
@@ -1,18 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .note_request_account import NoteRequestAccount
+from .note_request_owner import NoteRequestOwner
+import pydantic
from .note_request_contact import NoteRequestContact
+from .note_request_account import NoteRequestAccount
from .note_request_opportunity import NoteRequestOpportunity
-from .note_request_owner import NoteRequestOwner
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class NoteRequest(pydantic_v1.BaseModel):
+class NoteRequest(UniversalBaseModel):
"""
# The Note Object
@@ -25,49 +24,40 @@ class NoteRequest(pydantic_v1.BaseModel):
TODO
"""
- owner: typing.Optional[NoteRequestOwner] = pydantic_v1.Field()
+ owner: typing.Optional[NoteRequestOwner] = pydantic.Field()
"""
The note's owner.
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The note's content.
"""
- contact: typing.Optional[NoteRequestContact] = pydantic_v1.Field()
+ contact: typing.Optional[NoteRequestContact] = pydantic.Field()
"""
The note's contact.
"""
- account: typing.Optional[NoteRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[NoteRequestAccount] = pydantic.Field()
"""
The note's account.
"""
- opportunity: typing.Optional[NoteRequestOpportunity] = pydantic_v1.Field()
+ opportunity: typing.Optional[NoteRequestOpportunity] = pydantic.Field()
"""
The note's opportunity.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/note_request_account.py b/src/merge/resources/crm/types/note_request_account.py
index fbb7f8dd..58d0c6cf 100644
--- a/src/merge/resources/crm/types/note_request_account.py
+++ b/src/merge/resources/crm/types/note_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
NoteRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/note_request_contact.py b/src/merge/resources/crm/types/note_request_contact.py
index 3477ca0e..974f6add 100644
--- a/src/merge/resources/crm/types/note_request_contact.py
+++ b/src/merge/resources/crm/types/note_request_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
NoteRequestContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/crm/types/note_request_opportunity.py b/src/merge/resources/crm/types/note_request_opportunity.py
index c08bebf8..ddacb856 100644
--- a/src/merge/resources/crm/types/note_request_opportunity.py
+++ b/src/merge/resources/crm/types/note_request_opportunity.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .opportunity import Opportunity
NoteRequestOpportunity = typing.Union[str, Opportunity]
diff --git a/src/merge/resources/crm/types/note_request_owner.py b/src/merge/resources/crm/types/note_request_owner.py
index 558efe8f..281ef947 100644
--- a/src/merge/resources/crm/types/note_request_owner.py
+++ b/src/merge/resources/crm/types/note_request_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
NoteRequestOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/note_response.py b/src/merge/resources/crm/types/note_response.py
index 42d03987..bc76f3de 100644
--- a/src/merge/resources/crm/types/note_response.py
+++ b/src/merge/resources/crm/types/note_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .note import Note
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class NoteResponse(pydantic_v1.BaseModel):
+class NoteResponse(UniversalBaseModel):
model: Note
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/object_class_description_request.py b/src/merge/resources/crm/types/object_class_description_request.py
index 903a4803..36f0dbcc 100644
--- a/src/merge/resources/crm/types/object_class_description_request.py
+++ b/src/merge/resources/crm/types/object_class_description_request.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .origin_type_enum import OriginTypeEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class ObjectClassDescriptionRequest(pydantic_v1.BaseModel):
+class ObjectClassDescriptionRequest(UniversalBaseModel):
id: str
origin_type: OriginTypeEnum
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/opportunity.py b/src/merge/resources/crm/types/opportunity.py
index 0b3bca96..83621bf2 100644
--- a/src/merge/resources/crm/types/opportunity.py
+++ b/src/merge/resources/crm/types/opportunity.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .opportunity_account import OpportunityAccount
+import pydantic
+import datetime as dt
from .opportunity_owner import OpportunityOwner
+from .opportunity_account import OpportunityAccount
from .opportunity_stage import OpportunityStage
from .opportunity_status import OpportunityStatus
from .remote_data import RemoteData
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Opportunity(pydantic_v1.BaseModel):
+class Opportunity(UniversalBaseModel):
"""
# The Opportunity Object
@@ -27,52 +27,52 @@ class Opportunity(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The opportunity's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The opportunity's description.
"""
- amount: typing.Optional[int] = pydantic_v1.Field()
+ amount: typing.Optional[int] = pydantic.Field()
"""
The opportunity's amount.
"""
- owner: typing.Optional[OpportunityOwner] = pydantic_v1.Field()
+ owner: typing.Optional[OpportunityOwner] = pydantic.Field()
"""
The opportunity's owner.
"""
- account: typing.Optional[OpportunityAccount] = pydantic_v1.Field()
+ account: typing.Optional[OpportunityAccount] = pydantic.Field()
"""
The account of the opportunity.
"""
- stage: typing.Optional[OpportunityStage] = pydantic_v1.Field()
+ stage: typing.Optional[OpportunityStage] = pydantic.Field()
"""
The stage of the opportunity.
"""
- status: typing.Optional[OpportunityStatus] = pydantic_v1.Field()
+ status: typing.Optional[OpportunityStatus] = pydantic.Field()
"""
The opportunity's status.
@@ -81,40 +81,31 @@ class Opportunity(pydantic_v1.BaseModel):
- `LOST` - LOST
"""
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the opportunity's last activity occurred.
"""
- close_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ close_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the opportunity was closed.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's opportunity was created.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/opportunity_account.py b/src/merge/resources/crm/types/opportunity_account.py
index db9ff512..baef25cb 100644
--- a/src/merge/resources/crm/types/opportunity_account.py
+++ b/src/merge/resources/crm/types/opportunity_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
OpportunityAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/opportunity_owner.py b/src/merge/resources/crm/types/opportunity_owner.py
index 8ff3242c..1e59daac 100644
--- a/src/merge/resources/crm/types/opportunity_owner.py
+++ b/src/merge/resources/crm/types/opportunity_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
OpportunityOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/opportunity_request.py b/src/merge/resources/crm/types/opportunity_request.py
index e3344855..96c5b16b 100644
--- a/src/merge/resources/crm/types/opportunity_request.py
+++ b/src/merge/resources/crm/types/opportunity_request.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .opportunity_request_account import OpportunityRequestAccount
+import pydantic
from .opportunity_request_owner import OpportunityRequestOwner
+from .opportunity_request_account import OpportunityRequestAccount
from .opportunity_request_stage import OpportunityRequestStage
from .opportunity_request_status import OpportunityRequestStatus
+import datetime as dt
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class OpportunityRequest(pydantic_v1.BaseModel):
+class OpportunityRequest(UniversalBaseModel):
"""
# The Opportunity Object
@@ -25,37 +25,37 @@ class OpportunityRequest(pydantic_v1.BaseModel):
TODO
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The opportunity's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The opportunity's description.
"""
- amount: typing.Optional[int] = pydantic_v1.Field()
+ amount: typing.Optional[int] = pydantic.Field()
"""
The opportunity's amount.
"""
- owner: typing.Optional[OpportunityRequestOwner] = pydantic_v1.Field()
+ owner: typing.Optional[OpportunityRequestOwner] = pydantic.Field()
"""
The opportunity's owner.
"""
- account: typing.Optional[OpportunityRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[OpportunityRequestAccount] = pydantic.Field()
"""
The account of the opportunity.
"""
- stage: typing.Optional[OpportunityRequestStage] = pydantic_v1.Field()
+ stage: typing.Optional[OpportunityRequestStage] = pydantic.Field()
"""
The stage of the opportunity.
"""
- status: typing.Optional[OpportunityRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[OpportunityRequestStatus] = pydantic.Field()
"""
The opportunity's status.
@@ -64,34 +64,25 @@ class OpportunityRequest(pydantic_v1.BaseModel):
- `LOST` - LOST
"""
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the opportunity's last activity occurred.
"""
- close_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ close_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the opportunity was closed.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/opportunity_request_account.py b/src/merge/resources/crm/types/opportunity_request_account.py
index 4d405b9c..1c7de345 100644
--- a/src/merge/resources/crm/types/opportunity_request_account.py
+++ b/src/merge/resources/crm/types/opportunity_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
OpportunityRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/opportunity_request_owner.py b/src/merge/resources/crm/types/opportunity_request_owner.py
index d97f6d73..1b524713 100644
--- a/src/merge/resources/crm/types/opportunity_request_owner.py
+++ b/src/merge/resources/crm/types/opportunity_request_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
OpportunityRequestOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/opportunity_request_stage.py b/src/merge/resources/crm/types/opportunity_request_stage.py
index d781d136..e9e34ed1 100644
--- a/src/merge/resources/crm/types/opportunity_request_stage.py
+++ b/src/merge/resources/crm/types/opportunity_request_stage.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .stage import Stage
OpportunityRequestStage = typing.Union[str, Stage]
diff --git a/src/merge/resources/crm/types/opportunity_request_status.py b/src/merge/resources/crm/types/opportunity_request_status.py
index 110790a6..bded93fa 100644
--- a/src/merge/resources/crm/types/opportunity_request_status.py
+++ b/src/merge/resources/crm/types/opportunity_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .opportunity_status_enum import OpportunityStatusEnum
OpportunityRequestStatus = typing.Union[OpportunityStatusEnum, str]
diff --git a/src/merge/resources/crm/types/opportunity_response.py b/src/merge/resources/crm/types/opportunity_response.py
index 34d89d2c..fcfe47fc 100644
--- a/src/merge/resources/crm/types/opportunity_response.py
+++ b/src/merge/resources/crm/types/opportunity_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .opportunity import Opportunity
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class OpportunityResponse(pydantic_v1.BaseModel):
+class OpportunityResponse(UniversalBaseModel):
model: Opportunity
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/opportunity_stage.py b/src/merge/resources/crm/types/opportunity_stage.py
index d882ebd9..9c3335d6 100644
--- a/src/merge/resources/crm/types/opportunity_stage.py
+++ b/src/merge/resources/crm/types/opportunity_stage.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .stage import Stage
OpportunityStage = typing.Union[str, Stage]
diff --git a/src/merge/resources/crm/types/opportunity_status.py b/src/merge/resources/crm/types/opportunity_status.py
index 1f98d9ea..e1622d7b 100644
--- a/src/merge/resources/crm/types/opportunity_status.py
+++ b/src/merge/resources/crm/types/opportunity_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .opportunity_status_enum import OpportunityStatusEnum
OpportunityStatus = typing.Union[OpportunityStatusEnum, str]
diff --git a/src/merge/resources/crm/types/opportunity_status_enum.py b/src/merge/resources/crm/types/opportunity_status_enum.py
index eb980a4e..0235b976 100644
--- a/src/merge/resources/crm/types/opportunity_status_enum.py
+++ b/src/merge/resources/crm/types/opportunity_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OpportunityStatusEnum(str, enum.Enum):
- """
- - `OPEN` - OPEN
- - `WON` - WON
- - `LOST` - LOST
- """
-
- OPEN = "OPEN"
- WON = "WON"
- LOST = "LOST"
-
- def visit(
- self,
- open: typing.Callable[[], T_Result],
- won: typing.Callable[[], T_Result],
- lost: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OpportunityStatusEnum.OPEN:
- return open()
- if self is OpportunityStatusEnum.WON:
- return won()
- if self is OpportunityStatusEnum.LOST:
- return lost()
+OpportunityStatusEnum = typing.Union[typing.Literal["OPEN", "WON", "LOST"], typing.Any]
diff --git a/src/merge/resources/crm/types/origin_type_enum.py b/src/merge/resources/crm/types/origin_type_enum.py
index a369df01..ef6580dd 100644
--- a/src/merge/resources/crm/types/origin_type_enum.py
+++ b/src/merge/resources/crm/types/origin_type_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class OriginTypeEnum(str, enum.Enum):
- """
- - `CUSTOM_OBJECT` - CUSTOM_OBJECT
- - `COMMON_MODEL` - COMMON_MODEL
- - `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL
- """
-
- CUSTOM_OBJECT = "CUSTOM_OBJECT"
- COMMON_MODEL = "COMMON_MODEL"
- REMOTE_ONLY_MODEL = "REMOTE_ONLY_MODEL"
-
- def visit(
- self,
- custom_object: typing.Callable[[], T_Result],
- common_model: typing.Callable[[], T_Result],
- remote_only_model: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is OriginTypeEnum.CUSTOM_OBJECT:
- return custom_object()
- if self is OriginTypeEnum.COMMON_MODEL:
- return common_model()
- if self is OriginTypeEnum.REMOTE_ONLY_MODEL:
- return remote_only_model()
+OriginTypeEnum = typing.Union[typing.Literal["CUSTOM_OBJECT", "COMMON_MODEL", "REMOTE_ONLY_MODEL"], typing.Any]
diff --git a/src/merge/resources/crm/types/paginated_account_details_and_actions_list.py b/src/merge/resources/crm/types/paginated_account_details_and_actions_list.py
index 280100c4..a9128c76 100644
--- a/src/merge/resources/crm/types/paginated_account_details_and_actions_list.py
+++ b/src/merge/resources/crm/types/paginated_account_details_and_actions_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account_details_and_actions import AccountDetailsAndActions
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountDetailsAndActionsList(pydantic_v1.BaseModel):
+class PaginatedAccountDetailsAndActionsList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AccountDetailsAndActions]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_account_list.py b/src/merge/resources/crm/types/paginated_account_list.py
index 21d2cda1..b49c8fba 100644
--- a/src/merge/resources/crm/types/paginated_account_list.py
+++ b/src/merge/resources/crm/types/paginated_account_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account import Account
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountList(pydantic_v1.BaseModel):
+class PaginatedAccountList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Account]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_association_list.py b/src/merge/resources/crm/types/paginated_association_list.py
index fe6dda0f..1ee397a4 100644
--- a/src/merge/resources/crm/types/paginated_association_list.py
+++ b/src/merge/resources/crm/types/paginated_association_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .association import Association
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAssociationList(pydantic_v1.BaseModel):
+class PaginatedAssociationList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Association]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_association_type_list.py b/src/merge/resources/crm/types/paginated_association_type_list.py
index 58f2b1bf..6c8726e3 100644
--- a/src/merge/resources/crm/types/paginated_association_type_list.py
+++ b/src/merge/resources/crm/types/paginated_association_type_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .association_type import AssociationType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAssociationTypeList(pydantic_v1.BaseModel):
+class PaginatedAssociationTypeList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AssociationType]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_audit_log_event_list.py b/src/merge/resources/crm/types/paginated_audit_log_event_list.py
index 1d4154d2..a50b7c75 100644
--- a/src/merge/resources/crm/types/paginated_audit_log_event_list.py
+++ b/src/merge/resources/crm/types/paginated_audit_log_event_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .audit_log_event import AuditLogEvent
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAuditLogEventList(pydantic_v1.BaseModel):
+class PaginatedAuditLogEventList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AuditLogEvent]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_contact_list.py b/src/merge/resources/crm/types/paginated_contact_list.py
index dbe7c925..07c47744 100644
--- a/src/merge/resources/crm/types/paginated_contact_list.py
+++ b/src/merge/resources/crm/types/paginated_contact_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .contact import Contact
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedContactList(pydantic_v1.BaseModel):
+class PaginatedContactList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Contact]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_custom_object_class_list.py b/src/merge/resources/crm/types/paginated_custom_object_class_list.py
index adff716b..2237c8e4 100644
--- a/src/merge/resources/crm/types/paginated_custom_object_class_list.py
+++ b/src/merge/resources/crm/types/paginated_custom_object_class_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .custom_object_class import CustomObjectClass
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedCustomObjectClassList(pydantic_v1.BaseModel):
+class PaginatedCustomObjectClassList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[CustomObjectClass]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_custom_object_list.py b/src/merge/resources/crm/types/paginated_custom_object_list.py
index 565b35f3..72b2af33 100644
--- a/src/merge/resources/crm/types/paginated_custom_object_list.py
+++ b/src/merge/resources/crm/types/paginated_custom_object_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .custom_object import CustomObject
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedCustomObjectList(pydantic_v1.BaseModel):
+class PaginatedCustomObjectList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[CustomObject]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_engagement_list.py b/src/merge/resources/crm/types/paginated_engagement_list.py
index 45ec1b90..bd62a315 100644
--- a/src/merge/resources/crm/types/paginated_engagement_list.py
+++ b/src/merge/resources/crm/types/paginated_engagement_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .engagement import Engagement
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedEngagementList(pydantic_v1.BaseModel):
+class PaginatedEngagementList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Engagement]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_engagement_type_list.py b/src/merge/resources/crm/types/paginated_engagement_type_list.py
index 6748c9f0..d1515e2c 100644
--- a/src/merge/resources/crm/types/paginated_engagement_type_list.py
+++ b/src/merge/resources/crm/types/paginated_engagement_type_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .engagement_type import EngagementType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedEngagementTypeList(pydantic_v1.BaseModel):
+class PaginatedEngagementTypeList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[EngagementType]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_issue_list.py b/src/merge/resources/crm/types/paginated_issue_list.py
index 1016e29a..12b866d9 100644
--- a/src/merge/resources/crm/types/paginated_issue_list.py
+++ b/src/merge/resources/crm/types/paginated_issue_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue import Issue
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedIssueList(pydantic_v1.BaseModel):
+class PaginatedIssueList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Issue]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_lead_list.py b/src/merge/resources/crm/types/paginated_lead_list.py
index 9db391f4..e91b2228 100644
--- a/src/merge/resources/crm/types/paginated_lead_list.py
+++ b/src/merge/resources/crm/types/paginated_lead_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .lead import Lead
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedLeadList(pydantic_v1.BaseModel):
+class PaginatedLeadList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Lead]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_note_list.py b/src/merge/resources/crm/types/paginated_note_list.py
index b223ba28..560c64a3 100644
--- a/src/merge/resources/crm/types/paginated_note_list.py
+++ b/src/merge/resources/crm/types/paginated_note_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .note import Note
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedNoteList(pydantic_v1.BaseModel):
+class PaginatedNoteList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Note]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_opportunity_list.py b/src/merge/resources/crm/types/paginated_opportunity_list.py
index 1dd24e63..3c30e955 100644
--- a/src/merge/resources/crm/types/paginated_opportunity_list.py
+++ b/src/merge/resources/crm/types/paginated_opportunity_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .opportunity import Opportunity
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedOpportunityList(pydantic_v1.BaseModel):
+class PaginatedOpportunityList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Opportunity]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_remote_field_class_list.py b/src/merge/resources/crm/types/paginated_remote_field_class_list.py
index 9105daee..1f51ab63 100644
--- a/src/merge/resources/crm/types/paginated_remote_field_class_list.py
+++ b/src/merge/resources/crm/types/paginated_remote_field_class_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_field_class import RemoteFieldClass
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedRemoteFieldClassList(pydantic_v1.BaseModel):
+class PaginatedRemoteFieldClassList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[RemoteFieldClass]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_stage_list.py b/src/merge/resources/crm/types/paginated_stage_list.py
index 66cb59cc..3cde19f3 100644
--- a/src/merge/resources/crm/types/paginated_stage_list.py
+++ b/src/merge/resources/crm/types/paginated_stage_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .stage import Stage
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedStageList(pydantic_v1.BaseModel):
+class PaginatedStageList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Stage]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_sync_status_list.py b/src/merge/resources/crm/types/paginated_sync_status_list.py
index 6c88197e..f59f2c9a 100644
--- a/src/merge/resources/crm/types/paginated_sync_status_list.py
+++ b/src/merge/resources/crm/types/paginated_sync_status_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .sync_status import SyncStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedSyncStatusList(pydantic_v1.BaseModel):
+class PaginatedSyncStatusList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[SyncStatus]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_task_list.py b/src/merge/resources/crm/types/paginated_task_list.py
index 2388e837..d5bc07f4 100644
--- a/src/merge/resources/crm/types/paginated_task_list.py
+++ b/src/merge/resources/crm/types/paginated_task_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .task import Task
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedTaskList(pydantic_v1.BaseModel):
+class PaginatedTaskList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Task]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/paginated_user_list.py b/src/merge/resources/crm/types/paginated_user_list.py
index 6faaf352..98e9b7e5 100644
--- a/src/merge/resources/crm/types/paginated_user_list.py
+++ b/src/merge/resources/crm/types/paginated_user_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .user import User
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedUserList(pydantic_v1.BaseModel):
+class PaginatedUserList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[User]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/patched_account_request.py b/src/merge/resources/crm/types/patched_account_request.py
index 92a1e7d0..c422d16c 100644
--- a/src/merge/resources/crm/types/patched_account_request.py
+++ b/src/merge/resources/crm/types/patched_account_request.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .address_request import AddressRequest
+import datetime as dt
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PatchedAccountRequest(pydantic_v1.BaseModel):
+class PatchedAccountRequest(UniversalBaseModel):
"""
# The Account Object
@@ -22,60 +22,51 @@ class PatchedAccountRequest(pydantic_v1.BaseModel):
TODO
"""
- owner: typing.Optional[str] = pydantic_v1.Field()
+ owner: typing.Optional[str] = pydantic.Field()
"""
The account's owner.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The account's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The account's description.
"""
- industry: typing.Optional[str] = pydantic_v1.Field()
+ industry: typing.Optional[str] = pydantic.Field()
"""
The account's industry.
"""
- website: typing.Optional[str] = pydantic_v1.Field()
+ website: typing.Optional[str] = pydantic.Field()
"""
The account's website.
"""
- number_of_employees: typing.Optional[int] = pydantic_v1.Field()
+ number_of_employees: typing.Optional[int] = pydantic.Field()
"""
The account's number of employees.
"""
addresses: typing.Optional[typing.List[AddressRequest]]
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The last date (either most recent or furthest in the future) of when an activity occurs in an account.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/patched_contact_request.py b/src/merge/resources/crm/types/patched_contact_request.py
index c610d959..95ab9817 100644
--- a/src/merge/resources/crm/types/patched_contact_request.py
+++ b/src/merge/resources/crm/types/patched_contact_request.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+from .patched_contact_request_owner import PatchedContactRequestOwner
from .address_request import AddressRequest
from .email_address_request import EmailAddressRequest
-from .patched_contact_request_owner import PatchedContactRequestOwner
from .phone_number_request import PhoneNumberRequest
+import datetime as dt
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PatchedContactRequest(pydantic_v1.BaseModel):
+class PatchedContactRequest(UniversalBaseModel):
"""
# The Contact Object
@@ -25,22 +25,22 @@ class PatchedContactRequest(pydantic_v1.BaseModel):
TODO
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The contact's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The contact's last name.
"""
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The contact's account.
"""
- owner: typing.Optional[PatchedContactRequestOwner] = pydantic_v1.Field()
+ owner: typing.Optional[PatchedContactRequestOwner] = pydantic.Field()
"""
The contact's owner.
"""
@@ -48,29 +48,20 @@ class PatchedContactRequest(pydantic_v1.BaseModel):
addresses: typing.Optional[typing.List[AddressRequest]]
email_addresses: typing.Optional[typing.List[EmailAddressRequest]]
phone_numbers: typing.Optional[typing.List[PhoneNumberRequest]]
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the contact's last activity occurred.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/patched_contact_request_owner.py b/src/merge/resources/crm/types/patched_contact_request_owner.py
index 00bd5551..72e59932 100644
--- a/src/merge/resources/crm/types/patched_contact_request_owner.py
+++ b/src/merge/resources/crm/types/patched_contact_request_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
PatchedContactRequestOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/patched_engagement_request.py b/src/merge/resources/crm/types/patched_engagement_request.py
index f06710a9..1abf3f35 100644
--- a/src/merge/resources/crm/types/patched_engagement_request.py
+++ b/src/merge/resources/crm/types/patched_engagement_request.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .patched_engagement_request_direction import PatchedEngagementRequestDirection
+import datetime as dt
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PatchedEngagementRequest(pydantic_v1.BaseModel):
+class PatchedEngagementRequest(UniversalBaseModel):
"""
# The Engagement Object
@@ -22,22 +22,22 @@ class PatchedEngagementRequest(pydantic_v1.BaseModel):
TODO
"""
- owner: typing.Optional[str] = pydantic_v1.Field()
+ owner: typing.Optional[str] = pydantic.Field()
"""
The engagement's owner.
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The engagement's content.
"""
- subject: typing.Optional[str] = pydantic_v1.Field()
+ subject: typing.Optional[str] = pydantic.Field()
"""
The engagement's subject.
"""
- direction: typing.Optional[PatchedEngagementRequestDirection] = pydantic_v1.Field()
+ direction: typing.Optional[PatchedEngagementRequestDirection] = pydantic.Field()
"""
The engagement's direction.
@@ -45,45 +45,36 @@ class PatchedEngagementRequest(pydantic_v1.BaseModel):
- `OUTBOUND` - OUTBOUND
"""
- engagement_type: typing.Optional[str] = pydantic_v1.Field()
+ engagement_type: typing.Optional[str] = pydantic.Field()
"""
The engagement type of the engagement.
"""
- start_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the engagement started.
"""
- end_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the engagement ended.
"""
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The account of the engagement.
"""
contacts: typing.Optional[typing.List[typing.Optional[str]]]
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/patched_engagement_request_direction.py b/src/merge/resources/crm/types/patched_engagement_request_direction.py
index daa08d51..3be68f5b 100644
--- a/src/merge/resources/crm/types/patched_engagement_request_direction.py
+++ b/src/merge/resources/crm/types/patched_engagement_request_direction.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .direction_enum import DirectionEnum
PatchedEngagementRequestDirection = typing.Union[DirectionEnum, str]
diff --git a/src/merge/resources/crm/types/patched_opportunity_request.py b/src/merge/resources/crm/types/patched_opportunity_request.py
index 5b357bd2..66659b8f 100644
--- a/src/merge/resources/crm/types/patched_opportunity_request.py
+++ b/src/merge/resources/crm/types/patched_opportunity_request.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .patched_opportunity_request_status import PatchedOpportunityRequestStatus
+import datetime as dt
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PatchedOpportunityRequest(pydantic_v1.BaseModel):
+class PatchedOpportunityRequest(UniversalBaseModel):
"""
# The Opportunity Object
@@ -22,37 +22,37 @@ class PatchedOpportunityRequest(pydantic_v1.BaseModel):
TODO
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The opportunity's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The opportunity's description.
"""
- amount: typing.Optional[int] = pydantic_v1.Field()
+ amount: typing.Optional[int] = pydantic.Field()
"""
The opportunity's amount.
"""
- owner: typing.Optional[str] = pydantic_v1.Field()
+ owner: typing.Optional[str] = pydantic.Field()
"""
The opportunity's owner.
"""
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The account of the opportunity.
"""
- stage: typing.Optional[str] = pydantic_v1.Field()
+ stage: typing.Optional[str] = pydantic.Field()
"""
The stage of the opportunity.
"""
- status: typing.Optional[PatchedOpportunityRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[PatchedOpportunityRequestStatus] = pydantic.Field()
"""
The opportunity's status.
@@ -61,34 +61,25 @@ class PatchedOpportunityRequest(pydantic_v1.BaseModel):
- `LOST` - LOST
"""
- last_activity_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ last_activity_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the opportunity's last activity occurred.
"""
- close_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ close_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the opportunity was closed.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/patched_opportunity_request_status.py b/src/merge/resources/crm/types/patched_opportunity_request_status.py
index a15565f9..32133d47 100644
--- a/src/merge/resources/crm/types/patched_opportunity_request_status.py
+++ b/src/merge/resources/crm/types/patched_opportunity_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .opportunity_status_enum import OpportunityStatusEnum
PatchedOpportunityRequestStatus = typing.Union[OpportunityStatusEnum, str]
diff --git a/src/merge/resources/crm/types/patched_task_request.py b/src/merge/resources/crm/types/patched_task_request.py
index ade5b200..9a581187 100644
--- a/src/merge/resources/crm/types/patched_task_request.py
+++ b/src/merge/resources/crm/types/patched_task_request.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .patched_task_request_status import PatchedTaskRequestStatus
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PatchedTaskRequest(pydantic_v1.BaseModel):
+class PatchedTaskRequest(UniversalBaseModel):
"""
# The Task Object
@@ -22,42 +22,42 @@ class PatchedTaskRequest(pydantic_v1.BaseModel):
TODO
"""
- subject: typing.Optional[str] = pydantic_v1.Field()
+ subject: typing.Optional[str] = pydantic.Field()
"""
The task's subject.
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The task's content.
"""
- owner: typing.Optional[str] = pydantic_v1.Field()
+ owner: typing.Optional[str] = pydantic.Field()
"""
The task's owner.
"""
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The task's account.
"""
- opportunity: typing.Optional[str] = pydantic_v1.Field()
+ opportunity: typing.Optional[str] = pydantic.Field()
"""
The task's opportunity.
"""
- completed_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ completed_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the task is completed.
"""
- due_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ due_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the task is due.
"""
- status: typing.Optional[PatchedTaskRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[PatchedTaskRequestStatus] = pydantic.Field()
"""
The task's status.
@@ -65,24 +65,15 @@ class PatchedTaskRequest(pydantic_v1.BaseModel):
- `CLOSED` - CLOSED
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/patched_task_request_status.py b/src/merge/resources/crm/types/patched_task_request_status.py
index 0432b058..d91cdfd9 100644
--- a/src/merge/resources/crm/types/patched_task_request_status.py
+++ b/src/merge/resources/crm/types/patched_task_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .task_status_enum import TaskStatusEnum
PatchedTaskRequestStatus = typing.Union[TaskStatusEnum, str]
diff --git a/src/merge/resources/crm/types/phone_number.py b/src/merge/resources/crm/types/phone_number.py
index 30be246c..ca99e40e 100644
--- a/src/merge/resources/crm/types/phone_number.py
+++ b/src/merge/resources/crm/types/phone_number.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PhoneNumber(pydantic_v1.BaseModel):
+class PhoneNumber(UniversalBaseModel):
"""
# The PhoneNumber Object
@@ -20,40 +20,31 @@ class PhoneNumber(pydantic_v1.BaseModel):
Fetch from the `GET Contact` endpoint and view their phone numbers.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- phone_number: typing.Optional[str] = pydantic_v1.Field()
+ phone_number: typing.Optional[str] = pydantic.Field()
"""
The phone number.
"""
- phone_number_type: typing.Optional[str] = pydantic_v1.Field()
+ phone_number_type: typing.Optional[str] = pydantic.Field()
"""
The phone number's type.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/phone_number_request.py b/src/merge/resources/crm/types/phone_number_request.py
index 1569e5be..9a23d09e 100644
--- a/src/merge/resources/crm/types/phone_number_request.py
+++ b/src/merge/resources/crm/types/phone_number_request.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class PhoneNumberRequest(pydantic_v1.BaseModel):
+class PhoneNumberRequest(UniversalBaseModel):
"""
# The PhoneNumber Object
@@ -20,33 +19,24 @@ class PhoneNumberRequest(pydantic_v1.BaseModel):
Fetch from the `GET Contact` endpoint and view their phone numbers.
"""
- phone_number: typing.Optional[str] = pydantic_v1.Field()
+ phone_number: typing.Optional[str] = pydantic.Field()
"""
The phone number.
"""
- phone_number_type: typing.Optional[str] = pydantic_v1.Field()
+ phone_number_type: typing.Optional[str] = pydantic.Field()
"""
The phone number's type.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/reason_enum.py b/src/merge/resources/crm/types/reason_enum.py
index d14efa20..3e4661d2 100644
--- a/src/merge/resources/crm/types/reason_enum.py
+++ b/src/merge/resources/crm/types/reason_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ReasonEnum(str, enum.Enum):
- """
- - `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST
- - `GDPR` - GDPR
- - `OTHER` - OTHER
- """
-
- GENERAL_CUSTOMER_REQUEST = "GENERAL_CUSTOMER_REQUEST"
- GDPR = "GDPR"
- OTHER = "OTHER"
-
- def visit(
- self,
- general_customer_request: typing.Callable[[], T_Result],
- gdpr: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ReasonEnum.GENERAL_CUSTOMER_REQUEST:
- return general_customer_request()
- if self is ReasonEnum.GDPR:
- return gdpr()
- if self is ReasonEnum.OTHER:
- return other()
+ReasonEnum = typing.Union[typing.Literal["GENERAL_CUSTOMER_REQUEST", "GDPR", "OTHER"], typing.Any]
diff --git a/src/merge/resources/crm/types/remote_data.py b/src/merge/resources/crm/types/remote_data.py
index 098f551b..27c2a5f2 100644
--- a/src/merge/resources/crm/types/remote_data.py
+++ b/src/merge/resources/crm/types/remote_data.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteData(pydantic_v1.BaseModel):
+class RemoteData(UniversalBaseModel):
path: str
- data: typing.Optional[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ data: typing.Optional[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_endpoint_info.py b/src/merge/resources/crm/types/remote_endpoint_info.py
index da6037bc..454688d0 100644
--- a/src/merge/resources/crm/types/remote_endpoint_info.py
+++ b/src/merge/resources/crm/types/remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteEndpointInfo(pydantic_v1.BaseModel):
+class RemoteEndpointInfo(UniversalBaseModel):
method: str
url_path: str
- field_traversal_path: typing.List[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_traversal_path: typing.List[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field.py b/src/merge/resources/crm/types/remote_field.py
index 6d504ed7..0d50d6c8 100644
--- a/src/merge/resources/crm/types/remote_field.py
+++ b/src/merge/resources/crm/types/remote_field.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .remote_field_remote_field_class import RemoteFieldRemoteFieldClass
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteField(pydantic_v1.BaseModel):
+class RemoteField(UniversalBaseModel):
remote_field_class: RemoteFieldRemoteFieldClass
- value: typing.Optional[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ value: typing.Optional[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field_api.py b/src/merge/resources/crm/types/remote_field_api.py
index ffa9299c..18f2421d 100644
--- a/src/merge/resources/crm/types/remote_field_api.py
+++ b/src/merge/resources/crm/types/remote_field_api.py
@@ -1,39 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .advanced_metadata import AdvancedMetadata
+import pydantic
from .remote_endpoint_info import RemoteEndpointInfo
+from .advanced_metadata import AdvancedMetadata
from .remote_field_api_coverage import RemoteFieldApiCoverage
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteFieldApi(pydantic_v1.BaseModel):
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+class RemoteFieldApi(UniversalBaseModel):
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_key_name: str
remote_endpoint_info: RemoteEndpointInfo
- example_values: typing.Optional[typing.List[typing.Any]]
+ example_values: typing.Optional[typing.List[typing.Optional[typing.Any]]]
advanced_metadata: typing.Optional[AdvancedMetadata]
coverage: typing.Optional[RemoteFieldApiCoverage]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field_api_response.py b/src/merge/resources/crm/types/remote_field_api_response.py
index ab188888..63dd1816 100644
--- a/src/merge/resources/crm/types/remote_field_api_response.py
+++ b/src/merge/resources/crm/types/remote_field_api_response.py
@@ -1,40 +1,28 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_field_api import RemoteFieldApi
-
-
-class RemoteFieldApiResponse(pydantic_v1.BaseModel):
- account: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Account")
- contact: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Contact")
- lead: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Lead")
- note: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Note")
- opportunity: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Opportunity")
- stage: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Stage")
- user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="User")
- task: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Task")
- engagement: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Engagement")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class RemoteFieldApiResponse(UniversalBaseModel):
+ account: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Account")
+ contact: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Contact")
+ lead: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Lead")
+ note: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Note")
+ opportunity: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Opportunity")
+ stage: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Stage")
+ user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="User")
+ task: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Task")
+ engagement: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Engagement")
+
+ 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/merge/resources/crm/types/remote_field_class.py b/src/merge/resources/crm/types/remote_field_class.py
index d8f7a788..7abfc779 100644
--- a/src/merge/resources/crm/types/remote_field_class.py
+++ b/src/merge/resources/crm/types/remote_field_class.py
@@ -1,17 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .item_schema import ItemSchema
-from .remote_field_class_field_choices_item import RemoteFieldClassFieldChoicesItem
-from .remote_field_class_field_format import RemoteFieldClassFieldFormat
from .remote_field_class_field_type import RemoteFieldClassFieldType
+from .remote_field_class_field_format import RemoteFieldClassFieldFormat
+from .remote_field_class_field_choices_item import RemoteFieldClassFieldChoicesItem
+from .item_schema import ItemSchema
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteFieldClass(pydantic_v1.BaseModel):
+class RemoteFieldClass(UniversalBaseModel):
id: typing.Optional[str]
display_name: typing.Optional[str]
remote_key_name: typing.Optional[str]
@@ -23,20 +22,11 @@ class RemoteFieldClass(pydantic_v1.BaseModel):
field_choices: typing.Optional[typing.List[RemoteFieldClassFieldChoicesItem]]
item_schema: typing.Optional[ItemSchema]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field_class_field_choices_item.py b/src/merge/resources/crm/types/remote_field_class_field_choices_item.py
index 19926fa0..8ae991ae 100644
--- a/src/merge/resources/crm/types/remote_field_class_field_choices_item.py
+++ b/src/merge/resources/crm/types/remote_field_class_field_choices_item.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteFieldClassFieldChoicesItem(pydantic_v1.BaseModel):
- value: typing.Optional[typing.Any]
+class RemoteFieldClassFieldChoicesItem(UniversalBaseModel):
+ value: typing.Optional[typing.Optional[typing.Any]]
display_name: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field_class_field_format.py b/src/merge/resources/crm/types/remote_field_class_field_format.py
index 13634337..c9c897d2 100644
--- a/src/merge/resources/crm/types/remote_field_class_field_format.py
+++ b/src/merge/resources/crm/types/remote_field_class_field_format.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .field_format_enum import FieldFormatEnum
RemoteFieldClassFieldFormat = typing.Union[FieldFormatEnum, str]
diff --git a/src/merge/resources/crm/types/remote_field_class_field_type.py b/src/merge/resources/crm/types/remote_field_class_field_type.py
index 48735d56..7f0f3620 100644
--- a/src/merge/resources/crm/types/remote_field_class_field_type.py
+++ b/src/merge/resources/crm/types/remote_field_class_field_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .field_type_enum import FieldTypeEnum
RemoteFieldClassFieldType = typing.Union[FieldTypeEnum, str]
diff --git a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py
index 230ed9e1..75012af9 100644
--- a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py
+++ b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py
@@ -1,25 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import datetime as dt
+import pydantic
+from .remote_field_class_for_custom_object_class_field_type import RemoteFieldClassForCustomObjectClassFieldType
+from .remote_field_class_for_custom_object_class_field_format import RemoteFieldClassForCustomObjectClassFieldFormat
from .remote_field_class_for_custom_object_class_field_choices_item import (
RemoteFieldClassForCustomObjectClassFieldChoicesItem,
)
-from .remote_field_class_for_custom_object_class_field_format import RemoteFieldClassForCustomObjectClassFieldFormat
-from .remote_field_class_for_custom_object_class_field_type import RemoteFieldClassForCustomObjectClassFieldType
from .remote_field_class_for_custom_object_class_item_schema import RemoteFieldClassForCustomObjectClassItemSchema
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteFieldClassForCustomObjectClass(pydantic_v1.BaseModel):
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+class RemoteFieldClassForCustomObjectClass(UniversalBaseModel):
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
@@ -33,20 +33,11 @@ class RemoteFieldClassForCustomObjectClass(pydantic_v1.BaseModel):
field_choices: typing.Optional[typing.List[RemoteFieldClassForCustomObjectClassFieldChoicesItem]]
item_schema: typing.Optional[RemoteFieldClassForCustomObjectClassItemSchema]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_choices_item.py b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_choices_item.py
index fa4b5978..6d1bcb7a 100644
--- a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_choices_item.py
+++ b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_choices_item.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteFieldClassForCustomObjectClassFieldChoicesItem(pydantic_v1.BaseModel):
- value: typing.Optional[typing.Any]
+class RemoteFieldClassForCustomObjectClassFieldChoicesItem(UniversalBaseModel):
+ value: typing.Optional[typing.Optional[typing.Any]]
display_name: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_format.py b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_format.py
index 1393666d..ee1fcab4 100644
--- a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_format.py
+++ b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_format.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .field_format_enum import FieldFormatEnum
RemoteFieldClassForCustomObjectClassFieldFormat = typing.Union[FieldFormatEnum, str]
diff --git a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_type.py b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_type.py
index dde99f51..5e860cd2 100644
--- a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_type.py
+++ b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_field_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .field_type_enum import FieldTypeEnum
RemoteFieldClassForCustomObjectClassFieldType = typing.Union[FieldTypeEnum, str]
diff --git a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_item_schema.py b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_item_schema.py
index f7305515..e1f83c79 100644
--- a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_item_schema.py
+++ b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class_item_schema.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteFieldClassForCustomObjectClassItemSchema(pydantic_v1.BaseModel):
+class RemoteFieldClassForCustomObjectClassItemSchema(UniversalBaseModel):
item_type: typing.Optional[str]
item_format: typing.Optional[str]
item_choices: typing.Optional[typing.List[typing.Optional[str]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field_remote_field_class.py b/src/merge/resources/crm/types/remote_field_remote_field_class.py
index b7ab0ef6..c2c470c9 100644
--- a/src/merge/resources/crm/types/remote_field_remote_field_class.py
+++ b/src/merge/resources/crm/types/remote_field_remote_field_class.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_field_class import RemoteFieldClass
RemoteFieldRemoteFieldClass = typing.Union[str, RemoteFieldClass]
diff --git a/src/merge/resources/crm/types/remote_field_request.py b/src/merge/resources/crm/types/remote_field_request.py
index c00c9406..bf5b7ce4 100644
--- a/src/merge/resources/crm/types/remote_field_request.py
+++ b/src/merge/resources/crm/types/remote_field_request.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .remote_field_request_remote_field_class import RemoteFieldRequestRemoteFieldClass
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteFieldRequest(pydantic_v1.BaseModel):
+class RemoteFieldRequest(UniversalBaseModel):
remote_field_class: RemoteFieldRequestRemoteFieldClass
- value: typing.Optional[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ value: typing.Optional[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_field_request_remote_field_class.py b/src/merge/resources/crm/types/remote_field_request_remote_field_class.py
index 08797e5e..ebf56780 100644
--- a/src/merge/resources/crm/types/remote_field_request_remote_field_class.py
+++ b/src/merge/resources/crm/types/remote_field_request_remote_field_class.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_field_class import RemoteFieldClass
RemoteFieldRequestRemoteFieldClass = typing.Union[str, RemoteFieldClass]
diff --git a/src/merge/resources/crm/types/remote_key.py b/src/merge/resources/crm/types/remote_key.py
index e0bec368..7a61c212 100644
--- a/src/merge/resources/crm/types/remote_key.py
+++ b/src/merge/resources/crm/types/remote_key.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteKey(pydantic_v1.BaseModel):
+class RemoteKey(UniversalBaseModel):
"""
# The RemoteKey Object
@@ -23,20 +22,11 @@ class RemoteKey(pydantic_v1.BaseModel):
name: str
key: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/remote_response.py b/src/merge/resources/crm/types/remote_response.py
index f39951ee..e2d1620d 100644
--- a/src/merge/resources/crm/types/remote_response.py
+++ b/src/merge/resources/crm/types/remote_response.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .response_type_enum import ResponseTypeEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteResponse(pydantic_v1.BaseModel):
+class RemoteResponse(UniversalBaseModel):
"""
# The RemoteResponse Object
@@ -24,25 +23,16 @@ class RemoteResponse(pydantic_v1.BaseModel):
method: str
path: str
status: int
- response: typing.Any
- response_headers: typing.Optional[typing.Dict[str, typing.Any]]
+ response: typing.Optional[typing.Any]
+ response_headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
response_type: typing.Optional[ResponseTypeEnum]
- headers: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/request_format_enum.py b/src/merge/resources/crm/types/request_format_enum.py
index bf445b71..dc284f25 100644
--- a/src/merge/resources/crm/types/request_format_enum.py
+++ b/src/merge/resources/crm/types/request_format_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RequestFormatEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `XML` - XML
- - `MULTIPART` - MULTIPART
- """
-
- JSON = "JSON"
- XML = "XML"
- MULTIPART = "MULTIPART"
-
- def visit(
- self,
- json: typing.Callable[[], T_Result],
- xml: typing.Callable[[], T_Result],
- multipart: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RequestFormatEnum.JSON:
- return json()
- if self is RequestFormatEnum.XML:
- return xml()
- if self is RequestFormatEnum.MULTIPART:
- return multipart()
+RequestFormatEnum = typing.Union[typing.Literal["JSON", "XML", "MULTIPART"], typing.Any]
diff --git a/src/merge/resources/crm/types/response_type_enum.py b/src/merge/resources/crm/types/response_type_enum.py
index 4b44d47d..7e4d5d30 100644
--- a/src/merge/resources/crm/types/response_type_enum.py
+++ b/src/merge/resources/crm/types/response_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ResponseTypeEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `BASE64_GZIP` - BASE64_GZIP
- """
-
- JSON = "JSON"
- BASE_64_GZIP = "BASE64_GZIP"
-
- def visit(self, json: typing.Callable[[], T_Result], base_64_gzip: typing.Callable[[], T_Result]) -> T_Result:
- if self is ResponseTypeEnum.JSON:
- return json()
- if self is ResponseTypeEnum.BASE_64_GZIP:
- return base_64_gzip()
+ResponseTypeEnum = typing.Union[typing.Literal["JSON", "BASE64_GZIP"], typing.Any]
diff --git a/src/merge/resources/crm/types/role_enum.py b/src/merge/resources/crm/types/role_enum.py
index 05e09112..65066251 100644
--- a/src/merge/resources/crm/types/role_enum.py
+++ b/src/merge/resources/crm/types/role_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RoleEnum(str, enum.Enum):
- """
- - `ADMIN` - ADMIN
- - `DEVELOPER` - DEVELOPER
- - `MEMBER` - MEMBER
- - `API` - API
- - `SYSTEM` - SYSTEM
- - `MERGE_TEAM` - MERGE_TEAM
- """
-
- ADMIN = "ADMIN"
- DEVELOPER = "DEVELOPER"
- MEMBER = "MEMBER"
- API = "API"
- SYSTEM = "SYSTEM"
- MERGE_TEAM = "MERGE_TEAM"
-
- def visit(
- self,
- admin: typing.Callable[[], T_Result],
- developer: typing.Callable[[], T_Result],
- member: typing.Callable[[], T_Result],
- api: typing.Callable[[], T_Result],
- system: typing.Callable[[], T_Result],
- merge_team: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RoleEnum.ADMIN:
- return admin()
- if self is RoleEnum.DEVELOPER:
- return developer()
- if self is RoleEnum.MEMBER:
- return member()
- if self is RoleEnum.API:
- return api()
- if self is RoleEnum.SYSTEM:
- return system()
- if self is RoleEnum.MERGE_TEAM:
- return merge_team()
+RoleEnum = typing.Union[typing.Literal["ADMIN", "DEVELOPER", "MEMBER", "API", "SYSTEM", "MERGE_TEAM"], typing.Any]
diff --git a/src/merge/resources/crm/types/selective_sync_configurations_usage_enum.py b/src/merge/resources/crm/types/selective_sync_configurations_usage_enum.py
index 4de6df94..baa6f2bd 100644
--- a/src/merge/resources/crm/types/selective_sync_configurations_usage_enum.py
+++ b/src/merge/resources/crm/types/selective_sync_configurations_usage_enum.py
@@ -1,24 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SelectiveSyncConfigurationsUsageEnum(str, enum.Enum):
- """
- - `IN_NEXT_SYNC` - IN_NEXT_SYNC
- - `IN_LAST_SYNC` - IN_LAST_SYNC
- """
-
- IN_NEXT_SYNC = "IN_NEXT_SYNC"
- IN_LAST_SYNC = "IN_LAST_SYNC"
-
- def visit(
- self, in_next_sync: typing.Callable[[], T_Result], in_last_sync: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is SelectiveSyncConfigurationsUsageEnum.IN_NEXT_SYNC:
- return in_next_sync()
- if self is SelectiveSyncConfigurationsUsageEnum.IN_LAST_SYNC:
- return in_last_sync()
+SelectiveSyncConfigurationsUsageEnum = typing.Union[typing.Literal["IN_NEXT_SYNC", "IN_LAST_SYNC"], typing.Any]
diff --git a/src/merge/resources/crm/types/stage.py b/src/merge/resources/crm/types/stage.py
index 16e269e0..c5e081b0 100644
--- a/src/merge/resources/crm/types/stage.py
+++ b/src/merge/resources/crm/types/stage.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Stage(pydantic_v1.BaseModel):
+class Stage(UniversalBaseModel):
"""
# The Stage Object
@@ -23,49 +23,40 @@ class Stage(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The stage's name.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/sync_status.py b/src/merge/resources/crm/types/sync_status.py
index c6b7cbc4..f9a62229 100644
--- a/src/merge/resources/crm/types/sync_status.py
+++ b/src/merge/resources/crm/types/sync_status.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+import datetime as dt
from .sync_status_status_enum import SyncStatusStatusEnum
+from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class SyncStatus(pydantic_v1.BaseModel):
+class SyncStatus(UniversalBaseModel):
"""
# The SyncStatus Object
@@ -30,20 +30,11 @@ class SyncStatus(pydantic_v1.BaseModel):
is_initial_sync: bool
selective_sync_configurations_usage: typing.Optional[SelectiveSyncConfigurationsUsageEnum]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/sync_status_status_enum.py b/src/merge/resources/crm/types/sync_status_status_enum.py
index e21e3285..92814990 100644
--- a/src/merge/resources/crm/types/sync_status_status_enum.py
+++ b/src/merge/resources/crm/types/sync_status_status_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SyncStatusStatusEnum(str, enum.Enum):
- """
- - `SYNCING` - SYNCING
- - `DONE` - DONE
- - `FAILED` - FAILED
- - `DISABLED` - DISABLED
- - `PAUSED` - PAUSED
- - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED
- """
-
- SYNCING = "SYNCING"
- DONE = "DONE"
- FAILED = "FAILED"
- DISABLED = "DISABLED"
- PAUSED = "PAUSED"
- PARTIALLY_SYNCED = "PARTIALLY_SYNCED"
-
- def visit(
- self,
- syncing: typing.Callable[[], T_Result],
- done: typing.Callable[[], T_Result],
- failed: typing.Callable[[], T_Result],
- disabled: typing.Callable[[], T_Result],
- paused: typing.Callable[[], T_Result],
- partially_synced: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SyncStatusStatusEnum.SYNCING:
- return syncing()
- if self is SyncStatusStatusEnum.DONE:
- return done()
- if self is SyncStatusStatusEnum.FAILED:
- return failed()
- if self is SyncStatusStatusEnum.DISABLED:
- return disabled()
- if self is SyncStatusStatusEnum.PAUSED:
- return paused()
- if self is SyncStatusStatusEnum.PARTIALLY_SYNCED:
- return partially_synced()
+SyncStatusStatusEnum = typing.Union[
+ typing.Literal["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"], typing.Any
+]
diff --git a/src/merge/resources/crm/types/task.py b/src/merge/resources/crm/types/task.py
index c07e3f38..a8fa2998 100644
--- a/src/merge/resources/crm/types/task.py
+++ b/src/merge/resources/crm/types/task.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
-from .remote_field import RemoteField
+import pydantic
+import datetime as dt
+from .task_owner import TaskOwner
from .task_account import TaskAccount
from .task_opportunity import TaskOpportunity
-from .task_owner import TaskOwner
from .task_status import TaskStatus
+from .remote_data import RemoteData
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Task(pydantic_v1.BaseModel):
+class Task(UniversalBaseModel):
"""
# The Task Object
@@ -27,57 +27,57 @@ class Task(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- subject: typing.Optional[str] = pydantic_v1.Field()
+ subject: typing.Optional[str] = pydantic.Field()
"""
The task's subject.
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The task's content.
"""
- owner: typing.Optional[TaskOwner] = pydantic_v1.Field()
+ owner: typing.Optional[TaskOwner] = pydantic.Field()
"""
The task's owner.
"""
- account: typing.Optional[TaskAccount] = pydantic_v1.Field()
+ account: typing.Optional[TaskAccount] = pydantic.Field()
"""
The task's account.
"""
- opportunity: typing.Optional[TaskOpportunity] = pydantic_v1.Field()
+ opportunity: typing.Optional[TaskOpportunity] = pydantic.Field()
"""
The task's opportunity.
"""
- completed_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ completed_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the task is completed.
"""
- due_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ due_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the task is due.
"""
- status: typing.Optional[TaskStatus] = pydantic_v1.Field()
+ status: typing.Optional[TaskStatus] = pydantic.Field()
"""
The task's status.
@@ -85,29 +85,20 @@ class Task(pydantic_v1.BaseModel):
- `CLOSED` - CLOSED
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/task_account.py b/src/merge/resources/crm/types/task_account.py
index a3bf248f..f92b516f 100644
--- a/src/merge/resources/crm/types/task_account.py
+++ b/src/merge/resources/crm/types/task_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
TaskAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/task_opportunity.py b/src/merge/resources/crm/types/task_opportunity.py
index b8cd81df..fe73a8ca 100644
--- a/src/merge/resources/crm/types/task_opportunity.py
+++ b/src/merge/resources/crm/types/task_opportunity.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .opportunity import Opportunity
TaskOpportunity = typing.Union[str, Opportunity]
diff --git a/src/merge/resources/crm/types/task_owner.py b/src/merge/resources/crm/types/task_owner.py
index b7a0711f..829fcd06 100644
--- a/src/merge/resources/crm/types/task_owner.py
+++ b/src/merge/resources/crm/types/task_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
TaskOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/task_request.py b/src/merge/resources/crm/types/task_request.py
index 2f532261..0bc7078d 100644
--- a/src/merge/resources/crm/types/task_request.py
+++ b/src/merge/resources/crm/types/task_request.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_field_request import RemoteFieldRequest
+import pydantic
+from .task_request_owner import TaskRequestOwner
from .task_request_account import TaskRequestAccount
from .task_request_opportunity import TaskRequestOpportunity
-from .task_request_owner import TaskRequestOwner
+import datetime as dt
from .task_request_status import TaskRequestStatus
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class TaskRequest(pydantic_v1.BaseModel):
+class TaskRequest(UniversalBaseModel):
"""
# The Task Object
@@ -25,42 +25,42 @@ class TaskRequest(pydantic_v1.BaseModel):
TODO
"""
- subject: typing.Optional[str] = pydantic_v1.Field()
+ subject: typing.Optional[str] = pydantic.Field()
"""
The task's subject.
"""
- content: typing.Optional[str] = pydantic_v1.Field()
+ content: typing.Optional[str] = pydantic.Field()
"""
The task's content.
"""
- owner: typing.Optional[TaskRequestOwner] = pydantic_v1.Field()
+ owner: typing.Optional[TaskRequestOwner] = pydantic.Field()
"""
The task's owner.
"""
- account: typing.Optional[TaskRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[TaskRequestAccount] = pydantic.Field()
"""
The task's account.
"""
- opportunity: typing.Optional[TaskRequestOpportunity] = pydantic_v1.Field()
+ opportunity: typing.Optional[TaskRequestOpportunity] = pydantic.Field()
"""
The task's opportunity.
"""
- completed_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ completed_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the task is completed.
"""
- due_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ due_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the task is due.
"""
- status: typing.Optional[TaskRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[TaskRequestStatus] = pydantic.Field()
"""
The task's status.
@@ -68,24 +68,15 @@ class TaskRequest(pydantic_v1.BaseModel):
- `CLOSED` - CLOSED
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/task_request_account.py b/src/merge/resources/crm/types/task_request_account.py
index cac39842..f604e9c2 100644
--- a/src/merge/resources/crm/types/task_request_account.py
+++ b/src/merge/resources/crm/types/task_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
TaskRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/crm/types/task_request_opportunity.py b/src/merge/resources/crm/types/task_request_opportunity.py
index ee239cba..02b67b47 100644
--- a/src/merge/resources/crm/types/task_request_opportunity.py
+++ b/src/merge/resources/crm/types/task_request_opportunity.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .opportunity import Opportunity
TaskRequestOpportunity = typing.Union[str, Opportunity]
diff --git a/src/merge/resources/crm/types/task_request_owner.py b/src/merge/resources/crm/types/task_request_owner.py
index e0344b13..fdf9ae4d 100644
--- a/src/merge/resources/crm/types/task_request_owner.py
+++ b/src/merge/resources/crm/types/task_request_owner.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
TaskRequestOwner = typing.Union[str, User]
diff --git a/src/merge/resources/crm/types/task_request_status.py b/src/merge/resources/crm/types/task_request_status.py
index f309c6a8..97bcce38 100644
--- a/src/merge/resources/crm/types/task_request_status.py
+++ b/src/merge/resources/crm/types/task_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .task_status_enum import TaskStatusEnum
TaskRequestStatus = typing.Union[TaskStatusEnum, str]
diff --git a/src/merge/resources/crm/types/task_response.py b/src/merge/resources/crm/types/task_response.py
index bd03898e..49273ea6 100644
--- a/src/merge/resources/crm/types/task_response.py
+++ b/src/merge/resources/crm/types/task_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .task import Task
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class TaskResponse(pydantic_v1.BaseModel):
+class TaskResponse(UniversalBaseModel):
model: Task
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/task_status.py b/src/merge/resources/crm/types/task_status.py
index 38029669..3b766648 100644
--- a/src/merge/resources/crm/types/task_status.py
+++ b/src/merge/resources/crm/types/task_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .task_status_enum import TaskStatusEnum
TaskStatus = typing.Union[TaskStatusEnum, str]
diff --git a/src/merge/resources/crm/types/task_status_enum.py b/src/merge/resources/crm/types/task_status_enum.py
index bf93b425..dcea0d56 100644
--- a/src/merge/resources/crm/types/task_status_enum.py
+++ b/src/merge/resources/crm/types/task_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TaskStatusEnum(str, enum.Enum):
- """
- - `OPEN` - OPEN
- - `CLOSED` - CLOSED
- """
-
- OPEN = "OPEN"
- CLOSED = "CLOSED"
-
- def visit(self, open: typing.Callable[[], T_Result], closed: typing.Callable[[], T_Result]) -> T_Result:
- if self is TaskStatusEnum.OPEN:
- return open()
- if self is TaskStatusEnum.CLOSED:
- return closed()
+TaskStatusEnum = typing.Union[typing.Literal["OPEN", "CLOSED"], typing.Any]
diff --git a/src/merge/resources/crm/types/user.py b/src/merge/resources/crm/types/user.py
index d0b81245..087a67b5 100644
--- a/src/merge/resources/crm/types/user.py
+++ b/src/merge/resources/crm/types/user.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class User(pydantic_v1.BaseModel):
+class User(UniversalBaseModel):
"""
# The User Object
@@ -23,59 +23,50 @@ class User(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The user's name.
"""
- email: typing.Optional[str] = pydantic_v1.Field()
+ email: typing.Optional[str] = pydantic.Field()
"""
The user's email address.
"""
- is_active: typing.Optional[bool] = pydantic_v1.Field()
+ is_active: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the user is active.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/validation_problem_source.py b/src/merge/resources/crm/types/validation_problem_source.py
index fde15b40..d9a4a8fe 100644
--- a/src/merge/resources/crm/types/validation_problem_source.py
+++ b/src/merge/resources/crm/types/validation_problem_source.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ValidationProblemSource(pydantic_v1.BaseModel):
+class ValidationProblemSource(UniversalBaseModel):
pointer: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/warning_validation_problem.py b/src/merge/resources/crm/types/warning_validation_problem.py
index 6baf9600..d508bb6d 100644
--- a/src/merge/resources/crm/types/warning_validation_problem.py
+++ b/src/merge/resources/crm/types/warning_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class WarningValidationProblem(pydantic_v1.BaseModel):
+class WarningValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/types/webhook_receiver.py b/src/merge/resources/crm/types/webhook_receiver.py
index 0544f256..e8cd17aa 100644
--- a/src/merge/resources/crm/types/webhook_receiver.py
+++ b/src/merge/resources/crm/types/webhook_receiver.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class WebhookReceiver(pydantic_v1.BaseModel):
+class WebhookReceiver(UniversalBaseModel):
event: str
is_active: bool
key: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/client.py b/src/merge/resources/filestorage/client.py
index 5d8d0af7..e8fbcad7 100644
--- a/src/merge/resources/filestorage/client.py
+++ b/src/merge/resources/filestorage/client.py
@@ -1,34 +1,55 @@
# This file was auto-generated by Fern from our API Definition.
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .resources.account_details.client import AccountDetailsClient, AsyncAccountDetailsClient
-from .resources.account_token.client import AccountTokenClient, AsyncAccountTokenClient
-from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from ...core.client_wrapper import SyncClientWrapper
+from .resources.account_details.client import AccountDetailsClient
+from .resources.account_token.client import AccountTokenClient
from .resources.async_passthrough.client import (
AsyncPassthroughClient as resources_filestorage_resources_async_passthrough_client_AsyncPassthroughClient,
)
-from .resources.audit_trail.client import AsyncAuditTrailClient, AuditTrailClient
-from .resources.available_actions.client import AsyncAvailableActionsClient, AvailableActionsClient
-from .resources.delete_account.client import AsyncDeleteAccountClient, DeleteAccountClient
-from .resources.drives.client import AsyncDrivesClient, DrivesClient
-from .resources.field_mapping.client import AsyncFieldMappingClient, FieldMappingClient
-from .resources.files.client import AsyncFilesClient, FilesClient
-from .resources.folders.client import AsyncFoldersClient, FoldersClient
-from .resources.force_resync.client import AsyncForceResyncClient, ForceResyncClient
-from .resources.generate_key.client import AsyncGenerateKeyClient, GenerateKeyClient
-from .resources.groups.client import AsyncGroupsClient, GroupsClient
-from .resources.issues.client import AsyncIssuesClient, IssuesClient
-from .resources.link_token.client import AsyncLinkTokenClient, LinkTokenClient
-from .resources.linked_accounts.client import AsyncLinkedAccountsClient, LinkedAccountsClient
+from .resources.audit_trail.client import AuditTrailClient
+from .resources.available_actions.client import AvailableActionsClient
+from .resources.scopes.client import ScopesClient
+from .resources.delete_account.client import DeleteAccountClient
+from .resources.drives.client import DrivesClient
+from .resources.field_mapping.client import FieldMappingClient
+from .resources.files.client import FilesClient
+from .resources.folders.client import FoldersClient
+from .resources.generate_key.client import GenerateKeyClient
+from .resources.groups.client import GroupsClient
+from .resources.issues.client import IssuesClient
+from .resources.link_token.client import LinkTokenClient
+from .resources.linked_accounts.client import LinkedAccountsClient
+from .resources.passthrough.client import PassthroughClient
+from .resources.regenerate_key.client import RegenerateKeyClient
+from .resources.sync_status.client import SyncStatusClient
+from .resources.force_resync.client import ForceResyncClient
+from .resources.users.client import UsersClient
+from .resources.webhook_receivers.client import WebhookReceiversClient
+from ...core.client_wrapper import AsyncClientWrapper
+from .resources.account_details.client import AsyncAccountDetailsClient
+from .resources.account_token.client import AsyncAccountTokenClient
+from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from .resources.audit_trail.client import AsyncAuditTrailClient
+from .resources.available_actions.client import AsyncAvailableActionsClient
+from .resources.scopes.client import AsyncScopesClient
+from .resources.delete_account.client import AsyncDeleteAccountClient
+from .resources.drives.client import AsyncDrivesClient
+from .resources.field_mapping.client import AsyncFieldMappingClient
+from .resources.files.client import AsyncFilesClient
+from .resources.folders.client import AsyncFoldersClient
+from .resources.generate_key.client import AsyncGenerateKeyClient
+from .resources.groups.client import AsyncGroupsClient
+from .resources.issues.client import AsyncIssuesClient
+from .resources.link_token.client import AsyncLinkTokenClient
+from .resources.linked_accounts.client import AsyncLinkedAccountsClient
from .resources.passthrough.client import (
AsyncPassthroughClient as resources_filestorage_resources_passthrough_client_AsyncPassthroughClient,
)
-from .resources.passthrough.client import PassthroughClient
-from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient
-from .resources.scopes.client import AsyncScopesClient, ScopesClient
-from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient
-from .resources.users.client import AsyncUsersClient, UsersClient
-from .resources.webhook_receivers.client import AsyncWebhookReceiversClient, WebhookReceiversClient
+from .resources.regenerate_key.client import AsyncRegenerateKeyClient
+from .resources.sync_status.client import AsyncSyncStatusClient
+from .resources.force_resync.client import AsyncForceResyncClient
+from .resources.users.client import AsyncUsersClient
+from .resources.webhook_receivers.client import AsyncWebhookReceiversClient
class FilestorageClient:
diff --git a/src/merge/resources/filestorage/resources/account_details/client.py b/src/merge/resources/filestorage/resources/account_details/client.py
index 2b81889a..41d0149b 100644
--- a/src/merge/resources/filestorage/resources/account_details/client.py
+++ b/src/merge/resources/filestorage/resources/account_details/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_details import AccountDetails
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountDetailsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.filestorage.account_details.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/account-details", method="GET", request_options=request_options
+ "filestorage/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.account_details.retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.account_details.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/account-details", method="GET", request_options=request_options
+ "filestorage/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/account_token/client.py b/src/merge/resources/filestorage/resources/account_token/client.py
index 5f949d96..b75d7e13 100644
--- a/src/merge/resources/filestorage/resources/account_token/client.py
+++ b/src/merge/resources/filestorage/resources/account_token/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_token import AccountToken
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountTokenClient:
@@ -33,7 +33,7 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,9 +48,15 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,24 +87,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.account_token.retrieve(
- public_token="public_token",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.account_token.retrieve(
+ public_token="public_token",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/account-token/{jsonable_encoder(public_token)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/async_passthrough/client.py b/src/merge/resources/filestorage/resources/async_passthrough/client.py
index e6a277b6..6e10128e 100644
--- a/src/merge/resources/filestorage/resources/async_passthrough/client.py
+++ b/src/merge/resources/filestorage/resources/async_passthrough/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+from ...types.data_passthrough_request import DataPassthroughRequest
from .....core.request_options import RequestOptions
from ...types.async_passthrough_reciept import AsyncPassthroughReciept
-from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.remote_response import RemoteResponse
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -40,8 +40,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.filestorage import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.filestorage import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,17 +49,27 @@ def create(
)
client.filestorage.async_passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "filestorage/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,7 +95,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -100,9 +110,15 @@ def retrieve(
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,26 +149,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.filestorage import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.filestorage import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.async_passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.filestorage.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "filestorage/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -178,24 +212,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.async_passthrough.retrieve(
- async_passthrough_receipt_id="async_passthrough_receipt_id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/async-passthrough/{jsonable_encoder(async_passthrough_receipt_id)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/audit_trail/client.py b/src/merge/resources/filestorage/resources/audit_trail/client.py
index a5d794ac..bab18a35 100644
--- a/src/merge/resources/filestorage/resources/audit_trail/client.py
+++ b/src/merge/resources/filestorage/resources/audit_trail/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AuditTrailClient:
@@ -23,7 +23,7 @@ def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -58,7 +58,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -79,9 +79,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -101,7 +107,7 @@ async def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -136,13 +142,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.audit_trail.list()
+
+
+ async def main() -> None:
+ await client.filestorage.audit_trail.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/audit-trail",
@@ -157,9 +171,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/available_actions/client.py b/src/merge/resources/filestorage/resources/available_actions/client.py
index 9e9210a0..435b1df3 100644
--- a/src/merge/resources/filestorage/resources/available_actions/client.py
+++ b/src/merge/resources/filestorage/resources/available_actions/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.available_actions import AvailableActions
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AvailableActionsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.filestorage.available_actions.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/available-actions", method="GET", request_options=request_options
+ "filestorage/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.available_actions.retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.available_actions.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/available-actions", method="GET", request_options=request_options
+ "filestorage/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/delete_account/client.py b/src/merge/resources/filestorage/resources/delete_account/client.py
index a86fc679..2e840596 100644
--- a/src/merge/resources/filestorage/resources/delete_account/client.py
+++ b/src/merge/resources/filestorage/resources/delete_account/client.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
+from .....core.request_options import RequestOptions
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import AsyncClientWrapper
class DeleteAccountClient:
@@ -27,7 +27,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -36,11 +36,13 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
client.filestorage.delete_account.delete()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/delete-account", method="POST", request_options=request_options
+ "filestorage/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -66,20 +68,30 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.delete_account.delete()
+
+
+ async def main() -> None:
+ await client.filestorage.delete_account.delete()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/delete-account", method="POST", request_options=request_options
+ "filestorage/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/drives/client.py b/src/merge/resources/filestorage/resources/drives/client.py
index 3e8a5ca0..1c0dca33 100644
--- a/src/merge/resources/filestorage/resources/drives/client.py
+++ b/src/merge/resources/filestorage/resources/drives/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_drive_list import PaginatedDriveList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.drive import Drive
-from ...types.paginated_drive_list import PaginatedDriveList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class DrivesClient:
@@ -78,7 +78,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -103,9 +103,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedDriveList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedDriveList,
+ parse_obj_as(
+ type_=PaginatedDriveList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -138,7 +144,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -151,12 +157,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"filestorage/v1/drives/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Drive, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Drive,
+ parse_obj_as(
+ type_=Drive, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -227,13 +241,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.drives.list()
+
+
+ async def main() -> None:
+ await client.filestorage.drives.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/drives",
@@ -252,9 +274,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedDriveList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedDriveList,
+ parse_obj_as(
+ type_=PaginatedDriveList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -287,25 +315,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.drives.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.drives.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/drives/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Drive, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Drive,
+ parse_obj_as(
+ type_=Drive, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/field_mapping/client.py b/src/merge/resources/filestorage/resources/field_mapping/client.py
index 1c6ee7b0..c17a03a6 100644
--- a/src/merge/resources/filestorage/resources/field_mapping/client.py
+++ b/src/merge/resources/filestorage/resources/field_mapping/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
-from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
from ...types.field_mapping_api_instance_response import FieldMappingApiInstanceResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.field_mapping_instance_response import FieldMappingInstanceResponse
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.remote_field_api_response import RemoteFieldApiResponse
+from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -39,7 +39,7 @@ def field_mappings_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,11 +48,19 @@ def field_mappings_retrieve(
client.filestorage.field_mapping.field_mappings_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/field-mappings", method="GET", request_options=request_options
+ "filestorage/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -63,7 +71,7 @@ def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -80,7 +88,7 @@ def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -102,7 +110,7 @@ def field_mappings_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -131,9 +139,15 @@ def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -159,7 +173,7 @@ def field_mappings_destroy(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -174,9 +188,15 @@ def field_mappings_destroy(
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,7 +206,7 @@ def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -198,7 +218,7 @@ def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -217,7 +237,7 @@ def field_mappings_partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -238,9 +258,15 @@ def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -274,7 +300,7 @@ def remote_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -285,12 +311,21 @@ def remote_fields_retrieve(
_response = self._client_wrapper.httpx_client.request(
"filestorage/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -314,7 +349,7 @@ def target_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -323,11 +358,19 @@ def target_fields_retrieve(
client.filestorage.field_mapping.target_fields_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/target-fields", method="GET", request_options=request_options
+ "filestorage/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -356,20 +399,36 @@ async def field_mappings_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.field_mapping.field_mappings_retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.field_mapping.field_mappings_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/field-mappings", method="GET", request_options=request_options
+ "filestorage/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -380,7 +439,7 @@ async def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -397,7 +456,7 @@ async def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -419,20 +478,28 @@ async def field_mappings_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.field_mapping.field_mappings_create(
- target_field_name="example_target_field_name",
- target_field_description="this is a example description of the target field",
- remote_field_traversal_path=["example_remote_field"],
- remote_method="GET",
- remote_url_path="/example-url-path",
- common_model_name="ExampleCommonModel",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/field-mappings",
@@ -448,9 +515,15 @@ async def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -476,24 +549,38 @@ async def field_mappings_destroy(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.field_mapping.field_mappings_destroy(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -503,7 +590,7 @@ async def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -515,7 +602,7 @@ async def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -534,15 +621,23 @@ async def field_mappings_partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.field_mapping.field_mappings_partial_update(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
@@ -555,9 +650,15 @@ async def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -591,23 +692,40 @@ async def remote_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.field_mapping.remote_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.field_mapping.remote_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -631,20 +749,36 @@ async def target_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.field_mapping.target_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.field_mapping.target_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/target-fields", method="GET", request_options=request_options
+ "filestorage/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/files/client.py b/src/merge/resources/filestorage/resources/files/client.py
index 8160360c..da3ed969 100644
--- a/src/merge/resources/filestorage/resources/files/client.py
+++ b/src/merge/resources/filestorage/resources/files/client.py
@@ -1,22 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.files_list_request_expand import FilesListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_file_list import PaginatedFileList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.file import File
from ...types.file_request import FileRequest
from ...types.file_storage_file_response import FileStorageFileResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_file_list import PaginatedFileList
-from .types.files_list_request_expand import FilesListRequestExpand
from .types.files_retrieve_request_expand import FilesRetrieveRequestExpand
+from ...types.file import File
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -102,7 +102,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -131,9 +131,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedFileList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedFileList,
+ parse_obj_as(
+ type_=PaginatedFileList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -170,7 +176,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.filestorage import FileRequest
client = Merge(
@@ -184,14 +190,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"filestorage/v1/files",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FileStorageFileResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FileStorageFileResponse,
+ parse_obj_as(
+ type_=FileStorageFileResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -228,7 +245,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -241,12 +258,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"filestorage/v1/files/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(File, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ File,
+ parse_obj_as(
+ type_=File, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -279,7 +305,7 @@ def download_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -293,15 +319,17 @@ def download_retrieve(
with self._client_wrapper.httpx_client.stream(
f"filestorage/v1/files/{jsonable_encoder(id)}/download",
method="GET",
- params={"mime_type": mime_type},
+ params={
+ "mime_type": mime_type,
+ },
request_options=request_options,
) as _response:
- if 200 <= _response.status_code < 300:
- for _chunk in _response.iter_bytes():
- yield _chunk
- return
- _response.read()
try:
+ if 200 <= _response.status_code < 300:
+ for _chunk in _response.iter_bytes():
+ yield _chunk
+ return
+ _response.read()
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -323,7 +351,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -332,11 +360,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.filestorage.files.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/files/meta/post", method="GET", request_options=request_options
+ "filestorage/v1/files/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -423,13 +459,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.files.list()
+
+
+ async def main() -> None:
+ await client.filestorage.files.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/files",
@@ -452,9 +496,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedFileList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedFileList,
+ parse_obj_as(
+ type_=PaginatedFileList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -491,28 +541,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.filestorage import FileRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.files.create(
- model=FileRequest(),
- )
+
+
+ async def main() -> None:
+ await client.filestorage.files.create(
+ model=FileRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/files",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FileStorageFileResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FileStorageFileResponse,
+ parse_obj_as(
+ type_=FileStorageFileResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -549,25 +618,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.files.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.files.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/files/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(File, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ File,
+ parse_obj_as(
+ type_=File, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -600,29 +686,39 @@ async def download_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.files.download_retrieve(
- id="string",
- mime_type="string",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.files.download_retrieve(
+ id="string",
+ mime_type="string",
+ )
+
+
+ asyncio.run(main())
"""
async with self._client_wrapper.httpx_client.stream(
f"filestorage/v1/files/{jsonable_encoder(id)}/download",
method="GET",
- params={"mime_type": mime_type},
+ params={
+ "mime_type": mime_type,
+ },
request_options=request_options,
) as _response:
- if 200 <= _response.status_code < 300:
- async for _chunk in _response.aiter_bytes():
- yield _chunk
- return
- await _response.aread()
try:
+ if 200 <= _response.status_code < 300:
+ async for _chunk in _response.aiter_bytes():
+ yield _chunk
+ return
+ await _response.aread()
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -644,20 +740,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.files.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.files.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/files/meta/post", method="GET", request_options=request_options
+ "filestorage/v1/files/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/files/types/files_list_request_expand.py b/src/merge/resources/filestorage/resources/files/types/files_list_request_expand.py
index f4c84b6f..96c8295b 100644
--- a/src/merge/resources/filestorage/resources/files/types/files_list_request_expand.py
+++ b/src/merge/resources/filestorage/resources/files/types/files_list_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FilesListRequestExpand(str, enum.Enum):
- DRIVE = "drive"
- FOLDER = "folder"
- FOLDER_DRIVE = "folder,drive"
- PERMISSIONS = "permissions"
- PERMISSIONS_DRIVE = "permissions,drive"
- PERMISSIONS_FOLDER = "permissions,folder"
- PERMISSIONS_FOLDER_DRIVE = "permissions,folder,drive"
-
- def visit(
- self,
- drive: typing.Callable[[], T_Result],
- folder: typing.Callable[[], T_Result],
- folder_drive: typing.Callable[[], T_Result],
- permissions: typing.Callable[[], T_Result],
- permissions_drive: typing.Callable[[], T_Result],
- permissions_folder: typing.Callable[[], T_Result],
- permissions_folder_drive: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FilesListRequestExpand.DRIVE:
- return drive()
- if self is FilesListRequestExpand.FOLDER:
- return folder()
- if self is FilesListRequestExpand.FOLDER_DRIVE:
- return folder_drive()
- if self is FilesListRequestExpand.PERMISSIONS:
- return permissions()
- if self is FilesListRequestExpand.PERMISSIONS_DRIVE:
- return permissions_drive()
- if self is FilesListRequestExpand.PERMISSIONS_FOLDER:
- return permissions_folder()
- if self is FilesListRequestExpand.PERMISSIONS_FOLDER_DRIVE:
- return permissions_folder_drive()
+FilesListRequestExpand = typing.Union[
+ typing.Literal[
+ "drive",
+ "folder",
+ "folder,drive",
+ "permissions",
+ "permissions,drive",
+ "permissions,folder",
+ "permissions,folder,drive",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/filestorage/resources/files/types/files_retrieve_request_expand.py b/src/merge/resources/filestorage/resources/files/types/files_retrieve_request_expand.py
index cc09519b..eacbe7b2 100644
--- a/src/merge/resources/filestorage/resources/files/types/files_retrieve_request_expand.py
+++ b/src/merge/resources/filestorage/resources/files/types/files_retrieve_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FilesRetrieveRequestExpand(str, enum.Enum):
- DRIVE = "drive"
- FOLDER = "folder"
- FOLDER_DRIVE = "folder,drive"
- PERMISSIONS = "permissions"
- PERMISSIONS_DRIVE = "permissions,drive"
- PERMISSIONS_FOLDER = "permissions,folder"
- PERMISSIONS_FOLDER_DRIVE = "permissions,folder,drive"
-
- def visit(
- self,
- drive: typing.Callable[[], T_Result],
- folder: typing.Callable[[], T_Result],
- folder_drive: typing.Callable[[], T_Result],
- permissions: typing.Callable[[], T_Result],
- permissions_drive: typing.Callable[[], T_Result],
- permissions_folder: typing.Callable[[], T_Result],
- permissions_folder_drive: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FilesRetrieveRequestExpand.DRIVE:
- return drive()
- if self is FilesRetrieveRequestExpand.FOLDER:
- return folder()
- if self is FilesRetrieveRequestExpand.FOLDER_DRIVE:
- return folder_drive()
- if self is FilesRetrieveRequestExpand.PERMISSIONS:
- return permissions()
- if self is FilesRetrieveRequestExpand.PERMISSIONS_DRIVE:
- return permissions_drive()
- if self is FilesRetrieveRequestExpand.PERMISSIONS_FOLDER:
- return permissions_folder()
- if self is FilesRetrieveRequestExpand.PERMISSIONS_FOLDER_DRIVE:
- return permissions_folder_drive()
+FilesRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "drive",
+ "folder",
+ "folder,drive",
+ "permissions",
+ "permissions,drive",
+ "permissions,folder",
+ "permissions,folder,drive",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/filestorage/resources/folders/client.py b/src/merge/resources/filestorage/resources/folders/client.py
index 8a82daa9..bde0aa58 100644
--- a/src/merge/resources/filestorage/resources/folders/client.py
+++ b/src/merge/resources/filestorage/resources/folders/client.py
@@ -1,22 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.folders_list_request_expand import FoldersListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_folder_list import PaginatedFolderList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from ...types.folder_request import FolderRequest
from ...types.file_storage_folder_response import FileStorageFolderResponse
+from .types.folders_retrieve_request_expand import FoldersRetrieveRequestExpand
from ...types.folder import Folder
-from ...types.folder_request import FolderRequest
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.meta_response import MetaResponse
-from ...types.paginated_folder_list import PaginatedFolderList
-from .types.folders_list_request_expand import FoldersListRequestExpand
-from .types.folders_retrieve_request_expand import FoldersRetrieveRequestExpand
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -98,7 +98,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -126,9 +126,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedFolderList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedFolderList,
+ parse_obj_as(
+ type_=PaginatedFolderList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -165,7 +171,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.filestorage import FolderRequest
client = Merge(
@@ -179,14 +185,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"filestorage/v1/folders",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FileStorageFolderResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FileStorageFolderResponse,
+ parse_obj_as(
+ type_=FileStorageFolderResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -223,7 +240,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -236,12 +253,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"filestorage/v1/folders/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Folder, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Folder,
+ parse_obj_as(
+ type_=Folder, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -263,7 +289,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -272,11 +298,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.filestorage.folders.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/folders/meta/post", method="GET", request_options=request_options
+ "filestorage/v1/folders/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -359,13 +393,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.folders.list()
+
+
+ async def main() -> None:
+ await client.filestorage.folders.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/folders",
@@ -387,9 +429,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedFolderList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedFolderList,
+ parse_obj_as(
+ type_=PaginatedFolderList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -426,28 +474,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.filestorage import FolderRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.folders.create(
- model=FolderRequest(),
- )
+
+
+ async def main() -> None:
+ await client.filestorage.folders.create(
+ model=FolderRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/folders",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FileStorageFolderResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FileStorageFolderResponse,
+ parse_obj_as(
+ type_=FileStorageFolderResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -484,25 +551,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.folders.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.folders.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/folders/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Folder, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Folder,
+ parse_obj_as(
+ type_=Folder, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -524,20 +608,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.folders.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.folders.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/folders/meta/post", method="GET", request_options=request_options
+ "filestorage/v1/folders/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/folders/types/folders_list_request_expand.py b/src/merge/resources/filestorage/resources/folders/types/folders_list_request_expand.py
index 59ccf95d..414e508a 100644
--- a/src/merge/resources/filestorage/resources/folders/types/folders_list_request_expand.py
+++ b/src/merge/resources/filestorage/resources/folders/types/folders_list_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FoldersListRequestExpand(str, enum.Enum):
- DRIVE = "drive"
- PARENT_FOLDER = "parent_folder"
- PARENT_FOLDER_DRIVE = "parent_folder,drive"
- PERMISSIONS = "permissions"
- PERMISSIONS_DRIVE = "permissions,drive"
- PERMISSIONS_PARENT_FOLDER = "permissions,parent_folder"
- PERMISSIONS_PARENT_FOLDER_DRIVE = "permissions,parent_folder,drive"
-
- def visit(
- self,
- drive: typing.Callable[[], T_Result],
- parent_folder: typing.Callable[[], T_Result],
- parent_folder_drive: typing.Callable[[], T_Result],
- permissions: typing.Callable[[], T_Result],
- permissions_drive: typing.Callable[[], T_Result],
- permissions_parent_folder: typing.Callable[[], T_Result],
- permissions_parent_folder_drive: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FoldersListRequestExpand.DRIVE:
- return drive()
- if self is FoldersListRequestExpand.PARENT_FOLDER:
- return parent_folder()
- if self is FoldersListRequestExpand.PARENT_FOLDER_DRIVE:
- return parent_folder_drive()
- if self is FoldersListRequestExpand.PERMISSIONS:
- return permissions()
- if self is FoldersListRequestExpand.PERMISSIONS_DRIVE:
- return permissions_drive()
- if self is FoldersListRequestExpand.PERMISSIONS_PARENT_FOLDER:
- return permissions_parent_folder()
- if self is FoldersListRequestExpand.PERMISSIONS_PARENT_FOLDER_DRIVE:
- return permissions_parent_folder_drive()
+FoldersListRequestExpand = typing.Union[
+ typing.Literal[
+ "drive",
+ "parent_folder",
+ "parent_folder,drive",
+ "permissions",
+ "permissions,drive",
+ "permissions,parent_folder",
+ "permissions,parent_folder,drive",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/filestorage/resources/folders/types/folders_retrieve_request_expand.py b/src/merge/resources/filestorage/resources/folders/types/folders_retrieve_request_expand.py
index f64d0f9d..8120be6a 100644
--- a/src/merge/resources/filestorage/resources/folders/types/folders_retrieve_request_expand.py
+++ b/src/merge/resources/filestorage/resources/folders/types/folders_retrieve_request_expand.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FoldersRetrieveRequestExpand(str, enum.Enum):
- DRIVE = "drive"
- PARENT_FOLDER = "parent_folder"
- PARENT_FOLDER_DRIVE = "parent_folder,drive"
- PERMISSIONS = "permissions"
- PERMISSIONS_DRIVE = "permissions,drive"
- PERMISSIONS_PARENT_FOLDER = "permissions,parent_folder"
- PERMISSIONS_PARENT_FOLDER_DRIVE = "permissions,parent_folder,drive"
-
- def visit(
- self,
- drive: typing.Callable[[], T_Result],
- parent_folder: typing.Callable[[], T_Result],
- parent_folder_drive: typing.Callable[[], T_Result],
- permissions: typing.Callable[[], T_Result],
- permissions_drive: typing.Callable[[], T_Result],
- permissions_parent_folder: typing.Callable[[], T_Result],
- permissions_parent_folder_drive: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FoldersRetrieveRequestExpand.DRIVE:
- return drive()
- if self is FoldersRetrieveRequestExpand.PARENT_FOLDER:
- return parent_folder()
- if self is FoldersRetrieveRequestExpand.PARENT_FOLDER_DRIVE:
- return parent_folder_drive()
- if self is FoldersRetrieveRequestExpand.PERMISSIONS:
- return permissions()
- if self is FoldersRetrieveRequestExpand.PERMISSIONS_DRIVE:
- return permissions_drive()
- if self is FoldersRetrieveRequestExpand.PERMISSIONS_PARENT_FOLDER:
- return permissions_parent_folder()
- if self is FoldersRetrieveRequestExpand.PERMISSIONS_PARENT_FOLDER_DRIVE:
- return permissions_parent_folder_drive()
+FoldersRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "drive",
+ "parent_folder",
+ "parent_folder,drive",
+ "permissions",
+ "permissions,drive",
+ "permissions,parent_folder",
+ "permissions,parent_folder,drive",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/filestorage/resources/force_resync/client.py b/src/merge/resources/filestorage/resources/force_resync/client.py
index bfe442bb..5f82c0f1 100644
--- a/src/merge/resources/filestorage/resources/force_resync/client.py
+++ b/src/merge/resources/filestorage/resources/force_resync/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.sync_status import SyncStatus
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class ForceResyncClient:
@@ -32,7 +32,7 @@ def sync_status_resync_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -41,11 +41,19 @@ def sync_status_resync_create(
client.filestorage.force_resync.sync_status_resync_create()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/sync-status/resync", method="POST", request_options=request_options
+ "filestorage/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,20 +82,36 @@ async def sync_status_resync_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.force_resync.sync_status_resync_create()
+
+
+ async def main() -> None:
+ await client.filestorage.force_resync.sync_status_resync_create()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/sync-status/resync", method="POST", request_options=request_options
+ "filestorage/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/generate_key/client.py b/src/merge/resources/filestorage/resources/generate_key/client.py
index 96b5339a..e4eac805 100644
--- a/src/merge/resources/filestorage/resources/generate_key/client.py
+++ b/src/merge/resources/filestorage/resources/generate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,13 +49,21 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
_response = self._client_wrapper.httpx_client.request(
"filestorage/v1/generate-key",
method="POST",
- json={"name": name},
+ json={
+ "name": name,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,26 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.generate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.generate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/generate-key",
method="POST",
- json={"name": name},
+ json={
+ "name": name,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/groups/client.py b/src/merge/resources/filestorage/resources/groups/client.py
index 92628afc..b121e38a 100644
--- a/src/merge/resources/filestorage/resources/groups/client.py
+++ b/src/merge/resources/filestorage/resources/groups/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_group_list import PaginatedGroupList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.group import Group
-from ...types.paginated_group_list import PaginatedGroupList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class GroupsClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedGroupList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedGroupList,
+ parse_obj_as(
+ type_=PaginatedGroupList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"filestorage/v1/groups/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Group, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Group,
+ parse_obj_as(
+ type_=Group, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.groups.list()
+
+
+ async def main() -> None:
+ await client.filestorage.groups.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/groups",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedGroupList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedGroupList,
+ parse_obj_as(
+ type_=PaginatedGroupList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.groups.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.groups.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/groups/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Group, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Group,
+ parse_obj_as(
+ type_=Group, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/issues/client.py b/src/merge/resources/filestorage/resources/issues/client.py
index 1793bd05..8c3008d8 100644
--- a/src/merge/resources/filestorage/resources/issues/client.py
+++ b/src/merge/resources/filestorage/resources/issues/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_issue_list import PaginatedIssueList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.issue import Issue
-from ...types.paginated_issue_list import PaginatedIssueList
-from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class IssuesClient:
@@ -95,7 +95,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -132,9 +132,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -158,7 +164,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -169,11 +175,19 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"filestorage/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"filestorage/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -260,13 +274,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.issues.list()
+
+
+ async def main() -> None:
+ await client.filestorage.issues.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/issues",
@@ -297,9 +319,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -323,22 +351,38 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.issues.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.issues.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"filestorage/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"filestorage/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/issues/types/issues_list_request_status.py b/src/merge/resources/filestorage/resources/issues/types/issues_list_request_status.py
index 2bd3521e..3886423c 100644
--- a/src/merge/resources/filestorage/resources/issues/types/issues_list_request_status.py
+++ b/src/merge/resources/filestorage/resources/issues/types/issues_list_request_status.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssuesListRequestStatus(str, enum.Enum):
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssuesListRequestStatus.ONGOING:
- return ongoing()
- if self is IssuesListRequestStatus.RESOLVED:
- return resolved()
+IssuesListRequestStatus = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/filestorage/resources/link_token/client.py b/src/merge/resources/filestorage/resources/link_token/client.py
index 62312372..e0c31217 100644
--- a/src/merge/resources/filestorage/resources/link_token/client.py
+++ b/src/merge/resources/filestorage/resources/link_token/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.categories_enum import CategoriesEnum
from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.request_options import RequestOptions
from ...types.link_token import LinkToken
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,8 +36,8 @@ def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -77,7 +77,7 @@ def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -90,8 +90,7 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.filestorage import CategoriesEnum
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,7 +100,7 @@ def create(
end_user_email_address="example@gmail.com",
end_user_organization_name="Test Organization",
end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
+ categories=["hris", "ats"],
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -124,9 +123,15 @@ def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,8 +158,8 @@ async def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -194,7 +199,7 @@ async def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -207,19 +212,26 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.filestorage import CategoriesEnum
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.link_token.create(
- end_user_email_address="example@gmail.com",
- end_user_organization_name="Test Organization",
- end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
- )
+
+
+ async def main() -> None:
+ await client.filestorage.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/link-token",
@@ -241,9 +253,15 @@ async def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/linked_accounts/client.py b/src/merge/resources/filestorage/resources/linked_accounts/client.py
index 037fcdeb..66004cee 100644
--- a/src/merge/resources/filestorage/resources/linked_accounts/client.py
+++ b/src/merge/resources/filestorage/resources/linked_accounts/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
from .....core.request_options import RequestOptions
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
-from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class LinkedAccountsClient:
@@ -31,7 +31,7 @@ def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -122,9 +122,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -151,7 +157,7 @@ async def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -214,13 +220,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.linked_accounts.list()
+
+
+ async def main() -> None:
+ await client.filestorage.linked_accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/linked-accounts",
@@ -242,9 +256,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/linked_accounts/types/linked_accounts_list_request_category.py b/src/merge/resources/filestorage/resources/linked_accounts/types/linked_accounts_list_request_category.py
index bd873ea8..531279d5 100644
--- a/src/merge/resources/filestorage/resources/linked_accounts/types/linked_accounts_list_request_category.py
+++ b/src/merge/resources/filestorage/resources/linked_accounts/types/linked_accounts_list_request_category.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LinkedAccountsListRequestCategory(str, enum.Enum):
- ACCOUNTING = "accounting"
- ATS = "ats"
- CRM = "crm"
- FILESTORAGE = "filestorage"
- HRIS = "hris"
- MKTG = "mktg"
- TICKETING = "ticketing"
-
- def visit(
- self,
- accounting: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- hris: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is LinkedAccountsListRequestCategory.ACCOUNTING:
- return accounting()
- if self is LinkedAccountsListRequestCategory.ATS:
- return ats()
- if self is LinkedAccountsListRequestCategory.CRM:
- return crm()
- if self is LinkedAccountsListRequestCategory.FILESTORAGE:
- return filestorage()
- if self is LinkedAccountsListRequestCategory.HRIS:
- return hris()
- if self is LinkedAccountsListRequestCategory.MKTG:
- return mktg()
- if self is LinkedAccountsListRequestCategory.TICKETING:
- return ticketing()
+LinkedAccountsListRequestCategory = typing.Union[
+ typing.Literal["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"], typing.Any
+]
diff --git a/src/merge/resources/filestorage/resources/passthrough/client.py b/src/merge/resources/filestorage/resources/passthrough/client.py
index 62ec9abf..3df6046d 100644
--- a/src/merge/resources/filestorage/resources/passthrough/client.py
+++ b/src/merge/resources/filestorage/resources/passthrough/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.request_options import RequestOptions
from ...types.remote_response import RemoteResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -38,8 +38,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.filestorage import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.filestorage import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,17 +47,27 @@ def create(
)
client.filestorage.passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "filestorage/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -88,26 +98,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.filestorage import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.filestorage import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.filestorage.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "filestorage/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/regenerate_key/client.py b/src/merge/resources/filestorage/resources/regenerate_key/client.py
index 4ecb9896..0f981ab3 100644
--- a/src/merge/resources/filestorage/resources/regenerate_key/client.py
+++ b/src/merge/resources/filestorage/resources/regenerate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,13 +49,21 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
_response = self._client_wrapper.httpx_client.request(
"filestorage/v1/regenerate-key",
method="POST",
- json={"name": name},
+ json={
+ "name": name,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,26 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.regenerate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.regenerate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/regenerate-key",
method="POST",
- json={"name": name},
+ json={
+ "name": name,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/scopes/client.py b/src/merge/resources/filestorage/resources/scopes/client.py
index 595aa2fd..228ec3af 100644
--- a/src/merge/resources/filestorage/resources/scopes/client.py
+++ b/src/merge/resources/filestorage/resources/scopes/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.common_model_scope_api import CommonModelScopeApi
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def default_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -45,11 +45,19 @@ def default_scopes_retrieve(
client.filestorage.scopes.default_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/default-scopes", method="GET", request_options=request_options
+ "filestorage/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -73,7 +81,7 @@ def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -82,11 +90,19 @@ def linked_account_scopes_retrieve(
client.filestorage.scopes.linked_account_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/linked-account-scopes", method="GET", request_options=request_options
+ "filestorage/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -96,7 +112,7 @@ def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -116,7 +132,7 @@ def linked_account_scopes_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.filestorage import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -153,13 +169,21 @@ def linked_account_scopes_create(
_response = self._client_wrapper.httpx_client.request(
"filestorage/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -188,20 +212,36 @@ async def default_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.scopes.default_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.scopes.default_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/default-scopes", method="GET", request_options=request_options
+ "filestorage/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -225,20 +265,36 @@ async def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.scopes.linked_account_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.filestorage.scopes.linked_account_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/linked-account-scopes", method="GET", request_options=request_options
+ "filestorage/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -248,7 +304,7 @@ async def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -268,7 +324,9 @@ async def linked_account_scopes_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.filestorage import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -278,40 +336,54 @@ async def linked_account_scopes_create(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.scopes.linked_account_scopes_create(
- common_models=[
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Employee",
- model_permissions={
- "READ": ModelPermissionDeserializerRequest(
- is_enabled=True,
- ),
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- ),
- },
- ),
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Benefit",
- model_permissions={
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- )
- },
- ),
- ],
- )
+
+
+ async def main() -> None:
+ await client.filestorage.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/sync_status/client.py b/src/merge/resources/filestorage/resources/sync_status/client.py
index 38260add..d45305a7 100644
--- a/src/merge/resources/filestorage/resources/sync_status/client.py
+++ b/src/merge/resources/filestorage/resources/sync_status/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_sync_status_list import PaginatedSyncStatusList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class SyncStatusClient:
@@ -19,7 +19,7 @@ def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -42,7 +42,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -53,12 +53,21 @@ def list(
_response = self._client_wrapper.httpx_client.request(
"filestorage/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,7 +83,7 @@ async def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -97,23 +106,40 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.sync_status.list()
+
+
+ async def main() -> None:
+ await client.filestorage.sync_status.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/users/client.py b/src/merge/resources/filestorage/resources/users/client.py
index 7aaa2879..68c0a9ef 100644
--- a/src/merge/resources/filestorage/resources/users/client.py
+++ b/src/merge/resources/filestorage/resources/users/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_user_list import PaginatedUserList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.user import User
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class UsersClient:
@@ -78,7 +78,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -103,9 +103,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -138,7 +144,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -151,12 +157,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"filestorage/v1/users/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(User, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ User,
+ parse_obj_as(
+ type_=User, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -227,13 +241,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.users.list()
+
+
+ async def main() -> None:
+ await client.filestorage.users.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/users",
@@ -252,9 +274,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -287,25 +315,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.users.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.filestorage.users.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"filestorage/v1/users/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(User, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ User,
+ parse_obj_as(
+ type_=User, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/resources/webhook_receivers/client.py b/src/merge/resources/filestorage/resources/webhook_receivers/client.py
index 5531f72c..9133b50a 100644
--- a/src/merge/resources/filestorage/resources/webhook_receivers/client.py
+++ b/src/merge/resources/filestorage/resources/webhook_receivers/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.webhook_receiver import WebhookReceiver
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -33,7 +33,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -42,11 +42,19 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
client.filestorage.webhook_receivers.list()
"""
_response = self._client_wrapper.httpx_client.request(
- "filestorage/v1/webhook-receivers", method="GET", request_options=request_options
+ "filestorage/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -58,7 +66,7 @@ def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -81,7 +89,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -95,13 +103,23 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"filestorage/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -128,20 +146,36 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None)
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.webhook_receivers.list()
+
+
+ async def main() -> None:
+ await client.filestorage.webhook_receivers.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "filestorage/v1/webhook-receivers", method="GET", request_options=request_options
+ "filestorage/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,7 +187,7 @@ async def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -176,27 +210,45 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.filestorage.webhook_receivers.create(
- event="event",
- is_active=True,
- )
+
+
+ async def main() -> None:
+ await client.filestorage.webhook_receivers.create(
+ event="event",
+ is_active=True,
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"filestorage/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/filestorage/types/account_details.py b/src/merge/resources/filestorage/types/account_details.py
index 81f9587b..50a3736a 100644
--- a/src/merge/resources/filestorage/types/account_details.py
+++ b/src/merge/resources/filestorage/types/account_details.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .category_enum import CategoryEnum
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetails(pydantic_v1.BaseModel):
+class AccountDetails(UniversalBaseModel):
id: typing.Optional[str]
integration: typing.Optional[str]
integration_slug: typing.Optional[str]
@@ -18,27 +17,18 @@ class AccountDetails(pydantic_v1.BaseModel):
end_user_email_address: typing.Optional[str]
status: typing.Optional[str]
webhook_listener_url: typing.Optional[str]
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
account_type: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/account_details_and_actions.py b/src/merge/resources/filestorage/types/account_details_and_actions.py
index 6a1b2874..39a7b0da 100644
--- a/src/merge/resources/filestorage/types/account_details_and_actions.py
+++ b/src/merge/resources/filestorage/types/account_details_and_actions.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
-from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
from .category_enum import CategoryEnum
+from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
+import pydantic
+from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetailsAndActions(pydantic_v1.BaseModel):
+class AccountDetailsAndActions(UniversalBaseModel):
"""
# The LinkedAccount Object
@@ -30,13 +29,13 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
end_user_origin_id: typing.Optional[str]
end_user_organization_name: str
end_user_email_address: str
- subdomain: typing.Optional[str] = pydantic_v1.Field()
+ subdomain: typing.Optional[str] = pydantic.Field()
"""
The tenant or domain the customer has provided access to.
"""
webhook_listener_url: str
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
@@ -44,20 +43,11 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
integration: typing.Optional[AccountDetailsAndActionsIntegration]
account_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/account_details_and_actions_integration.py b/src/merge/resources/filestorage/types/account_details_and_actions_integration.py
index 7c300a2b..5779ac5b 100644
--- a/src/merge/resources/filestorage/types/account_details_and_actions_integration.py
+++ b/src/merge/resources/filestorage/types/account_details_and_actions_integration.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
+class AccountDetailsAndActionsIntegration(UniversalBaseModel):
name: str
categories: typing.List[CategoriesEnum]
image: typing.Optional[str]
@@ -19,20 +18,11 @@ class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/account_details_and_actions_status_enum.py b/src/merge/resources/filestorage/types/account_details_and_actions_status_enum.py
index a904e550..47a6e845 100644
--- a/src/merge/resources/filestorage/types/account_details_and_actions_status_enum.py
+++ b/src/merge/resources/filestorage/types/account_details_and_actions_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountDetailsAndActionsStatusEnum(str, enum.Enum):
- """
- - `COMPLETE` - COMPLETE
- - `INCOMPLETE` - INCOMPLETE
- - `RELINK_NEEDED` - RELINK_NEEDED
- """
-
- COMPLETE = "COMPLETE"
- INCOMPLETE = "INCOMPLETE"
- RELINK_NEEDED = "RELINK_NEEDED"
-
- def visit(
- self,
- complete: typing.Callable[[], T_Result],
- incomplete: typing.Callable[[], T_Result],
- relink_needed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountDetailsAndActionsStatusEnum.COMPLETE:
- return complete()
- if self is AccountDetailsAndActionsStatusEnum.INCOMPLETE:
- return incomplete()
- if self is AccountDetailsAndActionsStatusEnum.RELINK_NEEDED:
- return relink_needed()
+AccountDetailsAndActionsStatusEnum = typing.Union[typing.Literal["COMPLETE", "INCOMPLETE", "RELINK_NEEDED"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/account_integration.py b/src/merge/resources/filestorage/types/account_integration.py
index ad3fd193..b1e4ec7e 100644
--- a/src/merge/resources/filestorage/types/account_integration.py
+++ b/src/merge/resources/filestorage/types/account_integration.py
@@ -1,74 +1,66 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountIntegration(pydantic_v1.BaseModel):
- name: str = pydantic_v1.Field()
+class AccountIntegration(UniversalBaseModel):
+ name: str = pydantic.Field()
"""
Company name.
"""
- abbreviated_name: typing.Optional[str] = pydantic_v1.Field()
+ abbreviated_name: typing.Optional[str] = pydantic.Field()
"""
Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).
Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)
"""
- categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic_v1.Field()
+ categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic.Field()
"""
Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].
"""
- image: typing.Optional[str] = pydantic_v1.Field()
+ image: typing.Optional[str] = pydantic.Field()
"""
Company logo in rectangular shape. Upload an image with a clear background.
"""
- square_image: typing.Optional[str] = pydantic_v1.Field()
+ square_image: typing.Optional[str] = pydantic.Field()
"""
Company logo in square shape. Upload an image with a white background.
"""
- color: typing.Optional[str] = pydantic_v1.Field()
+ color: typing.Optional[str] = pydantic.Field()
"""
The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color.
"""
slug: typing.Optional[str]
- api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = (
+ pydantic.Field()
+ )
"""
Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}
"""
- webhook_setup_guide_url: typing.Optional[str] = pydantic_v1.Field()
+ webhook_setup_guide_url: typing.Optional[str] = pydantic.Field()
"""
Setup guide URL for third party webhook creation. Exposed in Merge Docs.
"""
- category_beta_status: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ category_beta_status: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
Category or categories this integration is in beta status for.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/account_token.py b/src/merge/resources/filestorage/types/account_token.py
index 4794fea3..fa8b76ec 100644
--- a/src/merge/resources/filestorage/types/account_token.py
+++ b/src/merge/resources/filestorage/types/account_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class AccountToken(pydantic_v1.BaseModel):
+class AccountToken(UniversalBaseModel):
account_token: str
integration: AccountIntegration
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/advanced_metadata.py b/src/merge/resources/filestorage/types/advanced_metadata.py
index 2aa7d1d6..6287a842 100644
--- a/src/merge/resources/filestorage/types/advanced_metadata.py
+++ b/src/merge/resources/filestorage/types/advanced_metadata.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AdvancedMetadata(pydantic_v1.BaseModel):
+class AdvancedMetadata(UniversalBaseModel):
id: str
display_name: typing.Optional[str]
description: typing.Optional[str]
is_required: typing.Optional[bool]
is_custom: typing.Optional[bool]
- field_choices: typing.Optional[typing.List[typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_choices: typing.Optional[typing.List[typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/async_passthrough_reciept.py b/src/merge/resources/filestorage/types/async_passthrough_reciept.py
index 2cc33210..43dc5284 100644
--- a/src/merge/resources/filestorage/types/async_passthrough_reciept.py
+++ b/src/merge/resources/filestorage/types/async_passthrough_reciept.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AsyncPassthroughReciept(pydantic_v1.BaseModel):
+class AsyncPassthroughReciept(UniversalBaseModel):
async_passthrough_receipt_id: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/audit_log_event.py b/src/merge/resources/filestorage/types/audit_log_event.py
index 051c0286..b57101fc 100644
--- a/src/merge/resources/filestorage/types/audit_log_event.py
+++ b/src/merge/resources/filestorage/types/audit_log_event.py
@@ -1,27 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .audit_log_event_event_type import AuditLogEventEventType
+import pydantic
from .audit_log_event_role import AuditLogEventRole
+from .audit_log_event_event_type import AuditLogEventEventType
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AuditLogEvent(pydantic_v1.BaseModel):
+class AuditLogEvent(UniversalBaseModel):
id: typing.Optional[str]
- user_name: typing.Optional[str] = pydantic_v1.Field()
+ user_name: typing.Optional[str] = pydantic.Field()
"""
The User's full name at the time of this Event occurring.
"""
- user_email: typing.Optional[str] = pydantic_v1.Field()
+ user_email: typing.Optional[str] = pydantic.Field()
"""
The User's email at the time of this Event occurring.
"""
- role: AuditLogEventRole = pydantic_v1.Field()
+ role: AuditLogEventRole = pydantic.Field()
"""
Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.
@@ -34,7 +34,7 @@ class AuditLogEvent(pydantic_v1.BaseModel):
"""
ip_address: str
- event_type: AuditLogEventEventType = pydantic_v1.Field()
+ event_type: AuditLogEventEventType = pydantic.Field()
"""
Designates the type of event that occurred.
@@ -81,20 +81,11 @@ class AuditLogEvent(pydantic_v1.BaseModel):
event_description: str
created_at: typing.Optional[dt.datetime]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/audit_log_event_event_type.py b/src/merge/resources/filestorage/types/audit_log_event_event_type.py
index f9c9d2b3..f9d43eed 100644
--- a/src/merge/resources/filestorage/types/audit_log_event_event_type.py
+++ b/src/merge/resources/filestorage/types/audit_log_event_event_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .event_type_enum import EventTypeEnum
AuditLogEventEventType = typing.Union[EventTypeEnum, str]
diff --git a/src/merge/resources/filestorage/types/audit_log_event_role.py b/src/merge/resources/filestorage/types/audit_log_event_role.py
index fe91ed6f..83ecd93a 100644
--- a/src/merge/resources/filestorage/types/audit_log_event_role.py
+++ b/src/merge/resources/filestorage/types/audit_log_event_role.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .role_enum import RoleEnum
AuditLogEventRole = typing.Union[RoleEnum, str]
diff --git a/src/merge/resources/filestorage/types/available_actions.py b/src/merge/resources/filestorage/types/available_actions.py
index bbd94581..5f164db6 100644
--- a/src/merge/resources/filestorage/types/available_actions.py
+++ b/src/merge/resources/filestorage/types/available_actions.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+import typing
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AvailableActions(pydantic_v1.BaseModel):
+class AvailableActions(UniversalBaseModel):
"""
# The AvailableActions Object
@@ -26,20 +25,11 @@ class AvailableActions(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/categories_enum.py b/src/merge/resources/filestorage/types/categories_enum.py
index ee5cac33..14d064dd 100644
--- a/src/merge/resources/filestorage/types/categories_enum.py
+++ b/src/merge/resources/filestorage/types/categories_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoriesEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoriesEnum.HRIS:
- return hris()
- if self is CategoriesEnum.ATS:
- return ats()
- if self is CategoriesEnum.ACCOUNTING:
- return accounting()
- if self is CategoriesEnum.TICKETING:
- return ticketing()
- if self is CategoriesEnum.CRM:
- return crm()
- if self is CategoriesEnum.MKTG:
- return mktg()
- if self is CategoriesEnum.FILESTORAGE:
- return filestorage()
+CategoriesEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/filestorage/types/category_enum.py b/src/merge/resources/filestorage/types/category_enum.py
index ad5a0688..597342a8 100644
--- a/src/merge/resources/filestorage/types/category_enum.py
+++ b/src/merge/resources/filestorage/types/category_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoryEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoryEnum.HRIS:
- return hris()
- if self is CategoryEnum.ATS:
- return ats()
- if self is CategoryEnum.ACCOUNTING:
- return accounting()
- if self is CategoryEnum.TICKETING:
- return ticketing()
- if self is CategoryEnum.CRM:
- return crm()
- if self is CategoryEnum.MKTG:
- return mktg()
- if self is CategoryEnum.FILESTORAGE:
- return filestorage()
+CategoryEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/filestorage/types/common_model_scope_api.py b/src/merge/resources/filestorage/types/common_model_scope_api.py
index d6fdec56..c6a178b1 100644
--- a/src/merge/resources/filestorage/types/common_model_scope_api.py
+++ b/src/merge/resources/filestorage/types/common_model_scope_api.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .individual_common_model_scope_deserializer import IndividualCommonModelScopeDeserializer
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CommonModelScopeApi(pydantic_v1.BaseModel):
- common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic_v1.Field()
+class CommonModelScopeApi(UniversalBaseModel):
+ common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic.Field()
"""
The common models you want to update the scopes for
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/common_model_scopes_body_request.py b/src/merge/resources/filestorage/types/common_model_scopes_body_request.py
index e956cbdc..305ab44c 100644
--- a/src/merge/resources/filestorage/types/common_model_scopes_body_request.py
+++ b/src/merge/resources/filestorage/types/common_model_scopes_body_request.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .enabled_actions_enum import EnabledActionsEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CommonModelScopesBodyRequest(pydantic_v1.BaseModel):
+class CommonModelScopesBodyRequest(UniversalBaseModel):
model_id: str
enabled_actions: typing.List[EnabledActionsEnum]
disabled_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/data_passthrough_request.py b/src/merge/resources/filestorage/types/data_passthrough_request.py
index fdf9b18c..f2718105 100644
--- a/src/merge/resources/filestorage/types/data_passthrough_request.py
+++ b/src/merge/resources/filestorage/types/data_passthrough_request.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .method_enum import MethodEnum
+import pydantic
+import typing
from .multipart_form_field_request import MultipartFormFieldRequest
from .request_format_enum import RequestFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class DataPassthroughRequest(pydantic_v1.BaseModel):
+class DataPassthroughRequest(UniversalBaseModel):
"""
# The DataPassthrough Object
@@ -24,51 +23,42 @@ class DataPassthroughRequest(pydantic_v1.BaseModel):
"""
method: MethodEnum
- path: str = pydantic_v1.Field()
+ path: str = pydantic.Field()
"""
The path of the request in the third party's platform.
"""
- base_url_override: typing.Optional[str] = pydantic_v1.Field()
+ base_url_override: typing.Optional[str] = pydantic.Field()
"""
An optional override of the third party's base url for the request.
"""
- data: typing.Optional[str] = pydantic_v1.Field()
+ data: typing.Optional[str] = pydantic.Field()
"""
The data with the request. You must include a `request_format` parameter matching the data's format
"""
- multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic_v1.Field()
+ multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field()
"""
Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`.
"""
- headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server.
"""
request_format: typing.Optional[RequestFormatEnum]
- normalize_response: typing.Optional[bool] = pydantic_v1.Field()
+ normalize_response: typing.Optional[bool] = pydantic.Field()
"""
Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/debug_mode_log.py b/src/merge/resources/filestorage/types/debug_mode_log.py
index 321c9090..2b02c1b9 100644
--- a/src/merge/resources/filestorage/types/debug_mode_log.py
+++ b/src/merge/resources/filestorage/types/debug_mode_log.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .debug_model_log_summary import DebugModelLogSummary
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class DebugModeLog(pydantic_v1.BaseModel):
+class DebugModeLog(UniversalBaseModel):
log_id: str
dashboard_view: str
log_summary: DebugModelLogSummary
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/debug_model_log_summary.py b/src/merge/resources/filestorage/types/debug_model_log_summary.py
index 06bb154b..b4f48752 100644
--- a/src/merge/resources/filestorage/types/debug_model_log_summary.py
+++ b/src/merge/resources/filestorage/types/debug_model_log_summary.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class DebugModelLogSummary(pydantic_v1.BaseModel):
+class DebugModelLogSummary(UniversalBaseModel):
url: str
method: str
status_code: int
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/drive.py b/src/merge/resources/filestorage/types/drive.py
index 2b50659c..5da5c70d 100644
--- a/src/merge/resources/filestorage/types/drive.py
+++ b/src/merge/resources/filestorage/types/drive.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Drive(pydantic_v1.BaseModel):
+class Drive(UniversalBaseModel):
"""
# The Drive Object
@@ -21,58 +21,49 @@ class Drive(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The drive's name.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's drive was created.
"""
- drive_url: typing.Optional[str] = pydantic_v1.Field()
+ drive_url: typing.Optional[str] = pydantic.Field()
"""
The drive's url.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/enabled_actions_enum.py b/src/merge/resources/filestorage/types/enabled_actions_enum.py
index 949d69dc..fa6c674e 100644
--- a/src/merge/resources/filestorage/types/enabled_actions_enum.py
+++ b/src/merge/resources/filestorage/types/enabled_actions_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EnabledActionsEnum(str, enum.Enum):
- """
- - `READ` - READ
- - `WRITE` - WRITE
- """
-
- READ = "READ"
- WRITE = "WRITE"
-
- def visit(self, read: typing.Callable[[], T_Result], write: typing.Callable[[], T_Result]) -> T_Result:
- if self is EnabledActionsEnum.READ:
- return read()
- if self is EnabledActionsEnum.WRITE:
- return write()
+EnabledActionsEnum = typing.Union[typing.Literal["READ", "WRITE"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/encoding_enum.py b/src/merge/resources/filestorage/types/encoding_enum.py
index fed12372..4c4997b2 100644
--- a/src/merge/resources/filestorage/types/encoding_enum.py
+++ b/src/merge/resources/filestorage/types/encoding_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EncodingEnum(str, enum.Enum):
- """
- - `RAW` - RAW
- - `BASE64` - BASE64
- - `GZIP_BASE64` - GZIP_BASE64
- """
-
- RAW = "RAW"
- BASE_64 = "BASE64"
- GZIP_BASE_64 = "GZIP_BASE64"
-
- def visit(
- self,
- raw: typing.Callable[[], T_Result],
- base_64: typing.Callable[[], T_Result],
- gzip_base_64: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EncodingEnum.RAW:
- return raw()
- if self is EncodingEnum.BASE_64:
- return base_64()
- if self is EncodingEnum.GZIP_BASE_64:
- return gzip_base_64()
+EncodingEnum = typing.Union[typing.Literal["RAW", "BASE64", "GZIP_BASE64"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/error_validation_problem.py b/src/merge/resources/filestorage/types/error_validation_problem.py
index 425af45c..58ea87e6 100644
--- a/src/merge/resources/filestorage/types/error_validation_problem.py
+++ b/src/merge/resources/filestorage/types/error_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ErrorValidationProblem(pydantic_v1.BaseModel):
+class ErrorValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/event_type_enum.py b/src/merge/resources/filestorage/types/event_type_enum.py
index c10cd701..2693c646 100644
--- a/src/merge/resources/filestorage/types/event_type_enum.py
+++ b/src/merge/resources/filestorage/types/event_type_enum.py
@@ -1,206 +1,47 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EventTypeEnum(str, enum.Enum):
- """
- - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY
- - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY
- - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY
- - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY
- - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY
- - `INVITED_USER` - INVITED_USER
- - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED
- - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED
- - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT
- - `CREATED_DESTINATION` - CREATED_DESTINATION
- - `DELETED_DESTINATION` - DELETED_DESTINATION
- - `CHANGED_DESTINATION` - CHANGED_DESTINATION
- - `CHANGED_SCOPES` - CHANGED_SCOPES
- - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION
- - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS
- - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION
- - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION
- - `ENABLED_CATEGORY` - ENABLED_CATEGORY
- - `DISABLED_CATEGORY` - DISABLED_CATEGORY
- - `CHANGED_PASSWORD` - CHANGED_PASSWORD
- - `RESET_PASSWORD` - RESET_PASSWORD
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING
- - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING
- - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING
- - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING
- - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC
- - `MUTED_ISSUE` - MUTED_ISSUE
- - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK
- - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
- - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
- - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
- - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
- """
-
- CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY"
- DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY"
- CREATED_TEST_API_KEY = "CREATED_TEST_API_KEY"
- DELETED_TEST_API_KEY = "DELETED_TEST_API_KEY"
- REGENERATED_PRODUCTION_API_KEY = "REGENERATED_PRODUCTION_API_KEY"
- INVITED_USER = "INVITED_USER"
- TWO_FACTOR_AUTH_ENABLED = "TWO_FACTOR_AUTH_ENABLED"
- TWO_FACTOR_AUTH_DISABLED = "TWO_FACTOR_AUTH_DISABLED"
- DELETED_LINKED_ACCOUNT = "DELETED_LINKED_ACCOUNT"
- CREATED_DESTINATION = "CREATED_DESTINATION"
- DELETED_DESTINATION = "DELETED_DESTINATION"
- CHANGED_DESTINATION = "CHANGED_DESTINATION"
- CHANGED_SCOPES = "CHANGED_SCOPES"
- CHANGED_PERSONAL_INFORMATION = "CHANGED_PERSONAL_INFORMATION"
- CHANGED_ORGANIZATION_SETTINGS = "CHANGED_ORGANIZATION_SETTINGS"
- ENABLED_INTEGRATION = "ENABLED_INTEGRATION"
- DISABLED_INTEGRATION = "DISABLED_INTEGRATION"
- ENABLED_CATEGORY = "ENABLED_CATEGORY"
- DISABLED_CATEGORY = "DISABLED_CATEGORY"
- CHANGED_PASSWORD = "CHANGED_PASSWORD"
- RESET_PASSWORD = "RESET_PASSWORD"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- CREATED_INTEGRATION_WIDE_FIELD_MAPPING = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING"
- CREATED_LINKED_ACCOUNT_FIELD_MAPPING = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING"
- CHANGED_INTEGRATION_WIDE_FIELD_MAPPING = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING"
- CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING"
- DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING"
- DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING"
- FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC"
- MUTED_ISSUE = "MUTED_ISSUE"
- GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK"
- ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK"
- DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK"
- MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED"
- END_USER_CREDENTIALS_ACCESSED = "END_USER_CREDENTIALS_ACCESSED"
-
- def visit(
- self,
- created_remote_production_api_key: typing.Callable[[], T_Result],
- deleted_remote_production_api_key: typing.Callable[[], T_Result],
- created_test_api_key: typing.Callable[[], T_Result],
- deleted_test_api_key: typing.Callable[[], T_Result],
- regenerated_production_api_key: typing.Callable[[], T_Result],
- invited_user: typing.Callable[[], T_Result],
- two_factor_auth_enabled: typing.Callable[[], T_Result],
- two_factor_auth_disabled: typing.Callable[[], T_Result],
- deleted_linked_account: typing.Callable[[], T_Result],
- created_destination: typing.Callable[[], T_Result],
- deleted_destination: typing.Callable[[], T_Result],
- changed_destination: typing.Callable[[], T_Result],
- changed_scopes: typing.Callable[[], T_Result],
- changed_personal_information: typing.Callable[[], T_Result],
- changed_organization_settings: typing.Callable[[], T_Result],
- enabled_integration: typing.Callable[[], T_Result],
- disabled_integration: typing.Callable[[], T_Result],
- enabled_category: typing.Callable[[], T_Result],
- disabled_category: typing.Callable[[], T_Result],
- changed_password: typing.Callable[[], T_Result],
- reset_password: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- created_integration_wide_field_mapping: typing.Callable[[], T_Result],
- created_linked_account_field_mapping: typing.Callable[[], T_Result],
- changed_integration_wide_field_mapping: typing.Callable[[], T_Result],
- changed_linked_account_field_mapping: typing.Callable[[], T_Result],
- deleted_integration_wide_field_mapping: typing.Callable[[], T_Result],
- deleted_linked_account_field_mapping: typing.Callable[[], T_Result],
- forced_linked_account_resync: typing.Callable[[], T_Result],
- muted_issue: typing.Callable[[], T_Result],
- generated_magic_link: typing.Callable[[], T_Result],
- enabled_merge_webhook: typing.Callable[[], T_Result],
- disabled_merge_webhook: typing.Callable[[], T_Result],
- merge_webhook_target_changed: typing.Callable[[], T_Result],
- end_user_credentials_accessed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY:
- return created_remote_production_api_key()
- if self is EventTypeEnum.DELETED_REMOTE_PRODUCTION_API_KEY:
- return deleted_remote_production_api_key()
- if self is EventTypeEnum.CREATED_TEST_API_KEY:
- return created_test_api_key()
- if self is EventTypeEnum.DELETED_TEST_API_KEY:
- return deleted_test_api_key()
- if self is EventTypeEnum.REGENERATED_PRODUCTION_API_KEY:
- return regenerated_production_api_key()
- if self is EventTypeEnum.INVITED_USER:
- return invited_user()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_ENABLED:
- return two_factor_auth_enabled()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_DISABLED:
- return two_factor_auth_disabled()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT:
- return deleted_linked_account()
- if self is EventTypeEnum.CREATED_DESTINATION:
- return created_destination()
- if self is EventTypeEnum.DELETED_DESTINATION:
- return deleted_destination()
- if self is EventTypeEnum.CHANGED_DESTINATION:
- return changed_destination()
- if self is EventTypeEnum.CHANGED_SCOPES:
- return changed_scopes()
- if self is EventTypeEnum.CHANGED_PERSONAL_INFORMATION:
- return changed_personal_information()
- if self is EventTypeEnum.CHANGED_ORGANIZATION_SETTINGS:
- return changed_organization_settings()
- if self is EventTypeEnum.ENABLED_INTEGRATION:
- return enabled_integration()
- if self is EventTypeEnum.DISABLED_INTEGRATION:
- return disabled_integration()
- if self is EventTypeEnum.ENABLED_CATEGORY:
- return enabled_category()
- if self is EventTypeEnum.DISABLED_CATEGORY:
- return disabled_category()
- if self is EventTypeEnum.CHANGED_PASSWORD:
- return changed_password()
- if self is EventTypeEnum.RESET_PASSWORD:
- return reset_password()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return enabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return enabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return disabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return disabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.CREATED_INTEGRATION_WIDE_FIELD_MAPPING:
- return created_integration_wide_field_mapping()
- if self is EventTypeEnum.CREATED_LINKED_ACCOUNT_FIELD_MAPPING:
- return created_linked_account_field_mapping()
- if self is EventTypeEnum.CHANGED_INTEGRATION_WIDE_FIELD_MAPPING:
- return changed_integration_wide_field_mapping()
- if self is EventTypeEnum.CHANGED_LINKED_ACCOUNT_FIELD_MAPPING:
- return changed_linked_account_field_mapping()
- if self is EventTypeEnum.DELETED_INTEGRATION_WIDE_FIELD_MAPPING:
- return deleted_integration_wide_field_mapping()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING:
- return deleted_linked_account_field_mapping()
- if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC:
- return forced_linked_account_resync()
- if self is EventTypeEnum.MUTED_ISSUE:
- return muted_issue()
- if self is EventTypeEnum.GENERATED_MAGIC_LINK:
- return generated_magic_link()
- if self is EventTypeEnum.ENABLED_MERGE_WEBHOOK:
- return enabled_merge_webhook()
- if self is EventTypeEnum.DISABLED_MERGE_WEBHOOK:
- return disabled_merge_webhook()
- if self is EventTypeEnum.MERGE_WEBHOOK_TARGET_CHANGED:
- return merge_webhook_target_changed()
- if self is EventTypeEnum.END_USER_CREDENTIALS_ACCESSED:
- return end_user_credentials_accessed()
+EventTypeEnum = typing.Union[
+ typing.Literal[
+ "CREATED_REMOTE_PRODUCTION_API_KEY",
+ "DELETED_REMOTE_PRODUCTION_API_KEY",
+ "CREATED_TEST_API_KEY",
+ "DELETED_TEST_API_KEY",
+ "REGENERATED_PRODUCTION_API_KEY",
+ "INVITED_USER",
+ "TWO_FACTOR_AUTH_ENABLED",
+ "TWO_FACTOR_AUTH_DISABLED",
+ "DELETED_LINKED_ACCOUNT",
+ "CREATED_DESTINATION",
+ "DELETED_DESTINATION",
+ "CHANGED_DESTINATION",
+ "CHANGED_SCOPES",
+ "CHANGED_PERSONAL_INFORMATION",
+ "CHANGED_ORGANIZATION_SETTINGS",
+ "ENABLED_INTEGRATION",
+ "DISABLED_INTEGRATION",
+ "ENABLED_CATEGORY",
+ "DISABLED_CATEGORY",
+ "CHANGED_PASSWORD",
+ "RESET_PASSWORD",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "CREATED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CREATED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "DELETED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "DELETED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "FORCED_LINKED_ACCOUNT_RESYNC",
+ "MUTED_ISSUE",
+ "GENERATED_MAGIC_LINK",
+ "ENABLED_MERGE_WEBHOOK",
+ "DISABLED_MERGE_WEBHOOK",
+ "MERGE_WEBHOOK_TARGET_CHANGED",
+ "END_USER_CREDENTIALS_ACCESSED",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/filestorage/types/external_target_field_api.py b/src/merge/resources/filestorage/types/external_target_field_api.py
index a97d536a..18988d44 100644
--- a/src/merge/resources/filestorage/types/external_target_field_api.py
+++ b/src/merge/resources/filestorage/types/external_target_field_api.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ExternalTargetFieldApi(pydantic_v1.BaseModel):
+class ExternalTargetFieldApi(UniversalBaseModel):
name: typing.Optional[str]
description: typing.Optional[str]
is_mapped: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/external_target_field_api_response.py b/src/merge/resources/filestorage/types/external_target_field_api_response.py
index bde996de..dc78ea6d 100644
--- a/src/merge/resources/filestorage/types/external_target_field_api_response.py
+++ b/src/merge/resources/filestorage/types/external_target_field_api_response.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .external_target_field_api import ExternalTargetFieldApi
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ExternalTargetFieldApiResponse(pydantic_v1.BaseModel):
- file: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="File")
- folder: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Folder")
- drive: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Drive")
- group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Group")
- user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="User")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+class ExternalTargetFieldApiResponse(UniversalBaseModel):
+ file: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="File")
+ folder: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Folder")
+ drive: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Drive")
+ group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Group")
+ user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="User")
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/field_mapping_api_instance.py b/src/merge/resources/filestorage/types/field_mapping_api_instance.py
index d9d7670d..ef4d9c48 100644
--- a/src/merge/resources/filestorage/types/field_mapping_api_instance.py
+++ b/src/merge/resources/filestorage/types/field_mapping_api_instance.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
from .field_mapping_api_instance_target_field import FieldMappingApiInstanceTargetField
+from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingApiInstance(pydantic_v1.BaseModel):
+class FieldMappingApiInstance(UniversalBaseModel):
id: typing.Optional[str]
is_integration_wide: typing.Optional[bool]
target_field: typing.Optional[FieldMappingApiInstanceTargetField]
remote_field: typing.Optional[FieldMappingApiInstanceRemoteField]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/field_mapping_api_instance_remote_field.py b/src/merge/resources/filestorage/types/field_mapping_api_instance_remote_field.py
index 9539d3dc..ddfff4da 100644
--- a/src/merge/resources/filestorage/types/field_mapping_api_instance_remote_field.py
+++ b/src/merge/resources/filestorage/types/field_mapping_api_instance_remote_field.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .field_mapping_api_instance_remote_field_remote_endpoint_info import (
FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo,
)
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceRemoteField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteField(UniversalBaseModel):
remote_key_name: str
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py b/src/merge/resources/filestorage/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
index d9fcc276..14c37c76 100644
--- a/src/merge/resources/filestorage/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
+++ b/src/merge/resources/filestorage/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(UniversalBaseModel):
method: typing.Optional[str]
url_path: typing.Optional[str]
field_traversal_path: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/field_mapping_api_instance_response.py b/src/merge/resources/filestorage/types/field_mapping_api_instance_response.py
index 033aa66f..b9ec73bd 100644
--- a/src/merge/resources/filestorage/types/field_mapping_api_instance_response.py
+++ b/src/merge/resources/filestorage/types/field_mapping_api_instance_response.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .field_mapping_api_instance import FieldMappingApiInstance
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceResponse(pydantic_v1.BaseModel):
- file: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="File")
- folder: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Folder")
- drive: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Drive")
- group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Group")
- user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="User")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+class FieldMappingApiInstanceResponse(UniversalBaseModel):
+ file: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="File")
+ folder: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Folder")
+ drive: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Drive")
+ group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Group")
+ user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="User")
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/field_mapping_api_instance_target_field.py b/src/merge/resources/filestorage/types/field_mapping_api_instance_target_field.py
index 25a8dcff..a1b51052 100644
--- a/src/merge/resources/filestorage/types/field_mapping_api_instance_target_field.py
+++ b/src/merge/resources/filestorage/types/field_mapping_api_instance_target_field.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceTargetField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceTargetField(UniversalBaseModel):
name: str
description: str
is_organization_wide: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/field_mapping_instance_response.py b/src/merge/resources/filestorage/types/field_mapping_instance_response.py
index b55d2c40..a56aeb93 100644
--- a/src/merge/resources/filestorage/types/field_mapping_instance_response.py
+++ b/src/merge/resources/filestorage/types/field_mapping_instance_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .field_mapping_api_instance import FieldMappingApiInstance
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingInstanceResponse(pydantic_v1.BaseModel):
+class FieldMappingInstanceResponse(UniversalBaseModel):
model: FieldMappingApiInstance
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/field_permission_deserializer.py b/src/merge/resources/filestorage/types/field_permission_deserializer.py
index 124f3deb..9670537a 100644
--- a/src/merge/resources/filestorage/types/field_permission_deserializer.py
+++ b/src/merge/resources/filestorage/types/field_permission_deserializer.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializer(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializer(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/field_permission_deserializer_request.py b/src/merge/resources/filestorage/types/field_permission_deserializer_request.py
index 65e80e75..04e14608 100644
--- a/src/merge/resources/filestorage/types/field_permission_deserializer_request.py
+++ b/src/merge/resources/filestorage/types/field_permission_deserializer_request.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializerRequest(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializerRequest(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/file.py b/src/merge/resources/filestorage/types/file.py
index 527ef52b..a4a73943 100644
--- a/src/merge/resources/filestorage/types/file.py
+++ b/src/merge/resources/filestorage/types/file.py
@@ -1,16 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .folder import Folder
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .file_drive import FileDrive
+import pydantic
+import datetime as dt
from .file_folder import FileFolder
from .file_permissions import FilePermissions
+from .file_drive import FileDrive
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class File(pydantic_v1.BaseModel):
+class File(UniversalBaseModel):
"""
# The File Object
@@ -24,98 +27,92 @@ class File(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The file's name.
"""
- file_url: typing.Optional[str] = pydantic_v1.Field()
+ file_url: typing.Optional[str] = pydantic.Field()
"""
The URL to access the file.
"""
- file_thumbnail_url: typing.Optional[str] = pydantic_v1.Field()
+ file_thumbnail_url: typing.Optional[str] = pydantic.Field()
"""
The URL that produces a thumbnail preview of the file. Typically an image.
"""
- size: typing.Optional[int] = pydantic_v1.Field()
+ size: typing.Optional[int] = pydantic.Field()
"""
The file's size, in bytes.
"""
- mime_type: typing.Optional[str] = pydantic_v1.Field()
+ mime_type: typing.Optional[str] = pydantic.Field()
"""
The file's mime type.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The file's description.
"""
- folder: typing.Optional[FileFolder] = pydantic_v1.Field()
+ folder: typing.Optional[FileFolder] = pydantic.Field()
"""
The folder that the file belongs to.
"""
- permissions: typing.Optional[FilePermissions] = pydantic_v1.Field()
+ permissions: typing.Optional[FilePermissions] = pydantic.Field()
"""
The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`.
"""
- drive: typing.Optional[FileDrive] = pydantic_v1.Field()
+ drive: typing.Optional[FileDrive] = pydantic.Field()
"""
The drive that the file belongs to.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's file was created.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's file was updated.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Folder, File=File)
diff --git a/src/merge/resources/filestorage/types/file_drive.py b/src/merge/resources/filestorage/types/file_drive.py
index 1f12cea0..647567c6 100644
--- a/src/merge/resources/filestorage/types/file_drive.py
+++ b/src/merge/resources/filestorage/types/file_drive.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .drive import Drive
FileDrive = typing.Union[str, Drive]
diff --git a/src/merge/resources/filestorage/types/file_folder.py b/src/merge/resources/filestorage/types/file_folder.py
index 2c06f030..83fb0e7b 100644
--- a/src/merge/resources/filestorage/types/file_folder.py
+++ b/src/merge/resources/filestorage/types/file_folder.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .folder import Folder
FileFolder = typing.Union[str, Folder]
diff --git a/src/merge/resources/filestorage/types/file_permissions.py b/src/merge/resources/filestorage/types/file_permissions.py
index 3963e4ac..de655007 100644
--- a/src/merge/resources/filestorage/types/file_permissions.py
+++ b/src/merge/resources/filestorage/types/file_permissions.py
@@ -1,8 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
-from .file_permissions_item import FilePermissionsItem
from .permission_request import PermissionRequest
+from .file_permissions_item import FilePermissionsItem
FilePermissions = typing.Union[str, PermissionRequest, typing.List[FilePermissionsItem]]
diff --git a/src/merge/resources/filestorage/types/file_permissions_item.py b/src/merge/resources/filestorage/types/file_permissions_item.py
index 250d3332..e248d75a 100644
--- a/src/merge/resources/filestorage/types/file_permissions_item.py
+++ b/src/merge/resources/filestorage/types/file_permissions_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .permission_request import PermissionRequest
FilePermissionsItem = typing.Union[str, PermissionRequest]
diff --git a/src/merge/resources/filestorage/types/file_request.py b/src/merge/resources/filestorage/types/file_request.py
index bc462830..fb61ea15 100644
--- a/src/merge/resources/filestorage/types/file_request.py
+++ b/src/merge/resources/filestorage/types/file_request.py
@@ -1,16 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .folder import Folder
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .file_request_drive import FileRequestDrive
+import pydantic
from .file_request_folder import FileRequestFolder
from .file_request_permissions import FileRequestPermissions
+from .file_request_drive import FileRequestDrive
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class FileRequest(pydantic_v1.BaseModel):
+class FileRequest(UniversalBaseModel):
"""
# The File Object
@@ -23,68 +25,62 @@ class FileRequest(pydantic_v1.BaseModel):
Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The file's name.
"""
- file_url: typing.Optional[str] = pydantic_v1.Field()
+ file_url: typing.Optional[str] = pydantic.Field()
"""
The URL to access the file.
"""
- file_thumbnail_url: typing.Optional[str] = pydantic_v1.Field()
+ file_thumbnail_url: typing.Optional[str] = pydantic.Field()
"""
The URL that produces a thumbnail preview of the file. Typically an image.
"""
- size: typing.Optional[int] = pydantic_v1.Field()
+ size: typing.Optional[int] = pydantic.Field()
"""
The file's size, in bytes.
"""
- mime_type: typing.Optional[str] = pydantic_v1.Field()
+ mime_type: typing.Optional[str] = pydantic.Field()
"""
The file's mime type.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The file's description.
"""
- folder: typing.Optional[FileRequestFolder] = pydantic_v1.Field()
+ folder: typing.Optional[FileRequestFolder] = pydantic.Field()
"""
The folder that the file belongs to.
"""
- permissions: typing.Optional[FileRequestPermissions] = pydantic_v1.Field()
+ permissions: typing.Optional[FileRequestPermissions] = pydantic.Field()
"""
The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`.
"""
- drive: typing.Optional[FileRequestDrive] = pydantic_v1.Field()
+ drive: typing.Optional[FileRequestDrive] = pydantic.Field()
"""
The drive that the file belongs to.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Folder, FileRequest=FileRequest)
diff --git a/src/merge/resources/filestorage/types/file_request_drive.py b/src/merge/resources/filestorage/types/file_request_drive.py
index 8f261863..7cd0a4ba 100644
--- a/src/merge/resources/filestorage/types/file_request_drive.py
+++ b/src/merge/resources/filestorage/types/file_request_drive.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .drive import Drive
FileRequestDrive = typing.Union[str, Drive]
diff --git a/src/merge/resources/filestorage/types/file_request_folder.py b/src/merge/resources/filestorage/types/file_request_folder.py
index 1a5fe16b..696a8cae 100644
--- a/src/merge/resources/filestorage/types/file_request_folder.py
+++ b/src/merge/resources/filestorage/types/file_request_folder.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .folder import Folder
FileRequestFolder = typing.Union[str, Folder]
diff --git a/src/merge/resources/filestorage/types/file_request_permissions.py b/src/merge/resources/filestorage/types/file_request_permissions.py
index e79c10b2..a4175961 100644
--- a/src/merge/resources/filestorage/types/file_request_permissions.py
+++ b/src/merge/resources/filestorage/types/file_request_permissions.py
@@ -1,8 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
-from .file_request_permissions_item import FileRequestPermissionsItem
from .permission_request import PermissionRequest
+from .file_request_permissions_item import FileRequestPermissionsItem
FileRequestPermissions = typing.Union[str, PermissionRequest, typing.List[FileRequestPermissionsItem]]
diff --git a/src/merge/resources/filestorage/types/file_request_permissions_item.py b/src/merge/resources/filestorage/types/file_request_permissions_item.py
index c6e44350..6125cb09 100644
--- a/src/merge/resources/filestorage/types/file_request_permissions_item.py
+++ b/src/merge/resources/filestorage/types/file_request_permissions_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .permission_request import PermissionRequest
FileRequestPermissionsItem = typing.Union[str, PermissionRequest]
diff --git a/src/merge/resources/filestorage/types/file_storage_file_response.py b/src/merge/resources/filestorage/types/file_storage_file_response.py
index fe5dbf60..498dd53a 100644
--- a/src/merge/resources/filestorage/types/file_storage_file_response.py
+++ b/src/merge/resources/filestorage/types/file_storage_file_response.py
@@ -1,36 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .folder import Folder
from .file import File
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class FileStorageFileResponse(pydantic_v1.BaseModel):
+class FileStorageFileResponse(UniversalBaseModel):
model: File
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Folder, FileStorageFileResponse=FileStorageFileResponse)
diff --git a/src/merge/resources/filestorage/types/file_storage_folder_response.py b/src/merge/resources/filestorage/types/file_storage_folder_response.py
index 07707cb4..fbb7dd2b 100644
--- a/src/merge/resources/filestorage/types/file_storage_folder_response.py
+++ b/src/merge/resources/filestorage/types/file_storage_folder_response.py
@@ -1,36 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .folder import Folder
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class FileStorageFolderResponse(pydantic_v1.BaseModel):
+class FileStorageFolderResponse(UniversalBaseModel):
model: Folder
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Folder, FileStorageFolderResponse=FileStorageFolderResponse)
diff --git a/src/merge/resources/filestorage/types/folder.py b/src/merge/resources/filestorage/types/folder.py
index 789a08e1..dcf6e377 100644
--- a/src/merge/resources/filestorage/types/folder.py
+++ b/src/merge/resources/filestorage/types/folder.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .folder_drive import FolderDrive
from .folder_permissions import FolderPermissions
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Folder(pydantic_v1.BaseModel):
+class Folder(UniversalBaseModel):
"""
# The Folder Object
@@ -25,93 +25,84 @@ class Folder(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The folder's name.
"""
- folder_url: typing.Optional[str] = pydantic_v1.Field()
+ folder_url: typing.Optional[str] = pydantic.Field()
"""
The URL to access the folder.
"""
- size: typing.Optional[int] = pydantic_v1.Field()
+ size: typing.Optional[int] = pydantic.Field()
"""
The folder's size, in bytes.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The folder's description.
"""
- parent_folder: typing.Optional[FolderParentFolder] = pydantic_v1.Field()
+ parent_folder: typing.Optional["FolderParentFolder"] = pydantic.Field()
"""
The folder that the folder belongs to.
"""
- drive: typing.Optional[FolderDrive] = pydantic_v1.Field()
+ drive: typing.Optional[FolderDrive] = pydantic.Field()
"""
The drive that the folder belongs to.
"""
- permissions: typing.Optional[FolderPermissions] = pydantic_v1.Field()
+ permissions: typing.Optional[FolderPermissions] = pydantic.Field()
"""
The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's folder was created.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's folder was updated.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
from .folder_parent_folder import FolderParentFolder # noqa: E402
-Folder.update_forward_refs()
+update_forward_refs(Folder)
diff --git a/src/merge/resources/filestorage/types/folder_drive.py b/src/merge/resources/filestorage/types/folder_drive.py
index 988ef70f..56f9dc6c 100644
--- a/src/merge/resources/filestorage/types/folder_drive.py
+++ b/src/merge/resources/filestorage/types/folder_drive.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .drive import Drive
FolderDrive = typing.Union[str, Drive]
diff --git a/src/merge/resources/filestorage/types/folder_parent_folder.py b/src/merge/resources/filestorage/types/folder_parent_folder.py
index c8b5c79a..e9ac76ad 100644
--- a/src/merge/resources/filestorage/types/folder_parent_folder.py
+++ b/src/merge/resources/filestorage/types/folder_parent_folder.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .folder import Folder
-
-FolderParentFolder = typing.Union[str, Folder]
+if typing.TYPE_CHECKING:
+ from .folder import Folder
+FolderParentFolder = typing.Union[str, "Folder"]
diff --git a/src/merge/resources/filestorage/types/folder_permissions.py b/src/merge/resources/filestorage/types/folder_permissions.py
index c3640113..f5faa67e 100644
--- a/src/merge/resources/filestorage/types/folder_permissions.py
+++ b/src/merge/resources/filestorage/types/folder_permissions.py
@@ -1,8 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
-from .folder_permissions_item import FolderPermissionsItem
from .permission_request import PermissionRequest
+from .folder_permissions_item import FolderPermissionsItem
FolderPermissions = typing.Union[str, PermissionRequest, typing.List[FolderPermissionsItem]]
diff --git a/src/merge/resources/filestorage/types/folder_permissions_item.py b/src/merge/resources/filestorage/types/folder_permissions_item.py
index 1d33e70d..b7a4aa51 100644
--- a/src/merge/resources/filestorage/types/folder_permissions_item.py
+++ b/src/merge/resources/filestorage/types/folder_permissions_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .permission_request import PermissionRequest
FolderPermissionsItem = typing.Union[str, PermissionRequest]
diff --git a/src/merge/resources/filestorage/types/folder_request.py b/src/merge/resources/filestorage/types/folder_request.py
index e4472dea..f2febdf3 100644
--- a/src/merge/resources/filestorage/types/folder_request.py
+++ b/src/merge/resources/filestorage/types/folder_request.py
@@ -1,16 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .folder import Folder
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .folder_request_drive import FolderRequestDrive
+import pydantic
from .folder_request_parent_folder import FolderRequestParentFolder
+from .folder_request_drive import FolderRequestDrive
from .folder_request_permissions import FolderRequestPermissions
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class FolderRequest(pydantic_v1.BaseModel):
+class FolderRequest(UniversalBaseModel):
"""
# The Folder Object
@@ -23,58 +25,52 @@ class FolderRequest(pydantic_v1.BaseModel):
Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The folder's name.
"""
- folder_url: typing.Optional[str] = pydantic_v1.Field()
+ folder_url: typing.Optional[str] = pydantic.Field()
"""
The URL to access the folder.
"""
- size: typing.Optional[int] = pydantic_v1.Field()
+ size: typing.Optional[int] = pydantic.Field()
"""
The folder's size, in bytes.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The folder's description.
"""
- parent_folder: typing.Optional[FolderRequestParentFolder] = pydantic_v1.Field()
+ parent_folder: typing.Optional[FolderRequestParentFolder] = pydantic.Field()
"""
The folder that the folder belongs to.
"""
- drive: typing.Optional[FolderRequestDrive] = pydantic_v1.Field()
+ drive: typing.Optional[FolderRequestDrive] = pydantic.Field()
"""
The drive that the folder belongs to.
"""
- permissions: typing.Optional[FolderRequestPermissions] = pydantic_v1.Field()
+ permissions: typing.Optional[FolderRequestPermissions] = pydantic.Field()
"""
The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Folder, FolderRequest=FolderRequest)
diff --git a/src/merge/resources/filestorage/types/folder_request_drive.py b/src/merge/resources/filestorage/types/folder_request_drive.py
index dc519edb..773ad7fb 100644
--- a/src/merge/resources/filestorage/types/folder_request_drive.py
+++ b/src/merge/resources/filestorage/types/folder_request_drive.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .drive import Drive
FolderRequestDrive = typing.Union[str, Drive]
diff --git a/src/merge/resources/filestorage/types/folder_request_parent_folder.py b/src/merge/resources/filestorage/types/folder_request_parent_folder.py
index 52f6b3ad..5a20d15f 100644
--- a/src/merge/resources/filestorage/types/folder_request_parent_folder.py
+++ b/src/merge/resources/filestorage/types/folder_request_parent_folder.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .folder import Folder
FolderRequestParentFolder = typing.Union[str, Folder]
diff --git a/src/merge/resources/filestorage/types/folder_request_permissions.py b/src/merge/resources/filestorage/types/folder_request_permissions.py
index 4e14d7c4..35ed69c0 100644
--- a/src/merge/resources/filestorage/types/folder_request_permissions.py
+++ b/src/merge/resources/filestorage/types/folder_request_permissions.py
@@ -1,8 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
-from .folder_request_permissions_item import FolderRequestPermissionsItem
from .permission_request import PermissionRequest
+from .folder_request_permissions_item import FolderRequestPermissionsItem
FolderRequestPermissions = typing.Union[str, PermissionRequest, typing.List[FolderRequestPermissionsItem]]
diff --git a/src/merge/resources/filestorage/types/folder_request_permissions_item.py b/src/merge/resources/filestorage/types/folder_request_permissions_item.py
index 7fc6ee86..1361e171 100644
--- a/src/merge/resources/filestorage/types/folder_request_permissions_item.py
+++ b/src/merge/resources/filestorage/types/folder_request_permissions_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .permission_request import PermissionRequest
FolderRequestPermissionsItem = typing.Union[str, PermissionRequest]
diff --git a/src/merge/resources/filestorage/types/group.py b/src/merge/resources/filestorage/types/group.py
index ead60585..749062d1 100644
--- a/src/merge/resources/filestorage/types/group.py
+++ b/src/merge/resources/filestorage/types/group.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Group(pydantic_v1.BaseModel):
+class Group(UniversalBaseModel):
"""
# The Group Object
@@ -21,53 +21,44 @@ class Group(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The group's name.
"""
- users: typing.List[str] = pydantic_v1.Field()
+ users: typing.List[str] = pydantic.Field()
"""
The users that belong in the group. If null, this typically means it's either a domain or the third-party platform does not surface this information.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/individual_common_model_scope_deserializer.py b/src/merge/resources/filestorage/types/individual_common_model_scope_deserializer.py
index d80ca06e..122df11c 100644
--- a/src/merge/resources/filestorage/types/individual_common_model_scope_deserializer.py
+++ b/src/merge/resources/filestorage/types/individual_common_model_scope_deserializer.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer import FieldPermissionDeserializer
from .model_permission_deserializer import ModelPermissionDeserializer
+from .field_permission_deserializer import FieldPermissionDeserializer
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializer(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializer(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializer]]
field_permissions: typing.Optional[FieldPermissionDeserializer]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/individual_common_model_scope_deserializer_request.py b/src/merge/resources/filestorage/types/individual_common_model_scope_deserializer_request.py
index 8f2e7de5..a1a80902 100644
--- a/src/merge/resources/filestorage/types/individual_common_model_scope_deserializer_request.py
+++ b/src/merge/resources/filestorage/types/individual_common_model_scope_deserializer_request.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
from .model_permission_deserializer_request import ModelPermissionDeserializerRequest
+from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializerRequest(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializerRequest(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializerRequest]]
field_permissions: typing.Optional[FieldPermissionDeserializerRequest]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/issue.py b/src/merge/resources/filestorage/types/issue.py
index 086a0db2..5a584515 100644
--- a/src/merge/resources/filestorage/types/issue.py
+++ b/src/merge/resources/filestorage/types/issue.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue_status import IssueStatus
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Issue(pydantic_v1.BaseModel):
+class Issue(UniversalBaseModel):
id: typing.Optional[str]
- status: typing.Optional[IssueStatus] = pydantic_v1.Field()
+ status: typing.Optional[IssueStatus] = pydantic.Field()
"""
Status of the issue. Options: ('ONGOING', 'RESOLVED')
@@ -19,26 +19,17 @@ class Issue(pydantic_v1.BaseModel):
"""
error_description: str
- end_user: typing.Optional[typing.Dict[str, typing.Any]]
+ end_user: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
first_incident_time: typing.Optional[dt.datetime]
last_incident_time: typing.Optional[dt.datetime]
is_muted: typing.Optional[bool]
error_details: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/issue_status.py b/src/merge/resources/filestorage/types/issue_status.py
index 8e4d6516..59d004d8 100644
--- a/src/merge/resources/filestorage/types/issue_status.py
+++ b/src/merge/resources/filestorage/types/issue_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .issue_status_enum import IssueStatusEnum
IssueStatus = typing.Union[IssueStatusEnum, str]
diff --git a/src/merge/resources/filestorage/types/issue_status_enum.py b/src/merge/resources/filestorage/types/issue_status_enum.py
index fc2ef2b5..76eb5549 100644
--- a/src/merge/resources/filestorage/types/issue_status_enum.py
+++ b/src/merge/resources/filestorage/types/issue_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssueStatusEnum(str, enum.Enum):
- """
- - `ONGOING` - ONGOING
- - `RESOLVED` - RESOLVED
- """
-
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssueStatusEnum.ONGOING:
- return ongoing()
- if self is IssueStatusEnum.RESOLVED:
- return resolved()
+IssueStatusEnum = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/link_token.py b/src/merge/resources/filestorage/types/link_token.py
index 1c82d1ac..1d25dddb 100644
--- a/src/merge/resources/filestorage/types/link_token.py
+++ b/src/merge/resources/filestorage/types/link_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkToken(pydantic_v1.BaseModel):
+class LinkToken(UniversalBaseModel):
link_token: str
integration_name: typing.Optional[str]
magic_link_url: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/linked_account_status.py b/src/merge/resources/filestorage/types/linked_account_status.py
index 60e21a98..2e27df33 100644
--- a/src/merge/resources/filestorage/types/linked_account_status.py
+++ b/src/merge/resources/filestorage/types/linked_account_status.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkedAccountStatus(pydantic_v1.BaseModel):
+class LinkedAccountStatus(UniversalBaseModel):
linked_account_status: str
can_make_request: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/meta_response.py b/src/merge/resources/filestorage/types/meta_response.py
index debaf4ef..44e57fde 100644
--- a/src/merge/resources/filestorage/types/meta_response.py
+++ b/src/merge/resources/filestorage/types/meta_response.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .linked_account_status import LinkedAccountStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class MetaResponse(pydantic_v1.BaseModel):
- request_schema: typing.Dict[str, typing.Any]
- remote_field_classes: typing.Optional[typing.Dict[str, typing.Any]]
+class MetaResponse(UniversalBaseModel):
+ request_schema: typing.Dict[str, typing.Optional[typing.Any]]
+ remote_field_classes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
status: typing.Optional[LinkedAccountStatus]
has_conditional_params: bool
has_required_linked_account_params: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/method_enum.py b/src/merge/resources/filestorage/types/method_enum.py
index c2418a83..e782e49c 100644
--- a/src/merge/resources/filestorage/types/method_enum.py
+++ b/src/merge/resources/filestorage/types/method_enum.py
@@ -1,51 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MethodEnum(str, enum.Enum):
- """
- - `GET` - GET
- - `OPTIONS` - OPTIONS
- - `HEAD` - HEAD
- - `POST` - POST
- - `PUT` - PUT
- - `PATCH` - PATCH
- - `DELETE` - DELETE
- """
-
- GET = "GET"
- OPTIONS = "OPTIONS"
- HEAD = "HEAD"
- POST = "POST"
- PUT = "PUT"
- PATCH = "PATCH"
- DELETE = "DELETE"
-
- def visit(
- self,
- get: typing.Callable[[], T_Result],
- options: typing.Callable[[], T_Result],
- head: typing.Callable[[], T_Result],
- post: typing.Callable[[], T_Result],
- put: typing.Callable[[], T_Result],
- patch: typing.Callable[[], T_Result],
- delete: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MethodEnum.GET:
- return get()
- if self is MethodEnum.OPTIONS:
- return options()
- if self is MethodEnum.HEAD:
- return head()
- if self is MethodEnum.POST:
- return post()
- if self is MethodEnum.PUT:
- return put()
- if self is MethodEnum.PATCH:
- return patch()
- if self is MethodEnum.DELETE:
- return delete()
+MethodEnum = typing.Union[typing.Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/model_operation.py b/src/merge/resources/filestorage/types/model_operation.py
index 0f4429ec..2a12b6d5 100644
--- a/src/merge/resources/filestorage/types/model_operation.py
+++ b/src/merge/resources/filestorage/types/model_operation.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelOperation(pydantic_v1.BaseModel):
+class ModelOperation(UniversalBaseModel):
"""
# The ModelOperation Object
@@ -25,20 +24,11 @@ class ModelOperation(pydantic_v1.BaseModel):
required_post_parameters: typing.List[str]
supported_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/model_permission_deserializer.py b/src/merge/resources/filestorage/types/model_permission_deserializer.py
index 5a6adf20..b6d813e4 100644
--- a/src/merge/resources/filestorage/types/model_permission_deserializer.py
+++ b/src/merge/resources/filestorage/types/model_permission_deserializer.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializer(pydantic_v1.BaseModel):
+class ModelPermissionDeserializer(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/model_permission_deserializer_request.py b/src/merge/resources/filestorage/types/model_permission_deserializer_request.py
index 3f72b9ac..5885627b 100644
--- a/src/merge/resources/filestorage/types/model_permission_deserializer_request.py
+++ b/src/merge/resources/filestorage/types/model_permission_deserializer_request.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializerRequest(pydantic_v1.BaseModel):
+class ModelPermissionDeserializerRequest(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/multipart_form_field_request.py b/src/merge/resources/filestorage/types/multipart_form_field_request.py
index 9c8ffb21..80099016 100644
--- a/src/merge/resources/filestorage/types/multipart_form_field_request.py
+++ b/src/merge/resources/filestorage/types/multipart_form_field_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class MultipartFormFieldRequest(pydantic_v1.BaseModel):
+class MultipartFormFieldRequest(UniversalBaseModel):
"""
# The MultipartFormField Object
@@ -21,17 +20,17 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
Create a `MultipartFormField` to define a multipart form entry.
"""
- name: str = pydantic_v1.Field()
+ name: str = pydantic.Field()
"""
The name of the form field
"""
- data: str = pydantic_v1.Field()
+ data: str = pydantic.Field()
"""
The data for the form field.
"""
- encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic_v1.Field()
+ encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic.Field()
"""
The encoding of the value of `data`. Defaults to `RAW` if not defined.
@@ -40,30 +39,21 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
- `GZIP_BASE64` - GZIP_BASE64
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The file name of the form field, if the field is for a file.
"""
- content_type: typing.Optional[str] = pydantic_v1.Field()
+ content_type: typing.Optional[str] = pydantic.Field()
"""
The MIME type of the file, if the field is for a file.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/multipart_form_field_request_encoding.py b/src/merge/resources/filestorage/types/multipart_form_field_request_encoding.py
index c6513b6b..2b1db5ad 100644
--- a/src/merge/resources/filestorage/types/multipart_form_field_request_encoding.py
+++ b/src/merge/resources/filestorage/types/multipart_form_field_request_encoding.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .encoding_enum import EncodingEnum
MultipartFormFieldRequestEncoding = typing.Union[EncodingEnum, str]
diff --git a/src/merge/resources/filestorage/types/paginated_account_details_and_actions_list.py b/src/merge/resources/filestorage/types/paginated_account_details_and_actions_list.py
index 280100c4..a9128c76 100644
--- a/src/merge/resources/filestorage/types/paginated_account_details_and_actions_list.py
+++ b/src/merge/resources/filestorage/types/paginated_account_details_and_actions_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account_details_and_actions import AccountDetailsAndActions
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountDetailsAndActionsList(pydantic_v1.BaseModel):
+class PaginatedAccountDetailsAndActionsList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AccountDetailsAndActions]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/paginated_audit_log_event_list.py b/src/merge/resources/filestorage/types/paginated_audit_log_event_list.py
index 1d4154d2..a50b7c75 100644
--- a/src/merge/resources/filestorage/types/paginated_audit_log_event_list.py
+++ b/src/merge/resources/filestorage/types/paginated_audit_log_event_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .audit_log_event import AuditLogEvent
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAuditLogEventList(pydantic_v1.BaseModel):
+class PaginatedAuditLogEventList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AuditLogEvent]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/paginated_drive_list.py b/src/merge/resources/filestorage/types/paginated_drive_list.py
index 35f24d3c..345838c9 100644
--- a/src/merge/resources/filestorage/types/paginated_drive_list.py
+++ b/src/merge/resources/filestorage/types/paginated_drive_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .drive import Drive
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedDriveList(pydantic_v1.BaseModel):
+class PaginatedDriveList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Drive]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/paginated_file_list.py b/src/merge/resources/filestorage/types/paginated_file_list.py
index 641dcb53..7effa118 100644
--- a/src/merge/resources/filestorage/types/paginated_file_list.py
+++ b/src/merge/resources/filestorage/types/paginated_file_list.py
@@ -1,32 +1,28 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .folder import Folder
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .file import File
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedFileList(pydantic_v1.BaseModel):
+class PaginatedFileList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[File]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Folder, PaginatedFileList=PaginatedFileList)
diff --git a/src/merge/resources/filestorage/types/paginated_folder_list.py b/src/merge/resources/filestorage/types/paginated_folder_list.py
index d13120a6..3b239279 100644
--- a/src/merge/resources/filestorage/types/paginated_folder_list.py
+++ b/src/merge/resources/filestorage/types/paginated_folder_list.py
@@ -1,32 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .folder import Folder
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedFolderList(pydantic_v1.BaseModel):
+class PaginatedFolderList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Folder]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Folder, PaginatedFolderList=PaginatedFolderList)
diff --git a/src/merge/resources/filestorage/types/paginated_group_list.py b/src/merge/resources/filestorage/types/paginated_group_list.py
index 723ff3ca..72413a02 100644
--- a/src/merge/resources/filestorage/types/paginated_group_list.py
+++ b/src/merge/resources/filestorage/types/paginated_group_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .group import Group
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedGroupList(pydantic_v1.BaseModel):
+class PaginatedGroupList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Group]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/paginated_issue_list.py b/src/merge/resources/filestorage/types/paginated_issue_list.py
index 1016e29a..12b866d9 100644
--- a/src/merge/resources/filestorage/types/paginated_issue_list.py
+++ b/src/merge/resources/filestorage/types/paginated_issue_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue import Issue
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedIssueList(pydantic_v1.BaseModel):
+class PaginatedIssueList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Issue]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/paginated_sync_status_list.py b/src/merge/resources/filestorage/types/paginated_sync_status_list.py
index 6c88197e..f59f2c9a 100644
--- a/src/merge/resources/filestorage/types/paginated_sync_status_list.py
+++ b/src/merge/resources/filestorage/types/paginated_sync_status_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .sync_status import SyncStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedSyncStatusList(pydantic_v1.BaseModel):
+class PaginatedSyncStatusList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[SyncStatus]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/paginated_user_list.py b/src/merge/resources/filestorage/types/paginated_user_list.py
index 6faaf352..98e9b7e5 100644
--- a/src/merge/resources/filestorage/types/paginated_user_list.py
+++ b/src/merge/resources/filestorage/types/paginated_user_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .user import User
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedUserList(pydantic_v1.BaseModel):
+class PaginatedUserList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[User]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/permission.py b/src/merge/resources/filestorage/types/permission.py
index c300cee9..4c7596c6 100644
--- a/src/merge/resources/filestorage/types/permission.py
+++ b/src/merge/resources/filestorage/types/permission.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from .permission_user import PermissionUser
from .permission_group import PermissionGroup
-from .permission_roles_item import PermissionRolesItem
from .permission_type import PermissionType
-from .permission_user import PermissionUser
+from .permission_roles_item import PermissionRolesItem
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Permission(pydantic_v1.BaseModel):
+class Permission(UniversalBaseModel):
"""
# The Permission Object
@@ -25,32 +25,32 @@ class Permission(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- user: typing.Optional[PermissionUser] = pydantic_v1.Field()
+ user: typing.Optional[PermissionUser] = pydantic.Field()
"""
The user that is granted this permission.
"""
- group: typing.Optional[PermissionGroup] = pydantic_v1.Field()
+ group: typing.Optional[PermissionGroup] = pydantic.Field()
"""
The group that is granted this permission.
"""
- type: typing.Optional[PermissionType] = pydantic_v1.Field()
+ type: typing.Optional[PermissionType] = pydantic.Field()
"""
Denotes what type of people have access to the file.
@@ -60,25 +60,16 @@ class Permission(pydantic_v1.BaseModel):
- `ANYONE` - ANYONE
"""
- roles: typing.Optional[typing.List[typing.Optional[PermissionRolesItem]]] = pydantic_v1.Field()
+ roles: typing.Optional[typing.List[typing.Optional[PermissionRolesItem]]] = pydantic.Field()
"""
The permissions that the user or group has for the File or Folder. It is possible for a user or group to have multiple roles, such as viewing & uploading. Possible values include: `READ`, `WRITE`, `OWNER`. In cases where there is no clear mapping, the original value passed through will be returned.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/permission_group.py b/src/merge/resources/filestorage/types/permission_group.py
index db417995..57d87eed 100644
--- a/src/merge/resources/filestorage/types/permission_group.py
+++ b/src/merge/resources/filestorage/types/permission_group.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .group import Group
PermissionGroup = typing.Union[str, Group]
diff --git a/src/merge/resources/filestorage/types/permission_request.py b/src/merge/resources/filestorage/types/permission_request.py
index 1ecc55d7..acf54542 100644
--- a/src/merge/resources/filestorage/types/permission_request.py
+++ b/src/merge/resources/filestorage/types/permission_request.py
@@ -1,17 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+from .permission_request_user import PermissionRequestUser
from .permission_request_group import PermissionRequestGroup
-from .permission_request_roles_item import PermissionRequestRolesItem
from .permission_request_type import PermissionRequestType
-from .permission_request_user import PermissionRequestUser
+from .permission_request_roles_item import PermissionRequestRolesItem
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PermissionRequest(pydantic_v1.BaseModel):
+class PermissionRequest(UniversalBaseModel):
"""
# The Permission Object
@@ -24,22 +23,22 @@ class PermissionRequest(pydantic_v1.BaseModel):
Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details.
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- user: typing.Optional[PermissionRequestUser] = pydantic_v1.Field()
+ user: typing.Optional[PermissionRequestUser] = pydantic.Field()
"""
The user that is granted this permission.
"""
- group: typing.Optional[PermissionRequestGroup] = pydantic_v1.Field()
+ group: typing.Optional[PermissionRequestGroup] = pydantic.Field()
"""
The group that is granted this permission.
"""
- type: typing.Optional[PermissionRequestType] = pydantic_v1.Field()
+ type: typing.Optional[PermissionRequestType] = pydantic.Field()
"""
Denotes what type of people have access to the file.
@@ -49,28 +48,19 @@ class PermissionRequest(pydantic_v1.BaseModel):
- `ANYONE` - ANYONE
"""
- roles: typing.Optional[typing.List[typing.Optional[PermissionRequestRolesItem]]] = pydantic_v1.Field()
+ roles: typing.Optional[typing.List[typing.Optional[PermissionRequestRolesItem]]] = pydantic.Field()
"""
The permissions that the user or group has for the File or Folder. It is possible for a user or group to have multiple roles, such as viewing & uploading. Possible values include: `READ`, `WRITE`, `OWNER`. In cases where there is no clear mapping, the original value passed through will be returned.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/permission_request_group.py b/src/merge/resources/filestorage/types/permission_request_group.py
index a0329fb0..abf16f38 100644
--- a/src/merge/resources/filestorage/types/permission_request_group.py
+++ b/src/merge/resources/filestorage/types/permission_request_group.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .group import Group
PermissionRequestGroup = typing.Union[str, Group]
diff --git a/src/merge/resources/filestorage/types/permission_request_roles_item.py b/src/merge/resources/filestorage/types/permission_request_roles_item.py
index f0dc73f1..219fb094 100644
--- a/src/merge/resources/filestorage/types/permission_request_roles_item.py
+++ b/src/merge/resources/filestorage/types/permission_request_roles_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .roles_enum import RolesEnum
PermissionRequestRolesItem = typing.Union[RolesEnum, str]
diff --git a/src/merge/resources/filestorage/types/permission_request_type.py b/src/merge/resources/filestorage/types/permission_request_type.py
index 46771561..9d4577fa 100644
--- a/src/merge/resources/filestorage/types/permission_request_type.py
+++ b/src/merge/resources/filestorage/types/permission_request_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .type_enum import TypeEnum
PermissionRequestType = typing.Union[TypeEnum, str]
diff --git a/src/merge/resources/filestorage/types/permission_request_user.py b/src/merge/resources/filestorage/types/permission_request_user.py
index a9c6630c..b26c128a 100644
--- a/src/merge/resources/filestorage/types/permission_request_user.py
+++ b/src/merge/resources/filestorage/types/permission_request_user.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
PermissionRequestUser = typing.Union[str, User]
diff --git a/src/merge/resources/filestorage/types/permission_roles_item.py b/src/merge/resources/filestorage/types/permission_roles_item.py
index dcbeb14c..423445a0 100644
--- a/src/merge/resources/filestorage/types/permission_roles_item.py
+++ b/src/merge/resources/filestorage/types/permission_roles_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .roles_enum import RolesEnum
PermissionRolesItem = typing.Union[RolesEnum, str]
diff --git a/src/merge/resources/filestorage/types/permission_type.py b/src/merge/resources/filestorage/types/permission_type.py
index 1e5b3613..4038b192 100644
--- a/src/merge/resources/filestorage/types/permission_type.py
+++ b/src/merge/resources/filestorage/types/permission_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .type_enum import TypeEnum
PermissionType = typing.Union[TypeEnum, str]
diff --git a/src/merge/resources/filestorage/types/permission_user.py b/src/merge/resources/filestorage/types/permission_user.py
index 85fec9a9..291ef8d8 100644
--- a/src/merge/resources/filestorage/types/permission_user.py
+++ b/src/merge/resources/filestorage/types/permission_user.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
PermissionUser = typing.Union[str, User]
diff --git a/src/merge/resources/filestorage/types/remote_endpoint_info.py b/src/merge/resources/filestorage/types/remote_endpoint_info.py
index da6037bc..454688d0 100644
--- a/src/merge/resources/filestorage/types/remote_endpoint_info.py
+++ b/src/merge/resources/filestorage/types/remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteEndpointInfo(pydantic_v1.BaseModel):
+class RemoteEndpointInfo(UniversalBaseModel):
method: str
url_path: str
- field_traversal_path: typing.List[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_traversal_path: typing.List[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/remote_field_api.py b/src/merge/resources/filestorage/types/remote_field_api.py
index ffa9299c..18f2421d 100644
--- a/src/merge/resources/filestorage/types/remote_field_api.py
+++ b/src/merge/resources/filestorage/types/remote_field_api.py
@@ -1,39 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .advanced_metadata import AdvancedMetadata
+import pydantic
from .remote_endpoint_info import RemoteEndpointInfo
+from .advanced_metadata import AdvancedMetadata
from .remote_field_api_coverage import RemoteFieldApiCoverage
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteFieldApi(pydantic_v1.BaseModel):
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+class RemoteFieldApi(UniversalBaseModel):
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_key_name: str
remote_endpoint_info: RemoteEndpointInfo
- example_values: typing.Optional[typing.List[typing.Any]]
+ example_values: typing.Optional[typing.List[typing.Optional[typing.Any]]]
advanced_metadata: typing.Optional[AdvancedMetadata]
coverage: typing.Optional[RemoteFieldApiCoverage]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/remote_field_api_response.py b/src/merge/resources/filestorage/types/remote_field_api_response.py
index 4dca3199..82889f90 100644
--- a/src/merge/resources/filestorage/types/remote_field_api_response.py
+++ b/src/merge/resources/filestorage/types/remote_field_api_response.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_field_api import RemoteFieldApi
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteFieldApiResponse(pydantic_v1.BaseModel):
- file: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="File")
- folder: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Folder")
- drive: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Drive")
- group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Group")
- user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="User")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+class RemoteFieldApiResponse(UniversalBaseModel):
+ file: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="File")
+ folder: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Folder")
+ drive: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Drive")
+ group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Group")
+ user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="User")
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/remote_key.py b/src/merge/resources/filestorage/types/remote_key.py
index e0bec368..7a61c212 100644
--- a/src/merge/resources/filestorage/types/remote_key.py
+++ b/src/merge/resources/filestorage/types/remote_key.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteKey(pydantic_v1.BaseModel):
+class RemoteKey(UniversalBaseModel):
"""
# The RemoteKey Object
@@ -23,20 +22,11 @@ class RemoteKey(pydantic_v1.BaseModel):
name: str
key: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/remote_response.py b/src/merge/resources/filestorage/types/remote_response.py
index f39951ee..e2d1620d 100644
--- a/src/merge/resources/filestorage/types/remote_response.py
+++ b/src/merge/resources/filestorage/types/remote_response.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .response_type_enum import ResponseTypeEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteResponse(pydantic_v1.BaseModel):
+class RemoteResponse(UniversalBaseModel):
"""
# The RemoteResponse Object
@@ -24,25 +23,16 @@ class RemoteResponse(pydantic_v1.BaseModel):
method: str
path: str
status: int
- response: typing.Any
- response_headers: typing.Optional[typing.Dict[str, typing.Any]]
+ response: typing.Optional[typing.Any]
+ response_headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
response_type: typing.Optional[ResponseTypeEnum]
- headers: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/request_format_enum.py b/src/merge/resources/filestorage/types/request_format_enum.py
index bf445b71..dc284f25 100644
--- a/src/merge/resources/filestorage/types/request_format_enum.py
+++ b/src/merge/resources/filestorage/types/request_format_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RequestFormatEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `XML` - XML
- - `MULTIPART` - MULTIPART
- """
-
- JSON = "JSON"
- XML = "XML"
- MULTIPART = "MULTIPART"
-
- def visit(
- self,
- json: typing.Callable[[], T_Result],
- xml: typing.Callable[[], T_Result],
- multipart: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RequestFormatEnum.JSON:
- return json()
- if self is RequestFormatEnum.XML:
- return xml()
- if self is RequestFormatEnum.MULTIPART:
- return multipart()
+RequestFormatEnum = typing.Union[typing.Literal["JSON", "XML", "MULTIPART"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/response_type_enum.py b/src/merge/resources/filestorage/types/response_type_enum.py
index 4b44d47d..7e4d5d30 100644
--- a/src/merge/resources/filestorage/types/response_type_enum.py
+++ b/src/merge/resources/filestorage/types/response_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ResponseTypeEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `BASE64_GZIP` - BASE64_GZIP
- """
-
- JSON = "JSON"
- BASE_64_GZIP = "BASE64_GZIP"
-
- def visit(self, json: typing.Callable[[], T_Result], base_64_gzip: typing.Callable[[], T_Result]) -> T_Result:
- if self is ResponseTypeEnum.JSON:
- return json()
- if self is ResponseTypeEnum.BASE_64_GZIP:
- return base_64_gzip()
+ResponseTypeEnum = typing.Union[typing.Literal["JSON", "BASE64_GZIP"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/role_enum.py b/src/merge/resources/filestorage/types/role_enum.py
index 05e09112..65066251 100644
--- a/src/merge/resources/filestorage/types/role_enum.py
+++ b/src/merge/resources/filestorage/types/role_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RoleEnum(str, enum.Enum):
- """
- - `ADMIN` - ADMIN
- - `DEVELOPER` - DEVELOPER
- - `MEMBER` - MEMBER
- - `API` - API
- - `SYSTEM` - SYSTEM
- - `MERGE_TEAM` - MERGE_TEAM
- """
-
- ADMIN = "ADMIN"
- DEVELOPER = "DEVELOPER"
- MEMBER = "MEMBER"
- API = "API"
- SYSTEM = "SYSTEM"
- MERGE_TEAM = "MERGE_TEAM"
-
- def visit(
- self,
- admin: typing.Callable[[], T_Result],
- developer: typing.Callable[[], T_Result],
- member: typing.Callable[[], T_Result],
- api: typing.Callable[[], T_Result],
- system: typing.Callable[[], T_Result],
- merge_team: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RoleEnum.ADMIN:
- return admin()
- if self is RoleEnum.DEVELOPER:
- return developer()
- if self is RoleEnum.MEMBER:
- return member()
- if self is RoleEnum.API:
- return api()
- if self is RoleEnum.SYSTEM:
- return system()
- if self is RoleEnum.MERGE_TEAM:
- return merge_team()
+RoleEnum = typing.Union[typing.Literal["ADMIN", "DEVELOPER", "MEMBER", "API", "SYSTEM", "MERGE_TEAM"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/roles_enum.py b/src/merge/resources/filestorage/types/roles_enum.py
index 737dafd7..0b92ff0a 100644
--- a/src/merge/resources/filestorage/types/roles_enum.py
+++ b/src/merge/resources/filestorage/types/roles_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RolesEnum(str, enum.Enum):
- """
- - `READ` - READ
- - `WRITE` - WRITE
- - `OWNER` - OWNER
- """
-
- READ = "READ"
- WRITE = "WRITE"
- OWNER = "OWNER"
-
- def visit(
- self,
- read: typing.Callable[[], T_Result],
- write: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RolesEnum.READ:
- return read()
- if self is RolesEnum.WRITE:
- return write()
- if self is RolesEnum.OWNER:
- return owner()
+RolesEnum = typing.Union[typing.Literal["READ", "WRITE", "OWNER"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/selective_sync_configurations_usage_enum.py b/src/merge/resources/filestorage/types/selective_sync_configurations_usage_enum.py
index 4de6df94..baa6f2bd 100644
--- a/src/merge/resources/filestorage/types/selective_sync_configurations_usage_enum.py
+++ b/src/merge/resources/filestorage/types/selective_sync_configurations_usage_enum.py
@@ -1,24 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SelectiveSyncConfigurationsUsageEnum(str, enum.Enum):
- """
- - `IN_NEXT_SYNC` - IN_NEXT_SYNC
- - `IN_LAST_SYNC` - IN_LAST_SYNC
- """
-
- IN_NEXT_SYNC = "IN_NEXT_SYNC"
- IN_LAST_SYNC = "IN_LAST_SYNC"
-
- def visit(
- self, in_next_sync: typing.Callable[[], T_Result], in_last_sync: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is SelectiveSyncConfigurationsUsageEnum.IN_NEXT_SYNC:
- return in_next_sync()
- if self is SelectiveSyncConfigurationsUsageEnum.IN_LAST_SYNC:
- return in_last_sync()
+SelectiveSyncConfigurationsUsageEnum = typing.Union[typing.Literal["IN_NEXT_SYNC", "IN_LAST_SYNC"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/sync_status.py b/src/merge/resources/filestorage/types/sync_status.py
index c6b7cbc4..f9a62229 100644
--- a/src/merge/resources/filestorage/types/sync_status.py
+++ b/src/merge/resources/filestorage/types/sync_status.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+import datetime as dt
from .sync_status_status_enum import SyncStatusStatusEnum
+from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class SyncStatus(pydantic_v1.BaseModel):
+class SyncStatus(UniversalBaseModel):
"""
# The SyncStatus Object
@@ -30,20 +30,11 @@ class SyncStatus(pydantic_v1.BaseModel):
is_initial_sync: bool
selective_sync_configurations_usage: typing.Optional[SelectiveSyncConfigurationsUsageEnum]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/sync_status_status_enum.py b/src/merge/resources/filestorage/types/sync_status_status_enum.py
index e21e3285..92814990 100644
--- a/src/merge/resources/filestorage/types/sync_status_status_enum.py
+++ b/src/merge/resources/filestorage/types/sync_status_status_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SyncStatusStatusEnum(str, enum.Enum):
- """
- - `SYNCING` - SYNCING
- - `DONE` - DONE
- - `FAILED` - FAILED
- - `DISABLED` - DISABLED
- - `PAUSED` - PAUSED
- - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED
- """
-
- SYNCING = "SYNCING"
- DONE = "DONE"
- FAILED = "FAILED"
- DISABLED = "DISABLED"
- PAUSED = "PAUSED"
- PARTIALLY_SYNCED = "PARTIALLY_SYNCED"
-
- def visit(
- self,
- syncing: typing.Callable[[], T_Result],
- done: typing.Callable[[], T_Result],
- failed: typing.Callable[[], T_Result],
- disabled: typing.Callable[[], T_Result],
- paused: typing.Callable[[], T_Result],
- partially_synced: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SyncStatusStatusEnum.SYNCING:
- return syncing()
- if self is SyncStatusStatusEnum.DONE:
- return done()
- if self is SyncStatusStatusEnum.FAILED:
- return failed()
- if self is SyncStatusStatusEnum.DISABLED:
- return disabled()
- if self is SyncStatusStatusEnum.PAUSED:
- return paused()
- if self is SyncStatusStatusEnum.PARTIALLY_SYNCED:
- return partially_synced()
+SyncStatusStatusEnum = typing.Union[
+ typing.Literal["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"], typing.Any
+]
diff --git a/src/merge/resources/filestorage/types/type_enum.py b/src/merge/resources/filestorage/types/type_enum.py
index d626c7c6..48ef14a2 100644
--- a/src/merge/resources/filestorage/types/type_enum.py
+++ b/src/merge/resources/filestorage/types/type_enum.py
@@ -1,36 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TypeEnum(str, enum.Enum):
- """
- - `USER` - USER
- - `GROUP` - GROUP
- - `COMPANY` - COMPANY
- - `ANYONE` - ANYONE
- """
-
- USER = "USER"
- GROUP = "GROUP"
- COMPANY = "COMPANY"
- ANYONE = "ANYONE"
-
- def visit(
- self,
- user: typing.Callable[[], T_Result],
- group: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- anyone: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TypeEnum.USER:
- return user()
- if self is TypeEnum.GROUP:
- return group()
- if self is TypeEnum.COMPANY:
- return company()
- if self is TypeEnum.ANYONE:
- return anyone()
+TypeEnum = typing.Union[typing.Literal["USER", "GROUP", "COMPANY", "ANYONE"], typing.Any]
diff --git a/src/merge/resources/filestorage/types/user.py b/src/merge/resources/filestorage/types/user.py
index 792f60ee..3e76efa6 100644
--- a/src/merge/resources/filestorage/types/user.py
+++ b/src/merge/resources/filestorage/types/user.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class User(pydantic_v1.BaseModel):
+class User(UniversalBaseModel):
"""
# The User Object
@@ -21,58 +21,49 @@ class User(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The user's name.
"""
- email_address: typing.Optional[str] = pydantic_v1.Field()
+ email_address: typing.Optional[str] = pydantic.Field()
"""
The user's email address. This is typically used to identify a user across linked accounts.
"""
- is_me: typing.Optional[bool] = pydantic_v1.Field()
+ is_me: typing.Optional[bool] = pydantic.Field()
"""
Whether the user is the one who linked this account.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/validation_problem_source.py b/src/merge/resources/filestorage/types/validation_problem_source.py
index fde15b40..d9a4a8fe 100644
--- a/src/merge/resources/filestorage/types/validation_problem_source.py
+++ b/src/merge/resources/filestorage/types/validation_problem_source.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ValidationProblemSource(pydantic_v1.BaseModel):
+class ValidationProblemSource(UniversalBaseModel):
pointer: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/warning_validation_problem.py b/src/merge/resources/filestorage/types/warning_validation_problem.py
index 6baf9600..d508bb6d 100644
--- a/src/merge/resources/filestorage/types/warning_validation_problem.py
+++ b/src/merge/resources/filestorage/types/warning_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class WarningValidationProblem(pydantic_v1.BaseModel):
+class WarningValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/filestorage/types/webhook_receiver.py b/src/merge/resources/filestorage/types/webhook_receiver.py
index 0544f256..e8cd17aa 100644
--- a/src/merge/resources/filestorage/types/webhook_receiver.py
+++ b/src/merge/resources/filestorage/types/webhook_receiver.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class WebhookReceiver(pydantic_v1.BaseModel):
+class WebhookReceiver(UniversalBaseModel):
event: str
is_active: bool
key: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/client.py b/src/merge/resources/hris/client.py
index d74965f8..142019b3 100644
--- a/src/merge/resources/hris/client.py
+++ b/src/merge/resources/hris/client.py
@@ -1,45 +1,77 @@
# This file was auto-generated by Fern from our API Definition.
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .resources.account_details.client import AccountDetailsClient, AsyncAccountDetailsClient
-from .resources.account_token.client import AccountTokenClient, AsyncAccountTokenClient
-from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from ...core.client_wrapper import SyncClientWrapper
+from .resources.account_details.client import AccountDetailsClient
+from .resources.account_token.client import AccountTokenClient
from .resources.async_passthrough.client import (
AsyncPassthroughClient as resources_hris_resources_async_passthrough_client_AsyncPassthroughClient,
)
-from .resources.audit_trail.client import AsyncAuditTrailClient, AuditTrailClient
-from .resources.available_actions.client import AsyncAvailableActionsClient, AvailableActionsClient
-from .resources.bank_info.client import AsyncBankInfoClient, BankInfoClient
-from .resources.benefits.client import AsyncBenefitsClient, BenefitsClient
-from .resources.companies.client import AsyncCompaniesClient, CompaniesClient
-from .resources.delete_account.client import AsyncDeleteAccountClient, DeleteAccountClient
-from .resources.dependents.client import AsyncDependentsClient, DependentsClient
-from .resources.employee_payroll_runs.client import AsyncEmployeePayrollRunsClient, EmployeePayrollRunsClient
-from .resources.employees.client import AsyncEmployeesClient, EmployeesClient
-from .resources.employer_benefits.client import AsyncEmployerBenefitsClient, EmployerBenefitsClient
-from .resources.employments.client import AsyncEmploymentsClient, EmploymentsClient
-from .resources.field_mapping.client import AsyncFieldMappingClient, FieldMappingClient
-from .resources.force_resync.client import AsyncForceResyncClient, ForceResyncClient
-from .resources.generate_key.client import AsyncGenerateKeyClient, GenerateKeyClient
-from .resources.groups.client import AsyncGroupsClient, GroupsClient
-from .resources.issues.client import AsyncIssuesClient, IssuesClient
-from .resources.link_token.client import AsyncLinkTokenClient, LinkTokenClient
-from .resources.linked_accounts.client import AsyncLinkedAccountsClient, LinkedAccountsClient
-from .resources.locations.client import AsyncLocationsClient, LocationsClient
+from .resources.audit_trail.client import AuditTrailClient
+from .resources.available_actions.client import AvailableActionsClient
+from .resources.bank_info.client import BankInfoClient
+from .resources.benefits.client import BenefitsClient
+from .resources.companies.client import CompaniesClient
+from .resources.scopes.client import ScopesClient
+from .resources.delete_account.client import DeleteAccountClient
+from .resources.dependents.client import DependentsClient
+from .resources.employee_payroll_runs.client import EmployeePayrollRunsClient
+from .resources.employees.client import EmployeesClient
+from .resources.employer_benefits.client import EmployerBenefitsClient
+from .resources.employments.client import EmploymentsClient
+from .resources.field_mapping.client import FieldMappingClient
+from .resources.generate_key.client import GenerateKeyClient
+from .resources.groups.client import GroupsClient
+from .resources.issues.client import IssuesClient
+from .resources.link_token.client import LinkTokenClient
+from .resources.linked_accounts.client import LinkedAccountsClient
+from .resources.locations.client import LocationsClient
+from .resources.passthrough.client import PassthroughClient
+from .resources.pay_groups.client import PayGroupsClient
+from .resources.payroll_runs.client import PayrollRunsClient
+from .resources.regenerate_key.client import RegenerateKeyClient
+from .resources.sync_status.client import SyncStatusClient
+from .resources.force_resync.client import ForceResyncClient
+from .resources.teams.client import TeamsClient
+from .resources.time_off.client import TimeOffClient
+from .resources.time_off_balances.client import TimeOffBalancesClient
+from .resources.timesheet_entries.client import TimesheetEntriesClient
+from .resources.webhook_receivers.client import WebhookReceiversClient
+from ...core.client_wrapper import AsyncClientWrapper
+from .resources.account_details.client import AsyncAccountDetailsClient
+from .resources.account_token.client import AsyncAccountTokenClient
+from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from .resources.audit_trail.client import AsyncAuditTrailClient
+from .resources.available_actions.client import AsyncAvailableActionsClient
+from .resources.bank_info.client import AsyncBankInfoClient
+from .resources.benefits.client import AsyncBenefitsClient
+from .resources.companies.client import AsyncCompaniesClient
+from .resources.scopes.client import AsyncScopesClient
+from .resources.delete_account.client import AsyncDeleteAccountClient
+from .resources.dependents.client import AsyncDependentsClient
+from .resources.employee_payroll_runs.client import AsyncEmployeePayrollRunsClient
+from .resources.employees.client import AsyncEmployeesClient
+from .resources.employer_benefits.client import AsyncEmployerBenefitsClient
+from .resources.employments.client import AsyncEmploymentsClient
+from .resources.field_mapping.client import AsyncFieldMappingClient
+from .resources.generate_key.client import AsyncGenerateKeyClient
+from .resources.groups.client import AsyncGroupsClient
+from .resources.issues.client import AsyncIssuesClient
+from .resources.link_token.client import AsyncLinkTokenClient
+from .resources.linked_accounts.client import AsyncLinkedAccountsClient
+from .resources.locations.client import AsyncLocationsClient
from .resources.passthrough.client import (
AsyncPassthroughClient as resources_hris_resources_passthrough_client_AsyncPassthroughClient,
)
-from .resources.passthrough.client import PassthroughClient
-from .resources.pay_groups.client import AsyncPayGroupsClient, PayGroupsClient
-from .resources.payroll_runs.client import AsyncPayrollRunsClient, PayrollRunsClient
-from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient
-from .resources.scopes.client import AsyncScopesClient, ScopesClient
-from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient
-from .resources.teams.client import AsyncTeamsClient, TeamsClient
-from .resources.time_off.client import AsyncTimeOffClient, TimeOffClient
-from .resources.time_off_balances.client import AsyncTimeOffBalancesClient, TimeOffBalancesClient
-from .resources.timesheet_entries.client import AsyncTimesheetEntriesClient, TimesheetEntriesClient
-from .resources.webhook_receivers.client import AsyncWebhookReceiversClient, WebhookReceiversClient
+from .resources.pay_groups.client import AsyncPayGroupsClient
+from .resources.payroll_runs.client import AsyncPayrollRunsClient
+from .resources.regenerate_key.client import AsyncRegenerateKeyClient
+from .resources.sync_status.client import AsyncSyncStatusClient
+from .resources.force_resync.client import AsyncForceResyncClient
+from .resources.teams.client import AsyncTeamsClient
+from .resources.time_off.client import AsyncTimeOffClient
+from .resources.time_off_balances.client import AsyncTimeOffBalancesClient
+from .resources.timesheet_entries.client import AsyncTimesheetEntriesClient
+from .resources.webhook_receivers.client import AsyncWebhookReceiversClient
class HrisClient:
diff --git a/src/merge/resources/hris/resources/account_details/client.py b/src/merge/resources/hris/resources/account_details/client.py
index 8e78ada2..cf25ae50 100644
--- a/src/merge/resources/hris/resources/account_details/client.py
+++ b/src/merge/resources/hris/resources/account_details/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_details import AccountDetails
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountDetailsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.hris.account_details.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/account-details", method="GET", request_options=request_options
+ "hris/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.account_details.retrieve()
+
+
+ async def main() -> None:
+ await client.hris.account_details.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/account-details", method="GET", request_options=request_options
+ "hris/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/account_token/client.py b/src/merge/resources/hris/resources/account_token/client.py
index f7f56a5c..3c0372fb 100644
--- a/src/merge/resources/hris/resources/account_token/client.py
+++ b/src/merge/resources/hris/resources/account_token/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_token import AccountToken
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountTokenClient:
@@ -33,7 +33,7 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -44,11 +44,19 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"hris/v1/account-token/{jsonable_encoder(public_token)}", method="GET", request_options=request_options
+ f"hris/v1/account-token/{jsonable_encoder(public_token)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -79,22 +87,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.account_token.retrieve(
- public_token="public_token",
- )
+
+
+ async def main() -> None:
+ await client.hris.account_token.retrieve(
+ public_token="public_token",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"hris/v1/account-token/{jsonable_encoder(public_token)}", method="GET", request_options=request_options
+ f"hris/v1/account-token/{jsonable_encoder(public_token)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/async_passthrough/client.py b/src/merge/resources/hris/resources/async_passthrough/client.py
index 98a3f0d5..7b5dcb4b 100644
--- a/src/merge/resources/hris/resources/async_passthrough/client.py
+++ b/src/merge/resources/hris/resources/async_passthrough/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+from ...types.data_passthrough_request import DataPassthroughRequest
from .....core.request_options import RequestOptions
from ...types.async_passthrough_reciept import AsyncPassthroughReciept
-from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.remote_response import RemoteResponse
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -40,8 +40,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.hris import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.hris import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,17 +49,27 @@ def create(
)
client.hris.async_passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "hris/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,7 +95,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -100,9 +110,15 @@ def retrieve(
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,26 +149,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.hris import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.hris import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.async_passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.hris.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "hris/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -178,24 +212,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.async_passthrough.retrieve(
- async_passthrough_receipt_id="async_passthrough_receipt_id",
- )
+
+
+ async def main() -> None:
+ await client.hris.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/async-passthrough/{jsonable_encoder(async_passthrough_receipt_id)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/audit_trail/client.py b/src/merge/resources/hris/resources/audit_trail/client.py
index 9f37cbab..aa4c06eb 100644
--- a/src/merge/resources/hris/resources/audit_trail/client.py
+++ b/src/merge/resources/hris/resources/audit_trail/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AuditTrailClient:
@@ -23,7 +23,7 @@ def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -58,7 +58,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -79,9 +79,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -101,7 +107,7 @@ async def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -136,13 +142,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.audit_trail.list()
+
+
+ async def main() -> None:
+ await client.hris.audit_trail.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/audit-trail",
@@ -157,9 +171,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/available_actions/client.py b/src/merge/resources/hris/resources/available_actions/client.py
index 63ebbc7c..645d3eee 100644
--- a/src/merge/resources/hris/resources/available_actions/client.py
+++ b/src/merge/resources/hris/resources/available_actions/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.available_actions import AvailableActions
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AvailableActionsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.hris.available_actions.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/available-actions", method="GET", request_options=request_options
+ "hris/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.available_actions.retrieve()
+
+
+ async def main() -> None:
+ await client.hris.available_actions.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/available-actions", method="GET", request_options=request_options
+ "hris/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/bank_info/client.py b/src/merge/resources/hris/resources/bank_info/client.py
index 242728a3..abef0df4 100644
--- a/src/merge/resources/hris/resources/bank_info/client.py
+++ b/src/merge/resources/hris/resources/bank_info/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+from .types.bank_info_list_request_account_type import BankInfoListRequestAccountType
+import datetime as dt
+from .types.bank_info_list_request_order_by import BankInfoListRequestOrderBy
+from .....core.request_options import RequestOptions
+from ...types.paginated_bank_info_list import PaginatedBankInfoList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.bank_info import BankInfo
-from ...types.paginated_bank_info_list import PaginatedBankInfoList
-from .types.bank_info_list_request_account_type import BankInfoListRequestAccountType
-from .types.bank_info_list_request_order_by import BankInfoListRequestOrderBy
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class BankInfoClient:
@@ -107,7 +107,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -138,9 +138,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedBankInfoList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedBankInfoList,
+ parse_obj_as(
+ type_=PaginatedBankInfoList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -185,7 +191,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -206,9 +212,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(BankInfo, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ BankInfo,
+ parse_obj_as(
+ type_=BankInfo, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -306,13 +318,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.bank_info.list()
+
+
+ async def main() -> None:
+ await client.hris.bank_info.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/bank-info",
@@ -337,9 +357,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedBankInfoList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedBankInfoList,
+ parse_obj_as(
+ type_=PaginatedBankInfoList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -384,15 +410,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.bank_info.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.bank_info.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/bank-info/{jsonable_encoder(id)}",
@@ -405,9 +439,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(BankInfo, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ BankInfo,
+ parse_obj_as(
+ type_=BankInfo, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/bank_info/types/bank_info_list_request_account_type.py b/src/merge/resources/hris/resources/bank_info/types/bank_info_list_request_account_type.py
index 91cd2c65..14bb3b86 100644
--- a/src/merge/resources/hris/resources/bank_info/types/bank_info_list_request_account_type.py
+++ b/src/merge/resources/hris/resources/bank_info/types/bank_info_list_request_account_type.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class BankInfoListRequestAccountType(str, enum.Enum):
- CHECKING = "CHECKING"
- SAVINGS = "SAVINGS"
-
- def visit(self, checking: typing.Callable[[], T_Result], savings: typing.Callable[[], T_Result]) -> T_Result:
- if self is BankInfoListRequestAccountType.CHECKING:
- return checking()
- if self is BankInfoListRequestAccountType.SAVINGS:
- return savings()
+BankInfoListRequestAccountType = typing.Union[typing.Literal["CHECKING", "SAVINGS"], typing.Any]
diff --git a/src/merge/resources/hris/resources/bank_info/types/bank_info_list_request_order_by.py b/src/merge/resources/hris/resources/bank_info/types/bank_info_list_request_order_by.py
index 69c7361f..bb5aefbe 100644
--- a/src/merge/resources/hris/resources/bank_info/types/bank_info_list_request_order_by.py
+++ b/src/merge/resources/hris/resources/bank_info/types/bank_info_list_request_order_by.py
@@ -1,21 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class BankInfoListRequestOrderBy(str, enum.Enum):
- REMOTE_CREATED_AT_DESCENDING = "-remote_created_at"
- REMOTE_CREATED_AT_ASCENDING = "remote_created_at"
-
- def visit(
- self,
- remote_created_at_descending: typing.Callable[[], T_Result],
- remote_created_at_ascending: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is BankInfoListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING:
- return remote_created_at_descending()
- if self is BankInfoListRequestOrderBy.REMOTE_CREATED_AT_ASCENDING:
- return remote_created_at_ascending()
+BankInfoListRequestOrderBy = typing.Union[typing.Literal["-remote_created_at", "remote_created_at"], typing.Any]
diff --git a/src/merge/resources/hris/resources/benefits/client.py b/src/merge/resources/hris/resources/benefits/client.py
index 64a9292a..d97d8189 100644
--- a/src/merge/resources/hris/resources/benefits/client.py
+++ b/src/merge/resources/hris/resources/benefits/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_benefit_list import PaginatedBenefitList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.benefit import Benefit
-from ...types.paginated_benefit_list import PaginatedBenefitList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class BenefitsClient:
@@ -82,7 +82,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -108,9 +108,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedBenefitList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedBenefitList,
+ parse_obj_as(
+ type_=PaginatedBenefitList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -147,7 +153,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,12 +166,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/benefits/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Benefit, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Benefit,
+ parse_obj_as(
+ type_=Benefit, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -240,13 +255,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.benefits.list()
+
+
+ async def main() -> None:
+ await client.hris.benefits.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/benefits",
@@ -266,9 +289,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedBenefitList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedBenefitList,
+ parse_obj_as(
+ type_=PaginatedBenefitList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,25 +334,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.benefits.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.benefits.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/benefits/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Benefit, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Benefit,
+ parse_obj_as(
+ type_=Benefit, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/companies/client.py b/src/merge/resources/hris/resources/companies/client.py
index 60d6334d..d1e47514 100644
--- a/src/merge/resources/hris/resources/companies/client.py
+++ b/src/merge/resources/hris/resources/companies/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_company_list import PaginatedCompanyList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.company import Company
-from ...types.paginated_company_list import PaginatedCompanyList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class CompaniesClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCompanyList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCompanyList,
+ parse_obj_as(
+ type_=PaginatedCompanyList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/companies/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Company, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Company,
+ parse_obj_as(
+ type_=Company, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.companies.list()
+
+
+ async def main() -> None:
+ await client.hris.companies.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/companies",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCompanyList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCompanyList,
+ parse_obj_as(
+ type_=PaginatedCompanyList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.companies.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.companies.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/companies/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Company, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Company,
+ parse_obj_as(
+ type_=Company, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/delete_account/client.py b/src/merge/resources/hris/resources/delete_account/client.py
index 7271b543..ac0822b8 100644
--- a/src/merge/resources/hris/resources/delete_account/client.py
+++ b/src/merge/resources/hris/resources/delete_account/client.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
+from .....core.request_options import RequestOptions
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import AsyncClientWrapper
class DeleteAccountClient:
@@ -27,7 +27,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -36,11 +36,13 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
client.hris.delete_account.delete()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/delete-account", method="POST", request_options=request_options
+ "hris/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -66,20 +68,30 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.delete_account.delete()
+
+
+ async def main() -> None:
+ await client.hris.delete_account.delete()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/delete-account", method="POST", request_options=request_options
+ "hris/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/dependents/client.py b/src/merge/resources/hris/resources/dependents/client.py
index 9ef72e61..627c55b5 100644
--- a/src/merge/resources/hris/resources/dependents/client.py
+++ b/src/merge/resources/hris/resources/dependents/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_dependent_list import PaginatedDependentList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.dependent import Dependent
-from ...types.paginated_dependent_list import PaginatedDependentList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class DependentsClient:
@@ -78,7 +78,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -103,9 +103,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedDependentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedDependentList,
+ parse_obj_as(
+ type_=PaginatedDependentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -142,7 +148,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -155,12 +161,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/dependents/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_sensitive_fields": include_sensitive_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_sensitive_fields": include_sensitive_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Dependent, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Dependent,
+ parse_obj_as(
+ type_=Dependent, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -231,13 +246,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.dependents.list()
+
+
+ async def main() -> None:
+ await client.hris.dependents.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/dependents",
@@ -256,9 +279,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedDependentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedDependentList,
+ parse_obj_as(
+ type_=PaginatedDependentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -295,25 +324,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.dependents.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.dependents.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/dependents/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data, "include_sensitive_fields": include_sensitive_fields},
+ params={
+ "include_remote_data": include_remote_data,
+ "include_sensitive_fields": include_sensitive_fields,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Dependent, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Dependent,
+ parse_obj_as(
+ type_=Dependent, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/employee_payroll_runs/client.py b/src/merge/resources/hris/resources/employee_payroll_runs/client.py
index 5d06d544..d5086fae 100644
--- a/src/merge/resources/hris/resources/employee_payroll_runs/client.py
+++ b/src/merge/resources/hris/resources/employee_payroll_runs/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.employee_payroll_runs_list_request_expand import EmployeePayrollRunsListRequestExpand
from .....core.request_options import RequestOptions
-from ...types.employee_payroll_run import EmployeePayrollRun
from ...types.paginated_employee_payroll_run_list import PaginatedEmployeePayrollRunList
-from .types.employee_payroll_runs_list_request_expand import EmployeePayrollRunsListRequestExpand
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.employee_payroll_runs_retrieve_request_expand import EmployeePayrollRunsRetrieveRequestExpand
+from ...types.employee_payroll_run import EmployeePayrollRun
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class EmployeePayrollRunsClient:
@@ -104,7 +104,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -135,9 +135,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEmployeePayrollRunList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEmployeePayrollRunList,
+ parse_obj_as(
+ type_=PaginatedEmployeePayrollRunList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -174,7 +180,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -187,12 +193,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/employee-payroll-runs/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EmployeePayrollRun, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EmployeePayrollRun,
+ parse_obj_as(
+ type_=EmployeePayrollRun, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -287,13 +302,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employee_payroll_runs.list()
+
+
+ async def main() -> None:
+ await client.hris.employee_payroll_runs.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/employee-payroll-runs",
@@ -318,9 +341,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEmployeePayrollRunList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEmployeePayrollRunList,
+ parse_obj_as(
+ type_=PaginatedEmployeePayrollRunList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -357,25 +386,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employee_payroll_runs.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.employee_payroll_runs.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/employee-payroll-runs/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EmployeePayrollRun, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EmployeePayrollRun,
+ parse_obj_as(
+ type_=EmployeePayrollRun, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/employee_payroll_runs/types/employee_payroll_runs_list_request_expand.py b/src/merge/resources/hris/resources/employee_payroll_runs/types/employee_payroll_runs_list_request_expand.py
index 8726143e..8c4ca356 100644
--- a/src/merge/resources/hris/resources/employee_payroll_runs/types/employee_payroll_runs_list_request_expand.py
+++ b/src/merge/resources/hris/resources/employee_payroll_runs/types/employee_payroll_runs_list_request_expand.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeePayrollRunsListRequestExpand(str, enum.Enum):
- EMPLOYEE = "employee"
- EMPLOYEE_PAYROLL_RUN = "employee,payroll_run"
- PAYROLL_RUN = "payroll_run"
-
- def visit(
- self,
- employee: typing.Callable[[], T_Result],
- employee_payroll_run: typing.Callable[[], T_Result],
- payroll_run: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeePayrollRunsListRequestExpand.EMPLOYEE:
- return employee()
- if self is EmployeePayrollRunsListRequestExpand.EMPLOYEE_PAYROLL_RUN:
- return employee_payroll_run()
- if self is EmployeePayrollRunsListRequestExpand.PAYROLL_RUN:
- return payroll_run()
+EmployeePayrollRunsListRequestExpand = typing.Union[
+ typing.Literal["employee", "employee,payroll_run", "payroll_run"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/employee_payroll_runs/types/employee_payroll_runs_retrieve_request_expand.py b/src/merge/resources/hris/resources/employee_payroll_runs/types/employee_payroll_runs_retrieve_request_expand.py
index 683296ac..9c7111fe 100644
--- a/src/merge/resources/hris/resources/employee_payroll_runs/types/employee_payroll_runs_retrieve_request_expand.py
+++ b/src/merge/resources/hris/resources/employee_payroll_runs/types/employee_payroll_runs_retrieve_request_expand.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeePayrollRunsRetrieveRequestExpand(str, enum.Enum):
- EMPLOYEE = "employee"
- EMPLOYEE_PAYROLL_RUN = "employee,payroll_run"
- PAYROLL_RUN = "payroll_run"
-
- def visit(
- self,
- employee: typing.Callable[[], T_Result],
- employee_payroll_run: typing.Callable[[], T_Result],
- payroll_run: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE:
- return employee()
- if self is EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE_PAYROLL_RUN:
- return employee_payroll_run()
- if self is EmployeePayrollRunsRetrieveRequestExpand.PAYROLL_RUN:
- return payroll_run()
+EmployeePayrollRunsRetrieveRequestExpand = typing.Union[
+ typing.Literal["employee", "employee,payroll_run", "payroll_run"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/employees/client.py b/src/merge/resources/hris/resources/employees/client.py
index 728d2718..9ce9fd8b 100644
--- a/src/merge/resources/hris/resources/employees/client.py
+++ b/src/merge/resources/hris/resources/employees/client.py
@@ -1,28 +1,28 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.employee import Employee
-from ...types.employee_request import EmployeeRequest
-from ...types.employee_response import EmployeeResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_employee_list import PaginatedEmployeeList
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
from .types.employees_list_request_employment_status import EmployeesListRequestEmploymentStatus
from .types.employees_list_request_expand import EmployeesListRequestExpand
from .types.employees_list_request_remote_fields import EmployeesListRequestRemoteFields
from .types.employees_list_request_show_enum_origins import EmployeesListRequestShowEnumOrigins
+from .....core.request_options import RequestOptions
+from ...types.paginated_employee_list import PaginatedEmployeeList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from ...types.employee_request import EmployeeRequest
+from ...types.employee_response import EmployeeResponse
from .types.employees_retrieve_request_expand import EmployeesRetrieveRequestExpand
from .types.employees_retrieve_request_remote_fields import EmployeesRetrieveRequestRemoteFields
from .types.employees_retrieve_request_show_enum_origins import EmployeesRetrieveRequestShowEnumOrigins
+from ...types.employee import Employee
+from .....core.jsonable_encoder import jsonable_encoder
from .types.ignore_common_model_request_reason import IgnoreCommonModelRequestReason
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -184,7 +184,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -231,9 +231,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEmployeeList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEmployeeList,
+ parse_obj_as(
+ type_=PaginatedEmployeeList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -270,7 +276,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.hris import EmployeeRequest
client = Merge(
@@ -284,14 +290,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"hris/v1/employees",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EmployeeResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EmployeeResponse,
+ parse_obj_as(
+ type_=EmployeeResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -340,7 +357,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -362,9 +379,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Employee, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Employee,
+ parse_obj_as(
+ type_=Employee, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -398,8 +421,7 @@ def ignore_create(
Examples
--------
- from merge.client import Merge
- from merge.resources.hris import ReasonEnum
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -407,19 +429,22 @@ def ignore_create(
)
client.hris.employees.ignore_create(
model_id="model_id",
- reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST,
+ reason="GENERAL_CUSTOMER_REQUEST",
)
"""
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/employees/ignore/{jsonable_encoder(model_id)}",
method="POST",
- json={"reason": reason, "message": message},
+ json={
+ "reason": reason,
+ "message": message,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -441,7 +466,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -450,11 +475,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.hris.employees.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/employees/meta/post", method="GET", request_options=request_options
+ "hris/v1/employees/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -617,13 +650,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employees.list()
+
+
+ async def main() -> None:
+ await client.hris.employees.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/employees",
@@ -664,9 +705,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEmployeeList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEmployeeList,
+ parse_obj_as(
+ type_=PaginatedEmployeeList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -703,28 +750,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.hris import EmployeeRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employees.create(
- model=EmployeeRequest(),
- )
+
+
+ async def main() -> None:
+ await client.hris.employees.create(
+ model=EmployeeRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/employees",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EmployeeResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EmployeeResponse,
+ parse_obj_as(
+ type_=EmployeeResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -773,15 +839,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employees.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.employees.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/employees/{jsonable_encoder(id)}",
@@ -795,9 +869,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Employee, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Employee,
+ parse_obj_as(
+ type_=Employee, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -831,28 +911,38 @@ async def ignore_create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.hris import ReasonEnum
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employees.ignore_create(
- model_id="model_id",
- reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST,
- )
+
+
+ async def main() -> None:
+ await client.hris.employees.ignore_create(
+ model_id="model_id",
+ reason="GENERAL_CUSTOMER_REQUEST",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/employees/ignore/{jsonable_encoder(model_id)}",
method="POST",
- json={"reason": reason, "message": message},
+ json={
+ "reason": reason,
+ "message": message,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -874,20 +964,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employees.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.hris.employees.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/employees/meta/post", method="GET", request_options=request_options
+ "hris/v1/employees/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/employees/types/employees_list_request_employment_status.py b/src/merge/resources/hris/resources/employees/types/employees_list_request_employment_status.py
index f0406ec8..6190e267 100644
--- a/src/merge/resources/hris/resources/employees/types/employees_list_request_employment_status.py
+++ b/src/merge/resources/hris/resources/employees/types/employees_list_request_employment_status.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeesListRequestEmploymentStatus(str, enum.Enum):
- ACTIVE = "ACTIVE"
- INACTIVE = "INACTIVE"
- PENDING = "PENDING"
-
- def visit(
- self,
- active: typing.Callable[[], T_Result],
- inactive: typing.Callable[[], T_Result],
- pending: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeesListRequestEmploymentStatus.ACTIVE:
- return active()
- if self is EmployeesListRequestEmploymentStatus.INACTIVE:
- return inactive()
- if self is EmployeesListRequestEmploymentStatus.PENDING:
- return pending()
+EmployeesListRequestEmploymentStatus = typing.Union[typing.Literal["ACTIVE", "INACTIVE", "PENDING"], typing.Any]
diff --git a/src/merge/resources/hris/resources/employees/types/employees_list_request_expand.py b/src/merge/resources/hris/resources/employees/types/employees_list_request_expand.py
index 2c8611fb..99981ea1 100644
--- a/src/merge/resources/hris/resources/employees/types/employees_list_request_expand.py
+++ b/src/merge/resources/hris/resources/employees/types/employees_list_request_expand.py
@@ -1,1096 +1,264 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeesListRequestExpand(str, enum.Enum):
- COMPANY = "company"
- COMPANY_PAY_GROUP = "company,pay_group"
- EMPLOYMENTS = "employments"
- EMPLOYMENTS_COMPANY = "employments,company"
- EMPLOYMENTS_COMPANY_PAY_GROUP = "employments,company,pay_group"
- EMPLOYMENTS_GROUPS = "employments,groups"
- EMPLOYMENTS_GROUPS_COMPANY = "employments,groups,company"
- EMPLOYMENTS_GROUPS_COMPANY_PAY_GROUP = "employments,groups,company,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION = "employments,groups,home_location"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_COMPANY = "employments,groups,home_location,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_COMPANY_PAY_GROUP = "employments,groups,home_location,company,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER = "employments,groups,home_location,manager"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_COMPANY = "employments,groups,home_location,manager,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,manager,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_PAY_GROUP = "employments,groups,home_location,manager,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM = "employments,groups,home_location,manager,team"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY = "employments,groups,home_location,manager,team,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP = "employments,groups,home_location,manager,team,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_PAY_GROUP = "employments,groups,home_location,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM = "employments,groups,home_location,team"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_COMPANY = "employments,groups,home_location,team,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP = "employments,groups,home_location,team,company,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_PAY_GROUP = "employments,groups,home_location,team,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION = "employments,groups,home_location,work_location"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY = "employments,groups,home_location,work_location,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,work_location,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER = "employments,groups,home_location,work_location,manager"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY = (
- "employments,groups,home_location,work_location,manager,company"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,work_location,manager,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP = (
- "employments,groups,home_location,work_location,manager,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM = (
- "employments,groups,home_location,work_location,manager,team"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY = (
- "employments,groups,home_location,work_location,manager,team,company"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,work_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = (
- "employments,groups,home_location,work_location,manager,team,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP = (
- "employments,groups,home_location,work_location,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM = "employments,groups,home_location,work_location,team"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY = (
- "employments,groups,home_location,work_location,team,company"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,work_location,team,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP = (
- "employments,groups,home_location,work_location,team,pay_group"
- )
- EMPLOYMENTS_GROUPS_MANAGER = "employments,groups,manager"
- EMPLOYMENTS_GROUPS_MANAGER_COMPANY = "employments,groups,manager,company"
- EMPLOYMENTS_GROUPS_MANAGER_COMPANY_PAY_GROUP = "employments,groups,manager,company,pay_group"
- EMPLOYMENTS_GROUPS_MANAGER_PAY_GROUP = "employments,groups,manager,pay_group"
- EMPLOYMENTS_GROUPS_MANAGER_TEAM = "employments,groups,manager,team"
- EMPLOYMENTS_GROUPS_MANAGER_TEAM_COMPANY = "employments,groups,manager,team,company"
- EMPLOYMENTS_GROUPS_MANAGER_TEAM_COMPANY_PAY_GROUP = "employments,groups,manager,team,company,pay_group"
- EMPLOYMENTS_GROUPS_MANAGER_TEAM_PAY_GROUP = "employments,groups,manager,team,pay_group"
- EMPLOYMENTS_GROUPS_PAY_GROUP = "employments,groups,pay_group"
- EMPLOYMENTS_GROUPS_TEAM = "employments,groups,team"
- EMPLOYMENTS_GROUPS_TEAM_COMPANY = "employments,groups,team,company"
- EMPLOYMENTS_GROUPS_TEAM_COMPANY_PAY_GROUP = "employments,groups,team,company,pay_group"
- EMPLOYMENTS_GROUPS_TEAM_PAY_GROUP = "employments,groups,team,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION = "employments,groups,work_location"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_COMPANY = "employments,groups,work_location,company"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_COMPANY_PAY_GROUP = "employments,groups,work_location,company,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER = "employments,groups,work_location,manager"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_COMPANY = "employments,groups,work_location,manager,company"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "employments,groups,work_location,manager,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_PAY_GROUP = "employments,groups,work_location,manager,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM = "employments,groups,work_location,manager,team"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY = "employments,groups,work_location,manager,team,company"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,groups,work_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "employments,groups,work_location,manager,team,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_PAY_GROUP = "employments,groups,work_location,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM = "employments,groups,work_location,team"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_COMPANY = "employments,groups,work_location,team,company"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "employments,groups,work_location,team,company,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_PAY_GROUP = "employments,groups,work_location,team,pay_group"
- EMPLOYMENTS_HOME_LOCATION = "employments,home_location"
- EMPLOYMENTS_HOME_LOCATION_COMPANY = "employments,home_location,company"
- EMPLOYMENTS_HOME_LOCATION_COMPANY_PAY_GROUP = "employments,home_location,company,pay_group"
- EMPLOYMENTS_HOME_LOCATION_MANAGER = "employments,home_location,manager"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_COMPANY = "employments,home_location,manager,company"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP = "employments,home_location,manager,company,pay_group"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_PAY_GROUP = "employments,home_location,manager,pay_group"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM = "employments,home_location,manager,team"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_COMPANY = "employments,home_location,manager,team,company"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,home_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP = "employments,home_location,manager,team,pay_group"
- EMPLOYMENTS_HOME_LOCATION_PAY_GROUP = "employments,home_location,pay_group"
- EMPLOYMENTS_HOME_LOCATION_TEAM = "employments,home_location,team"
- EMPLOYMENTS_HOME_LOCATION_TEAM_COMPANY = "employments,home_location,team,company"
- EMPLOYMENTS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP = "employments,home_location,team,company,pay_group"
- EMPLOYMENTS_HOME_LOCATION_TEAM_PAY_GROUP = "employments,home_location,team,pay_group"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION = "employments,home_location,work_location"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_COMPANY = "employments,home_location,work_location,company"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP = (
- "employments,home_location,work_location,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER = "employments,home_location,work_location,manager"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY = "employments,home_location,work_location,manager,company"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "employments,home_location,work_location,manager,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP = (
- "employments,home_location,work_location,manager,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM = "employments,home_location,work_location,manager,team"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY = (
- "employments,home_location,work_location,manager,team,company"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,home_location,work_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = (
- "employments,home_location,work_location,manager,team,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP = "employments,home_location,work_location,pay_group"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM = "employments,home_location,work_location,team"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY = "employments,home_location,work_location,team,company"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = (
- "employments,home_location,work_location,team,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP = "employments,home_location,work_location,team,pay_group"
- EMPLOYMENTS_MANAGER = "employments,manager"
- EMPLOYMENTS_MANAGER_COMPANY = "employments,manager,company"
- EMPLOYMENTS_MANAGER_COMPANY_PAY_GROUP = "employments,manager,company,pay_group"
- EMPLOYMENTS_MANAGER_PAY_GROUP = "employments,manager,pay_group"
- EMPLOYMENTS_MANAGER_TEAM = "employments,manager,team"
- EMPLOYMENTS_MANAGER_TEAM_COMPANY = "employments,manager,team,company"
- EMPLOYMENTS_MANAGER_TEAM_COMPANY_PAY_GROUP = "employments,manager,team,company,pay_group"
- EMPLOYMENTS_MANAGER_TEAM_PAY_GROUP = "employments,manager,team,pay_group"
- EMPLOYMENTS_PAY_GROUP = "employments,pay_group"
- EMPLOYMENTS_TEAM = "employments,team"
- EMPLOYMENTS_TEAM_COMPANY = "employments,team,company"
- EMPLOYMENTS_TEAM_COMPANY_PAY_GROUP = "employments,team,company,pay_group"
- EMPLOYMENTS_TEAM_PAY_GROUP = "employments,team,pay_group"
- EMPLOYMENTS_WORK_LOCATION = "employments,work_location"
- EMPLOYMENTS_WORK_LOCATION_COMPANY = "employments,work_location,company"
- EMPLOYMENTS_WORK_LOCATION_COMPANY_PAY_GROUP = "employments,work_location,company,pay_group"
- EMPLOYMENTS_WORK_LOCATION_MANAGER = "employments,work_location,manager"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_COMPANY = "employments,work_location,manager,company"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = "employments,work_location,manager,company,pay_group"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_PAY_GROUP = "employments,work_location,manager,pay_group"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM = "employments,work_location,manager,team"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_COMPANY = "employments,work_location,manager,team,company"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,work_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "employments,work_location,manager,team,pay_group"
- EMPLOYMENTS_WORK_LOCATION_PAY_GROUP = "employments,work_location,pay_group"
- EMPLOYMENTS_WORK_LOCATION_TEAM = "employments,work_location,team"
- EMPLOYMENTS_WORK_LOCATION_TEAM_COMPANY = "employments,work_location,team,company"
- EMPLOYMENTS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "employments,work_location,team,company,pay_group"
- EMPLOYMENTS_WORK_LOCATION_TEAM_PAY_GROUP = "employments,work_location,team,pay_group"
- GROUPS = "groups"
- GROUPS_COMPANY = "groups,company"
- GROUPS_COMPANY_PAY_GROUP = "groups,company,pay_group"
- GROUPS_HOME_LOCATION = "groups,home_location"
- GROUPS_HOME_LOCATION_COMPANY = "groups,home_location,company"
- GROUPS_HOME_LOCATION_COMPANY_PAY_GROUP = "groups,home_location,company,pay_group"
- GROUPS_HOME_LOCATION_MANAGER = "groups,home_location,manager"
- GROUPS_HOME_LOCATION_MANAGER_COMPANY = "groups,home_location,manager,company"
- GROUPS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP = "groups,home_location,manager,company,pay_group"
- GROUPS_HOME_LOCATION_MANAGER_PAY_GROUP = "groups,home_location,manager,pay_group"
- GROUPS_HOME_LOCATION_MANAGER_TEAM = "groups,home_location,manager,team"
- GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY = "groups,home_location,manager,team,company"
- GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = "groups,home_location,manager,team,company,pay_group"
- GROUPS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP = "groups,home_location,manager,team,pay_group"
- GROUPS_HOME_LOCATION_PAY_GROUP = "groups,home_location,pay_group"
- GROUPS_HOME_LOCATION_TEAM = "groups,home_location,team"
- GROUPS_HOME_LOCATION_TEAM_COMPANY = "groups,home_location,team,company"
- GROUPS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP = "groups,home_location,team,company,pay_group"
- GROUPS_HOME_LOCATION_TEAM_PAY_GROUP = "groups,home_location,team,pay_group"
- GROUPS_HOME_LOCATION_WORK_LOCATION = "groups,home_location,work_location"
- GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY = "groups,home_location,work_location,company"
- GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP = "groups,home_location,work_location,company,pay_group"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER = "groups,home_location,work_location,manager"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY = "groups,home_location,work_location,manager,company"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "groups,home_location,work_location,manager,company,pay_group"
- )
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP = "groups,home_location,work_location,manager,pay_group"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM = "groups,home_location,work_location,manager,team"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY = "groups,home_location,work_location,manager,team,company"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "groups,home_location,work_location,manager,team,company,pay_group"
- )
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = (
- "groups,home_location,work_location,manager,team,pay_group"
- )
- GROUPS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP = "groups,home_location,work_location,pay_group"
- GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM = "groups,home_location,work_location,team"
- GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY = "groups,home_location,work_location,team,company"
- GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = (
- "groups,home_location,work_location,team,company,pay_group"
- )
- GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP = "groups,home_location,work_location,team,pay_group"
- GROUPS_MANAGER = "groups,manager"
- GROUPS_MANAGER_COMPANY = "groups,manager,company"
- GROUPS_MANAGER_COMPANY_PAY_GROUP = "groups,manager,company,pay_group"
- GROUPS_MANAGER_PAY_GROUP = "groups,manager,pay_group"
- GROUPS_MANAGER_TEAM = "groups,manager,team"
- GROUPS_MANAGER_TEAM_COMPANY = "groups,manager,team,company"
- GROUPS_MANAGER_TEAM_COMPANY_PAY_GROUP = "groups,manager,team,company,pay_group"
- GROUPS_MANAGER_TEAM_PAY_GROUP = "groups,manager,team,pay_group"
- GROUPS_PAY_GROUP = "groups,pay_group"
- GROUPS_TEAM = "groups,team"
- GROUPS_TEAM_COMPANY = "groups,team,company"
- GROUPS_TEAM_COMPANY_PAY_GROUP = "groups,team,company,pay_group"
- GROUPS_TEAM_PAY_GROUP = "groups,team,pay_group"
- GROUPS_WORK_LOCATION = "groups,work_location"
- GROUPS_WORK_LOCATION_COMPANY = "groups,work_location,company"
- GROUPS_WORK_LOCATION_COMPANY_PAY_GROUP = "groups,work_location,company,pay_group"
- GROUPS_WORK_LOCATION_MANAGER = "groups,work_location,manager"
- GROUPS_WORK_LOCATION_MANAGER_COMPANY = "groups,work_location,manager,company"
- GROUPS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = "groups,work_location,manager,company,pay_group"
- GROUPS_WORK_LOCATION_MANAGER_PAY_GROUP = "groups,work_location,manager,pay_group"
- GROUPS_WORK_LOCATION_MANAGER_TEAM = "groups,work_location,manager,team"
- GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY = "groups,work_location,manager,team,company"
- GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = "groups,work_location,manager,team,company,pay_group"
- GROUPS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "groups,work_location,manager,team,pay_group"
- GROUPS_WORK_LOCATION_PAY_GROUP = "groups,work_location,pay_group"
- GROUPS_WORK_LOCATION_TEAM = "groups,work_location,team"
- GROUPS_WORK_LOCATION_TEAM_COMPANY = "groups,work_location,team,company"
- GROUPS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "groups,work_location,team,company,pay_group"
- GROUPS_WORK_LOCATION_TEAM_PAY_GROUP = "groups,work_location,team,pay_group"
- HOME_LOCATION = "home_location"
- HOME_LOCATION_COMPANY = "home_location,company"
- HOME_LOCATION_COMPANY_PAY_GROUP = "home_location,company,pay_group"
- HOME_LOCATION_MANAGER = "home_location,manager"
- HOME_LOCATION_MANAGER_COMPANY = "home_location,manager,company"
- HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP = "home_location,manager,company,pay_group"
- HOME_LOCATION_MANAGER_PAY_GROUP = "home_location,manager,pay_group"
- HOME_LOCATION_MANAGER_TEAM = "home_location,manager,team"
- HOME_LOCATION_MANAGER_TEAM_COMPANY = "home_location,manager,team,company"
- HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = "home_location,manager,team,company,pay_group"
- HOME_LOCATION_MANAGER_TEAM_PAY_GROUP = "home_location,manager,team,pay_group"
- HOME_LOCATION_PAY_GROUP = "home_location,pay_group"
- HOME_LOCATION_TEAM = "home_location,team"
- HOME_LOCATION_TEAM_COMPANY = "home_location,team,company"
- HOME_LOCATION_TEAM_COMPANY_PAY_GROUP = "home_location,team,company,pay_group"
- HOME_LOCATION_TEAM_PAY_GROUP = "home_location,team,pay_group"
- HOME_LOCATION_WORK_LOCATION = "home_location,work_location"
- HOME_LOCATION_WORK_LOCATION_COMPANY = "home_location,work_location,company"
- HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP = "home_location,work_location,company,pay_group"
- HOME_LOCATION_WORK_LOCATION_MANAGER = "home_location,work_location,manager"
- HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY = "home_location,work_location,manager,company"
- HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = "home_location,work_location,manager,company,pay_group"
- HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP = "home_location,work_location,manager,pay_group"
- HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM = "home_location,work_location,manager,team"
- HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY = "home_location,work_location,manager,team,company"
- HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "home_location,work_location,manager,team,company,pay_group"
- )
- HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "home_location,work_location,manager,team,pay_group"
- HOME_LOCATION_WORK_LOCATION_PAY_GROUP = "home_location,work_location,pay_group"
- HOME_LOCATION_WORK_LOCATION_TEAM = "home_location,work_location,team"
- HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY = "home_location,work_location,team,company"
- HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "home_location,work_location,team,company,pay_group"
- HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP = "home_location,work_location,team,pay_group"
- MANAGER = "manager"
- MANAGER_COMPANY = "manager,company"
- MANAGER_COMPANY_PAY_GROUP = "manager,company,pay_group"
- MANAGER_PAY_GROUP = "manager,pay_group"
- MANAGER_TEAM = "manager,team"
- MANAGER_TEAM_COMPANY = "manager,team,company"
- MANAGER_TEAM_COMPANY_PAY_GROUP = "manager,team,company,pay_group"
- MANAGER_TEAM_PAY_GROUP = "manager,team,pay_group"
- PAY_GROUP = "pay_group"
- TEAM = "team"
- TEAM_COMPANY = "team,company"
- TEAM_COMPANY_PAY_GROUP = "team,company,pay_group"
- TEAM_PAY_GROUP = "team,pay_group"
- WORK_LOCATION = "work_location"
- WORK_LOCATION_COMPANY = "work_location,company"
- WORK_LOCATION_COMPANY_PAY_GROUP = "work_location,company,pay_group"
- WORK_LOCATION_MANAGER = "work_location,manager"
- WORK_LOCATION_MANAGER_COMPANY = "work_location,manager,company"
- WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = "work_location,manager,company,pay_group"
- WORK_LOCATION_MANAGER_PAY_GROUP = "work_location,manager,pay_group"
- WORK_LOCATION_MANAGER_TEAM = "work_location,manager,team"
- WORK_LOCATION_MANAGER_TEAM_COMPANY = "work_location,manager,team,company"
- WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = "work_location,manager,team,company,pay_group"
- WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "work_location,manager,team,pay_group"
- WORK_LOCATION_PAY_GROUP = "work_location,pay_group"
- WORK_LOCATION_TEAM = "work_location,team"
- WORK_LOCATION_TEAM_COMPANY = "work_location,team,company"
- WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "work_location,team,company,pay_group"
- WORK_LOCATION_TEAM_PAY_GROUP = "work_location,team,pay_group"
-
- def visit(
- self,
- company: typing.Callable[[], T_Result],
- company_pay_group: typing.Callable[[], T_Result],
- employments: typing.Callable[[], T_Result],
- employments_company: typing.Callable[[], T_Result],
- employments_company_pay_group: typing.Callable[[], T_Result],
- employments_groups: typing.Callable[[], T_Result],
- employments_groups_company: typing.Callable[[], T_Result],
- employments_groups_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location: typing.Callable[[], T_Result],
- employments_groups_home_location_company: typing.Callable[[], T_Result],
- employments_groups_home_location_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_manager: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_company: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_team: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_team_company: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_team: typing.Callable[[], T_Result],
- employments_groups_home_location_team_company: typing.Callable[[], T_Result],
- employments_groups_home_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_company: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_company: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_team: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_team_company: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_team: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_team_company: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_manager: typing.Callable[[], T_Result],
- employments_groups_manager_company: typing.Callable[[], T_Result],
- employments_groups_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_manager_pay_group: typing.Callable[[], T_Result],
- employments_groups_manager_team: typing.Callable[[], T_Result],
- employments_groups_manager_team_company: typing.Callable[[], T_Result],
- employments_groups_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_pay_group: typing.Callable[[], T_Result],
- employments_groups_team: typing.Callable[[], T_Result],
- employments_groups_team_company: typing.Callable[[], T_Result],
- employments_groups_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location: typing.Callable[[], T_Result],
- employments_groups_work_location_company: typing.Callable[[], T_Result],
- employments_groups_work_location_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_manager: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_company: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_team: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_team_company: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_team: typing.Callable[[], T_Result],
- employments_groups_work_location_team_company: typing.Callable[[], T_Result],
- employments_groups_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_team_pay_group: typing.Callable[[], T_Result],
- employments_home_location: typing.Callable[[], T_Result],
- employments_home_location_company: typing.Callable[[], T_Result],
- employments_home_location_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_manager: typing.Callable[[], T_Result],
- employments_home_location_manager_company: typing.Callable[[], T_Result],
- employments_home_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_home_location_manager_team: typing.Callable[[], T_Result],
- employments_home_location_manager_team_company: typing.Callable[[], T_Result],
- employments_home_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_home_location_pay_group: typing.Callable[[], T_Result],
- employments_home_location_team: typing.Callable[[], T_Result],
- employments_home_location_team_company: typing.Callable[[], T_Result],
- employments_home_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_team_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location: typing.Callable[[], T_Result],
- employments_home_location_work_location_company: typing.Callable[[], T_Result],
- employments_home_location_work_location_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_company: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_team: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_team_company: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_team: typing.Callable[[], T_Result],
- employments_home_location_work_location_team_company: typing.Callable[[], T_Result],
- employments_home_location_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_team_pay_group: typing.Callable[[], T_Result],
- employments_manager: typing.Callable[[], T_Result],
- employments_manager_company: typing.Callable[[], T_Result],
- employments_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_manager_pay_group: typing.Callable[[], T_Result],
- employments_manager_team: typing.Callable[[], T_Result],
- employments_manager_team_company: typing.Callable[[], T_Result],
- employments_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_pay_group: typing.Callable[[], T_Result],
- employments_team: typing.Callable[[], T_Result],
- employments_team_company: typing.Callable[[], T_Result],
- employments_team_company_pay_group: typing.Callable[[], T_Result],
- employments_team_pay_group: typing.Callable[[], T_Result],
- employments_work_location: typing.Callable[[], T_Result],
- employments_work_location_company: typing.Callable[[], T_Result],
- employments_work_location_company_pay_group: typing.Callable[[], T_Result],
- employments_work_location_manager: typing.Callable[[], T_Result],
- employments_work_location_manager_company: typing.Callable[[], T_Result],
- employments_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_work_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_work_location_manager_team: typing.Callable[[], T_Result],
- employments_work_location_manager_team_company: typing.Callable[[], T_Result],
- employments_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_work_location_pay_group: typing.Callable[[], T_Result],
- employments_work_location_team: typing.Callable[[], T_Result],
- employments_work_location_team_company: typing.Callable[[], T_Result],
- employments_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_work_location_team_pay_group: typing.Callable[[], T_Result],
- groups: typing.Callable[[], T_Result],
- groups_company: typing.Callable[[], T_Result],
- groups_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location: typing.Callable[[], T_Result],
- groups_home_location_company: typing.Callable[[], T_Result],
- groups_home_location_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_manager: typing.Callable[[], T_Result],
- groups_home_location_manager_company: typing.Callable[[], T_Result],
- groups_home_location_manager_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_manager_pay_group: typing.Callable[[], T_Result],
- groups_home_location_manager_team: typing.Callable[[], T_Result],
- groups_home_location_manager_team_company: typing.Callable[[], T_Result],
- groups_home_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_manager_team_pay_group: typing.Callable[[], T_Result],
- groups_home_location_pay_group: typing.Callable[[], T_Result],
- groups_home_location_team: typing.Callable[[], T_Result],
- groups_home_location_team_company: typing.Callable[[], T_Result],
- groups_home_location_team_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_team_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location: typing.Callable[[], T_Result],
- groups_home_location_work_location_company: typing.Callable[[], T_Result],
- groups_home_location_work_location_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_company: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_team: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_team_company: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_team: typing.Callable[[], T_Result],
- groups_home_location_work_location_team_company: typing.Callable[[], T_Result],
- groups_home_location_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_team_pay_group: typing.Callable[[], T_Result],
- groups_manager: typing.Callable[[], T_Result],
- groups_manager_company: typing.Callable[[], T_Result],
- groups_manager_company_pay_group: typing.Callable[[], T_Result],
- groups_manager_pay_group: typing.Callable[[], T_Result],
- groups_manager_team: typing.Callable[[], T_Result],
- groups_manager_team_company: typing.Callable[[], T_Result],
- groups_manager_team_company_pay_group: typing.Callable[[], T_Result],
- groups_manager_team_pay_group: typing.Callable[[], T_Result],
- groups_pay_group: typing.Callable[[], T_Result],
- groups_team: typing.Callable[[], T_Result],
- groups_team_company: typing.Callable[[], T_Result],
- groups_team_company_pay_group: typing.Callable[[], T_Result],
- groups_team_pay_group: typing.Callable[[], T_Result],
- groups_work_location: typing.Callable[[], T_Result],
- groups_work_location_company: typing.Callable[[], T_Result],
- groups_work_location_company_pay_group: typing.Callable[[], T_Result],
- groups_work_location_manager: typing.Callable[[], T_Result],
- groups_work_location_manager_company: typing.Callable[[], T_Result],
- groups_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- groups_work_location_manager_pay_group: typing.Callable[[], T_Result],
- groups_work_location_manager_team: typing.Callable[[], T_Result],
- groups_work_location_manager_team_company: typing.Callable[[], T_Result],
- groups_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- groups_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- groups_work_location_pay_group: typing.Callable[[], T_Result],
- groups_work_location_team: typing.Callable[[], T_Result],
- groups_work_location_team_company: typing.Callable[[], T_Result],
- groups_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- groups_work_location_team_pay_group: typing.Callable[[], T_Result],
- home_location: typing.Callable[[], T_Result],
- home_location_company: typing.Callable[[], T_Result],
- home_location_company_pay_group: typing.Callable[[], T_Result],
- home_location_manager: typing.Callable[[], T_Result],
- home_location_manager_company: typing.Callable[[], T_Result],
- home_location_manager_company_pay_group: typing.Callable[[], T_Result],
- home_location_manager_pay_group: typing.Callable[[], T_Result],
- home_location_manager_team: typing.Callable[[], T_Result],
- home_location_manager_team_company: typing.Callable[[], T_Result],
- home_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- home_location_manager_team_pay_group: typing.Callable[[], T_Result],
- home_location_pay_group: typing.Callable[[], T_Result],
- home_location_team: typing.Callable[[], T_Result],
- home_location_team_company: typing.Callable[[], T_Result],
- home_location_team_company_pay_group: typing.Callable[[], T_Result],
- home_location_team_pay_group: typing.Callable[[], T_Result],
- home_location_work_location: typing.Callable[[], T_Result],
- home_location_work_location_company: typing.Callable[[], T_Result],
- home_location_work_location_company_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_manager: typing.Callable[[], T_Result],
- home_location_work_location_manager_company: typing.Callable[[], T_Result],
- home_location_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_manager_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_manager_team: typing.Callable[[], T_Result],
- home_location_work_location_manager_team_company: typing.Callable[[], T_Result],
- home_location_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_team: typing.Callable[[], T_Result],
- home_location_work_location_team_company: typing.Callable[[], T_Result],
- home_location_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_team_pay_group: typing.Callable[[], T_Result],
- manager: typing.Callable[[], T_Result],
- manager_company: typing.Callable[[], T_Result],
- manager_company_pay_group: typing.Callable[[], T_Result],
- manager_pay_group: typing.Callable[[], T_Result],
- manager_team: typing.Callable[[], T_Result],
- manager_team_company: typing.Callable[[], T_Result],
- manager_team_company_pay_group: typing.Callable[[], T_Result],
- manager_team_pay_group: typing.Callable[[], T_Result],
- pay_group: typing.Callable[[], T_Result],
- team: typing.Callable[[], T_Result],
- team_company: typing.Callable[[], T_Result],
- team_company_pay_group: typing.Callable[[], T_Result],
- team_pay_group: typing.Callable[[], T_Result],
- work_location: typing.Callable[[], T_Result],
- work_location_company: typing.Callable[[], T_Result],
- work_location_company_pay_group: typing.Callable[[], T_Result],
- work_location_manager: typing.Callable[[], T_Result],
- work_location_manager_company: typing.Callable[[], T_Result],
- work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- work_location_manager_pay_group: typing.Callable[[], T_Result],
- work_location_manager_team: typing.Callable[[], T_Result],
- work_location_manager_team_company: typing.Callable[[], T_Result],
- work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- work_location_pay_group: typing.Callable[[], T_Result],
- work_location_team: typing.Callable[[], T_Result],
- work_location_team_company: typing.Callable[[], T_Result],
- work_location_team_company_pay_group: typing.Callable[[], T_Result],
- work_location_team_pay_group: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeesListRequestExpand.COMPANY:
- return company()
- if self is EmployeesListRequestExpand.COMPANY_PAY_GROUP:
- return company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS:
- return employments()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_COMPANY:
- return employments_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_COMPANY_PAY_GROUP:
- return employments_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS:
- return employments_groups()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_COMPANY:
- return employments_groups_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_COMPANY_PAY_GROUP:
- return employments_groups_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION:
- return employments_groups_home_location()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_COMPANY:
- return employments_groups_home_location_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_COMPANY_PAY_GROUP:
- return employments_groups_home_location_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER:
- return employments_groups_home_location_manager()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_COMPANY:
- return employments_groups_home_location_manager_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_groups_home_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_PAY_GROUP:
- return employments_groups_home_location_manager_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM:
- return employments_groups_home_location_manager_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_groups_home_location_manager_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_home_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_groups_home_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_PAY_GROUP:
- return employments_groups_home_location_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM:
- return employments_groups_home_location_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_COMPANY:
- return employments_groups_home_location_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_home_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_PAY_GROUP:
- return employments_groups_home_location_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION:
- return employments_groups_home_location_work_location()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY:
- return employments_groups_home_location_work_location_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP:
- return employments_groups_home_location_work_location_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER:
- return employments_groups_home_location_work_location_manager()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY:
- return employments_groups_home_location_work_location_manager_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_groups_home_location_work_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP:
- return employments_groups_home_location_work_location_manager_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM:
- return employments_groups_home_location_work_location_manager_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_groups_home_location_work_location_manager_team_company()
- if (
- self
- is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP
- ):
- return employments_groups_home_location_work_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_groups_home_location_work_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP:
- return employments_groups_home_location_work_location_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM:
- return employments_groups_home_location_work_location_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY:
- return employments_groups_home_location_work_location_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_home_location_work_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP:
- return employments_groups_home_location_work_location_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_MANAGER:
- return employments_groups_manager()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_COMPANY:
- return employments_groups_manager_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_COMPANY_PAY_GROUP:
- return employments_groups_manager_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_PAY_GROUP:
- return employments_groups_manager_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_TEAM:
- return employments_groups_manager_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_TEAM_COMPANY:
- return employments_groups_manager_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_TEAM_PAY_GROUP:
- return employments_groups_manager_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_PAY_GROUP:
- return employments_groups_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_TEAM:
- return employments_groups_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_TEAM_COMPANY:
- return employments_groups_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_TEAM_PAY_GROUP:
- return employments_groups_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION:
- return employments_groups_work_location()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_COMPANY:
- return employments_groups_work_location_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_COMPANY_PAY_GROUP:
- return employments_groups_work_location_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER:
- return employments_groups_work_location_manager()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_COMPANY:
- return employments_groups_work_location_manager_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_groups_work_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_PAY_GROUP:
- return employments_groups_work_location_manager_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM:
- return employments_groups_work_location_manager_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_groups_work_location_manager_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_work_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_groups_work_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_PAY_GROUP:
- return employments_groups_work_location_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM:
- return employments_groups_work_location_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_COMPANY:
- return employments_groups_work_location_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_work_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_PAY_GROUP:
- return employments_groups_work_location_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION:
- return employments_home_location()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_COMPANY:
- return employments_home_location_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_COMPANY_PAY_GROUP:
- return employments_home_location_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER:
- return employments_home_location_manager()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_COMPANY:
- return employments_home_location_manager_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_home_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_PAY_GROUP:
- return employments_home_location_manager_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM:
- return employments_home_location_manager_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_home_location_manager_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_home_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_home_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_PAY_GROUP:
- return employments_home_location_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_TEAM:
- return employments_home_location_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_TEAM_COMPANY:
- return employments_home_location_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_home_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_TEAM_PAY_GROUP:
- return employments_home_location_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION:
- return employments_home_location_work_location()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_COMPANY:
- return employments_home_location_work_location_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP:
- return employments_home_location_work_location_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER:
- return employments_home_location_work_location_manager()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY:
- return employments_home_location_work_location_manager_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_home_location_work_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP:
- return employments_home_location_work_location_manager_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM:
- return employments_home_location_work_location_manager_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_home_location_work_location_manager_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_home_location_work_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_home_location_work_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP:
- return employments_home_location_work_location_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM:
- return employments_home_location_work_location_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY:
- return employments_home_location_work_location_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_home_location_work_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP:
- return employments_home_location_work_location_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_MANAGER:
- return employments_manager()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_MANAGER_COMPANY:
- return employments_manager_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_MANAGER_COMPANY_PAY_GROUP:
- return employments_manager_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_MANAGER_PAY_GROUP:
- return employments_manager_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_MANAGER_TEAM:
- return employments_manager_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_MANAGER_TEAM_COMPANY:
- return employments_manager_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_MANAGER_TEAM_PAY_GROUP:
- return employments_manager_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_PAY_GROUP:
- return employments_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_TEAM:
- return employments_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_TEAM_COMPANY:
- return employments_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_TEAM_COMPANY_PAY_GROUP:
- return employments_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_TEAM_PAY_GROUP:
- return employments_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION:
- return employments_work_location()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_COMPANY:
- return employments_work_location_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_COMPANY_PAY_GROUP:
- return employments_work_location_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER:
- return employments_work_location_manager()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_COMPANY:
- return employments_work_location_manager_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_work_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_PAY_GROUP:
- return employments_work_location_manager_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM:
- return employments_work_location_manager_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_work_location_manager_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_work_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_work_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_PAY_GROUP:
- return employments_work_location_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_TEAM:
- return employments_work_location_team()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_TEAM_COMPANY:
- return employments_work_location_team_company()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_work_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.EMPLOYMENTS_WORK_LOCATION_TEAM_PAY_GROUP:
- return employments_work_location_team_pay_group()
- if self is EmployeesListRequestExpand.GROUPS:
- return groups()
- if self is EmployeesListRequestExpand.GROUPS_COMPANY:
- return groups_company()
- if self is EmployeesListRequestExpand.GROUPS_COMPANY_PAY_GROUP:
- return groups_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION:
- return groups_home_location()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_COMPANY:
- return groups_home_location_company()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_COMPANY_PAY_GROUP:
- return groups_home_location_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_MANAGER:
- return groups_home_location_manager()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_MANAGER_COMPANY:
- return groups_home_location_manager_company()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return groups_home_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_MANAGER_PAY_GROUP:
- return groups_home_location_manager_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_MANAGER_TEAM:
- return groups_home_location_manager_team()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY:
- return groups_home_location_manager_team_company()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return groups_home_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return groups_home_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_PAY_GROUP:
- return groups_home_location_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_TEAM:
- return groups_home_location_team()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_TEAM_COMPANY:
- return groups_home_location_team_company()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return groups_home_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_TEAM_PAY_GROUP:
- return groups_home_location_team_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION:
- return groups_home_location_work_location()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY:
- return groups_home_location_work_location_company()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP:
- return groups_home_location_work_location_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER:
- return groups_home_location_work_location_manager()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY:
- return groups_home_location_work_location_manager_company()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return groups_home_location_work_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP:
- return groups_home_location_work_location_manager_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM:
- return groups_home_location_work_location_manager_team()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return groups_home_location_work_location_manager_team_company()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return groups_home_location_work_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return groups_home_location_work_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP:
- return groups_home_location_work_location_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM:
- return groups_home_location_work_location_team()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY:
- return groups_home_location_work_location_team_company()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return groups_home_location_work_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP:
- return groups_home_location_work_location_team_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_MANAGER:
- return groups_manager()
- if self is EmployeesListRequestExpand.GROUPS_MANAGER_COMPANY:
- return groups_manager_company()
- if self is EmployeesListRequestExpand.GROUPS_MANAGER_COMPANY_PAY_GROUP:
- return groups_manager_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_MANAGER_PAY_GROUP:
- return groups_manager_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_MANAGER_TEAM:
- return groups_manager_team()
- if self is EmployeesListRequestExpand.GROUPS_MANAGER_TEAM_COMPANY:
- return groups_manager_team_company()
- if self is EmployeesListRequestExpand.GROUPS_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return groups_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_MANAGER_TEAM_PAY_GROUP:
- return groups_manager_team_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_PAY_GROUP:
- return groups_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_TEAM:
- return groups_team()
- if self is EmployeesListRequestExpand.GROUPS_TEAM_COMPANY:
- return groups_team_company()
- if self is EmployeesListRequestExpand.GROUPS_TEAM_COMPANY_PAY_GROUP:
- return groups_team_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_TEAM_PAY_GROUP:
- return groups_team_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION:
- return groups_work_location()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_COMPANY:
- return groups_work_location_company()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_COMPANY_PAY_GROUP:
- return groups_work_location_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_MANAGER:
- return groups_work_location_manager()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_MANAGER_COMPANY:
- return groups_work_location_manager_company()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return groups_work_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_MANAGER_PAY_GROUP:
- return groups_work_location_manager_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_MANAGER_TEAM:
- return groups_work_location_manager_team()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return groups_work_location_manager_team_company()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return groups_work_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return groups_work_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_PAY_GROUP:
- return groups_work_location_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_TEAM:
- return groups_work_location_team()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_TEAM_COMPANY:
- return groups_work_location_team_company()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return groups_work_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.GROUPS_WORK_LOCATION_TEAM_PAY_GROUP:
- return groups_work_location_team_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION:
- return home_location()
- if self is EmployeesListRequestExpand.HOME_LOCATION_COMPANY:
- return home_location_company()
- if self is EmployeesListRequestExpand.HOME_LOCATION_COMPANY_PAY_GROUP:
- return home_location_company_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_MANAGER:
- return home_location_manager()
- if self is EmployeesListRequestExpand.HOME_LOCATION_MANAGER_COMPANY:
- return home_location_manager_company()
- if self is EmployeesListRequestExpand.HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return home_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_MANAGER_PAY_GROUP:
- return home_location_manager_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_MANAGER_TEAM:
- return home_location_manager_team()
- if self is EmployeesListRequestExpand.HOME_LOCATION_MANAGER_TEAM_COMPANY:
- return home_location_manager_team_company()
- if self is EmployeesListRequestExpand.HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return home_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return home_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_PAY_GROUP:
- return home_location_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_TEAM:
- return home_location_team()
- if self is EmployeesListRequestExpand.HOME_LOCATION_TEAM_COMPANY:
- return home_location_team_company()
- if self is EmployeesListRequestExpand.HOME_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return home_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_TEAM_PAY_GROUP:
- return home_location_team_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION:
- return home_location_work_location()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_COMPANY:
- return home_location_work_location_company()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP:
- return home_location_work_location_company_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER:
- return home_location_work_location_manager()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY:
- return home_location_work_location_manager_company()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return home_location_work_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP:
- return home_location_work_location_manager_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM:
- return home_location_work_location_manager_team()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return home_location_work_location_manager_team_company()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return home_location_work_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return home_location_work_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_PAY_GROUP:
- return home_location_work_location_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_TEAM:
- return home_location_work_location_team()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY:
- return home_location_work_location_team_company()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return home_location_work_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP:
- return home_location_work_location_team_pay_group()
- if self is EmployeesListRequestExpand.MANAGER:
- return manager()
- if self is EmployeesListRequestExpand.MANAGER_COMPANY:
- return manager_company()
- if self is EmployeesListRequestExpand.MANAGER_COMPANY_PAY_GROUP:
- return manager_company_pay_group()
- if self is EmployeesListRequestExpand.MANAGER_PAY_GROUP:
- return manager_pay_group()
- if self is EmployeesListRequestExpand.MANAGER_TEAM:
- return manager_team()
- if self is EmployeesListRequestExpand.MANAGER_TEAM_COMPANY:
- return manager_team_company()
- if self is EmployeesListRequestExpand.MANAGER_TEAM_COMPANY_PAY_GROUP:
- return manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.MANAGER_TEAM_PAY_GROUP:
- return manager_team_pay_group()
- if self is EmployeesListRequestExpand.PAY_GROUP:
- return pay_group()
- if self is EmployeesListRequestExpand.TEAM:
- return team()
- if self is EmployeesListRequestExpand.TEAM_COMPANY:
- return team_company()
- if self is EmployeesListRequestExpand.TEAM_COMPANY_PAY_GROUP:
- return team_company_pay_group()
- if self is EmployeesListRequestExpand.TEAM_PAY_GROUP:
- return team_pay_group()
- if self is EmployeesListRequestExpand.WORK_LOCATION:
- return work_location()
- if self is EmployeesListRequestExpand.WORK_LOCATION_COMPANY:
- return work_location_company()
- if self is EmployeesListRequestExpand.WORK_LOCATION_COMPANY_PAY_GROUP:
- return work_location_company_pay_group()
- if self is EmployeesListRequestExpand.WORK_LOCATION_MANAGER:
- return work_location_manager()
- if self is EmployeesListRequestExpand.WORK_LOCATION_MANAGER_COMPANY:
- return work_location_manager_company()
- if self is EmployeesListRequestExpand.WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return work_location_manager_company_pay_group()
- if self is EmployeesListRequestExpand.WORK_LOCATION_MANAGER_PAY_GROUP:
- return work_location_manager_pay_group()
- if self is EmployeesListRequestExpand.WORK_LOCATION_MANAGER_TEAM:
- return work_location_manager_team()
- if self is EmployeesListRequestExpand.WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return work_location_manager_team_company()
- if self is EmployeesListRequestExpand.WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return work_location_manager_team_company_pay_group()
- if self is EmployeesListRequestExpand.WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return work_location_manager_team_pay_group()
- if self is EmployeesListRequestExpand.WORK_LOCATION_PAY_GROUP:
- return work_location_pay_group()
- if self is EmployeesListRequestExpand.WORK_LOCATION_TEAM:
- return work_location_team()
- if self is EmployeesListRequestExpand.WORK_LOCATION_TEAM_COMPANY:
- return work_location_team_company()
- if self is EmployeesListRequestExpand.WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return work_location_team_company_pay_group()
- if self is EmployeesListRequestExpand.WORK_LOCATION_TEAM_PAY_GROUP:
- return work_location_team_pay_group()
+EmployeesListRequestExpand = typing.Union[
+ typing.Literal[
+ "company",
+ "company,pay_group",
+ "employments",
+ "employments,company",
+ "employments,company,pay_group",
+ "employments,groups",
+ "employments,groups,company",
+ "employments,groups,company,pay_group",
+ "employments,groups,home_location",
+ "employments,groups,home_location,company",
+ "employments,groups,home_location,company,pay_group",
+ "employments,groups,home_location,manager",
+ "employments,groups,home_location,manager,company",
+ "employments,groups,home_location,manager,company,pay_group",
+ "employments,groups,home_location,manager,pay_group",
+ "employments,groups,home_location,manager,team",
+ "employments,groups,home_location,manager,team,company",
+ "employments,groups,home_location,manager,team,company,pay_group",
+ "employments,groups,home_location,manager,team,pay_group",
+ "employments,groups,home_location,pay_group",
+ "employments,groups,home_location,team",
+ "employments,groups,home_location,team,company",
+ "employments,groups,home_location,team,company,pay_group",
+ "employments,groups,home_location,team,pay_group",
+ "employments,groups,home_location,work_location",
+ "employments,groups,home_location,work_location,company",
+ "employments,groups,home_location,work_location,company,pay_group",
+ "employments,groups,home_location,work_location,manager",
+ "employments,groups,home_location,work_location,manager,company",
+ "employments,groups,home_location,work_location,manager,company,pay_group",
+ "employments,groups,home_location,work_location,manager,pay_group",
+ "employments,groups,home_location,work_location,manager,team",
+ "employments,groups,home_location,work_location,manager,team,company",
+ "employments,groups,home_location,work_location,manager,team,company,pay_group",
+ "employments,groups,home_location,work_location,manager,team,pay_group",
+ "employments,groups,home_location,work_location,pay_group",
+ "employments,groups,home_location,work_location,team",
+ "employments,groups,home_location,work_location,team,company",
+ "employments,groups,home_location,work_location,team,company,pay_group",
+ "employments,groups,home_location,work_location,team,pay_group",
+ "employments,groups,manager",
+ "employments,groups,manager,company",
+ "employments,groups,manager,company,pay_group",
+ "employments,groups,manager,pay_group",
+ "employments,groups,manager,team",
+ "employments,groups,manager,team,company",
+ "employments,groups,manager,team,company,pay_group",
+ "employments,groups,manager,team,pay_group",
+ "employments,groups,pay_group",
+ "employments,groups,team",
+ "employments,groups,team,company",
+ "employments,groups,team,company,pay_group",
+ "employments,groups,team,pay_group",
+ "employments,groups,work_location",
+ "employments,groups,work_location,company",
+ "employments,groups,work_location,company,pay_group",
+ "employments,groups,work_location,manager",
+ "employments,groups,work_location,manager,company",
+ "employments,groups,work_location,manager,company,pay_group",
+ "employments,groups,work_location,manager,pay_group",
+ "employments,groups,work_location,manager,team",
+ "employments,groups,work_location,manager,team,company",
+ "employments,groups,work_location,manager,team,company,pay_group",
+ "employments,groups,work_location,manager,team,pay_group",
+ "employments,groups,work_location,pay_group",
+ "employments,groups,work_location,team",
+ "employments,groups,work_location,team,company",
+ "employments,groups,work_location,team,company,pay_group",
+ "employments,groups,work_location,team,pay_group",
+ "employments,home_location",
+ "employments,home_location,company",
+ "employments,home_location,company,pay_group",
+ "employments,home_location,manager",
+ "employments,home_location,manager,company",
+ "employments,home_location,manager,company,pay_group",
+ "employments,home_location,manager,pay_group",
+ "employments,home_location,manager,team",
+ "employments,home_location,manager,team,company",
+ "employments,home_location,manager,team,company,pay_group",
+ "employments,home_location,manager,team,pay_group",
+ "employments,home_location,pay_group",
+ "employments,home_location,team",
+ "employments,home_location,team,company",
+ "employments,home_location,team,company,pay_group",
+ "employments,home_location,team,pay_group",
+ "employments,home_location,work_location",
+ "employments,home_location,work_location,company",
+ "employments,home_location,work_location,company,pay_group",
+ "employments,home_location,work_location,manager",
+ "employments,home_location,work_location,manager,company",
+ "employments,home_location,work_location,manager,company,pay_group",
+ "employments,home_location,work_location,manager,pay_group",
+ "employments,home_location,work_location,manager,team",
+ "employments,home_location,work_location,manager,team,company",
+ "employments,home_location,work_location,manager,team,company,pay_group",
+ "employments,home_location,work_location,manager,team,pay_group",
+ "employments,home_location,work_location,pay_group",
+ "employments,home_location,work_location,team",
+ "employments,home_location,work_location,team,company",
+ "employments,home_location,work_location,team,company,pay_group",
+ "employments,home_location,work_location,team,pay_group",
+ "employments,manager",
+ "employments,manager,company",
+ "employments,manager,company,pay_group",
+ "employments,manager,pay_group",
+ "employments,manager,team",
+ "employments,manager,team,company",
+ "employments,manager,team,company,pay_group",
+ "employments,manager,team,pay_group",
+ "employments,pay_group",
+ "employments,team",
+ "employments,team,company",
+ "employments,team,company,pay_group",
+ "employments,team,pay_group",
+ "employments,work_location",
+ "employments,work_location,company",
+ "employments,work_location,company,pay_group",
+ "employments,work_location,manager",
+ "employments,work_location,manager,company",
+ "employments,work_location,manager,company,pay_group",
+ "employments,work_location,manager,pay_group",
+ "employments,work_location,manager,team",
+ "employments,work_location,manager,team,company",
+ "employments,work_location,manager,team,company,pay_group",
+ "employments,work_location,manager,team,pay_group",
+ "employments,work_location,pay_group",
+ "employments,work_location,team",
+ "employments,work_location,team,company",
+ "employments,work_location,team,company,pay_group",
+ "employments,work_location,team,pay_group",
+ "groups",
+ "groups,company",
+ "groups,company,pay_group",
+ "groups,home_location",
+ "groups,home_location,company",
+ "groups,home_location,company,pay_group",
+ "groups,home_location,manager",
+ "groups,home_location,manager,company",
+ "groups,home_location,manager,company,pay_group",
+ "groups,home_location,manager,pay_group",
+ "groups,home_location,manager,team",
+ "groups,home_location,manager,team,company",
+ "groups,home_location,manager,team,company,pay_group",
+ "groups,home_location,manager,team,pay_group",
+ "groups,home_location,pay_group",
+ "groups,home_location,team",
+ "groups,home_location,team,company",
+ "groups,home_location,team,company,pay_group",
+ "groups,home_location,team,pay_group",
+ "groups,home_location,work_location",
+ "groups,home_location,work_location,company",
+ "groups,home_location,work_location,company,pay_group",
+ "groups,home_location,work_location,manager",
+ "groups,home_location,work_location,manager,company",
+ "groups,home_location,work_location,manager,company,pay_group",
+ "groups,home_location,work_location,manager,pay_group",
+ "groups,home_location,work_location,manager,team",
+ "groups,home_location,work_location,manager,team,company",
+ "groups,home_location,work_location,manager,team,company,pay_group",
+ "groups,home_location,work_location,manager,team,pay_group",
+ "groups,home_location,work_location,pay_group",
+ "groups,home_location,work_location,team",
+ "groups,home_location,work_location,team,company",
+ "groups,home_location,work_location,team,company,pay_group",
+ "groups,home_location,work_location,team,pay_group",
+ "groups,manager",
+ "groups,manager,company",
+ "groups,manager,company,pay_group",
+ "groups,manager,pay_group",
+ "groups,manager,team",
+ "groups,manager,team,company",
+ "groups,manager,team,company,pay_group",
+ "groups,manager,team,pay_group",
+ "groups,pay_group",
+ "groups,team",
+ "groups,team,company",
+ "groups,team,company,pay_group",
+ "groups,team,pay_group",
+ "groups,work_location",
+ "groups,work_location,company",
+ "groups,work_location,company,pay_group",
+ "groups,work_location,manager",
+ "groups,work_location,manager,company",
+ "groups,work_location,manager,company,pay_group",
+ "groups,work_location,manager,pay_group",
+ "groups,work_location,manager,team",
+ "groups,work_location,manager,team,company",
+ "groups,work_location,manager,team,company,pay_group",
+ "groups,work_location,manager,team,pay_group",
+ "groups,work_location,pay_group",
+ "groups,work_location,team",
+ "groups,work_location,team,company",
+ "groups,work_location,team,company,pay_group",
+ "groups,work_location,team,pay_group",
+ "home_location",
+ "home_location,company",
+ "home_location,company,pay_group",
+ "home_location,manager",
+ "home_location,manager,company",
+ "home_location,manager,company,pay_group",
+ "home_location,manager,pay_group",
+ "home_location,manager,team",
+ "home_location,manager,team,company",
+ "home_location,manager,team,company,pay_group",
+ "home_location,manager,team,pay_group",
+ "home_location,pay_group",
+ "home_location,team",
+ "home_location,team,company",
+ "home_location,team,company,pay_group",
+ "home_location,team,pay_group",
+ "home_location,work_location",
+ "home_location,work_location,company",
+ "home_location,work_location,company,pay_group",
+ "home_location,work_location,manager",
+ "home_location,work_location,manager,company",
+ "home_location,work_location,manager,company,pay_group",
+ "home_location,work_location,manager,pay_group",
+ "home_location,work_location,manager,team",
+ "home_location,work_location,manager,team,company",
+ "home_location,work_location,manager,team,company,pay_group",
+ "home_location,work_location,manager,team,pay_group",
+ "home_location,work_location,pay_group",
+ "home_location,work_location,team",
+ "home_location,work_location,team,company",
+ "home_location,work_location,team,company,pay_group",
+ "home_location,work_location,team,pay_group",
+ "manager",
+ "manager,company",
+ "manager,company,pay_group",
+ "manager,pay_group",
+ "manager,team",
+ "manager,team,company",
+ "manager,team,company,pay_group",
+ "manager,team,pay_group",
+ "pay_group",
+ "team",
+ "team,company",
+ "team,company,pay_group",
+ "team,pay_group",
+ "work_location",
+ "work_location,company",
+ "work_location,company,pay_group",
+ "work_location,manager",
+ "work_location,manager,company",
+ "work_location,manager,company,pay_group",
+ "work_location,manager,pay_group",
+ "work_location,manager,team",
+ "work_location,manager,team,company",
+ "work_location,manager,team,company,pay_group",
+ "work_location,manager,team,pay_group",
+ "work_location,pay_group",
+ "work_location,team",
+ "work_location,team,company",
+ "work_location,team,company,pay_group",
+ "work_location,team,pay_group",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employees/types/employees_list_request_remote_fields.py b/src/merge/resources/hris/resources/employees/types/employees_list_request_remote_fields.py
index 87578468..72f2bdcb 100644
--- a/src/merge/resources/hris/resources/employees/types/employees_list_request_remote_fields.py
+++ b/src/merge/resources/hris/resources/employees/types/employees_list_request_remote_fields.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeesListRequestRemoteFields(str, enum.Enum):
- EMPLOYMENT_STATUS = "employment_status"
- EMPLOYMENT_STATUS_ETHNICITY = "employment_status,ethnicity"
- EMPLOYMENT_STATUS_ETHNICITY_GENDER = "employment_status,ethnicity,gender"
- EMPLOYMENT_STATUS_ETHNICITY_GENDER_MARITAL_STATUS = "employment_status,ethnicity,gender,marital_status"
- EMPLOYMENT_STATUS_ETHNICITY_MARITAL_STATUS = "employment_status,ethnicity,marital_status"
- EMPLOYMENT_STATUS_GENDER = "employment_status,gender"
- EMPLOYMENT_STATUS_GENDER_MARITAL_STATUS = "employment_status,gender,marital_status"
- EMPLOYMENT_STATUS_MARITAL_STATUS = "employment_status,marital_status"
- ETHNICITY = "ethnicity"
- ETHNICITY_GENDER = "ethnicity,gender"
- ETHNICITY_GENDER_MARITAL_STATUS = "ethnicity,gender,marital_status"
- ETHNICITY_MARITAL_STATUS = "ethnicity,marital_status"
- GENDER = "gender"
- GENDER_MARITAL_STATUS = "gender,marital_status"
- MARITAL_STATUS = "marital_status"
-
- def visit(
- self,
- employment_status: typing.Callable[[], T_Result],
- employment_status_ethnicity: typing.Callable[[], T_Result],
- employment_status_ethnicity_gender: typing.Callable[[], T_Result],
- employment_status_ethnicity_gender_marital_status: typing.Callable[[], T_Result],
- employment_status_ethnicity_marital_status: typing.Callable[[], T_Result],
- employment_status_gender: typing.Callable[[], T_Result],
- employment_status_gender_marital_status: typing.Callable[[], T_Result],
- employment_status_marital_status: typing.Callable[[], T_Result],
- ethnicity: typing.Callable[[], T_Result],
- ethnicity_gender: typing.Callable[[], T_Result],
- ethnicity_gender_marital_status: typing.Callable[[], T_Result],
- ethnicity_marital_status: typing.Callable[[], T_Result],
- gender: typing.Callable[[], T_Result],
- gender_marital_status: typing.Callable[[], T_Result],
- marital_status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS:
- return employment_status()
- if self is EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS_ETHNICITY:
- return employment_status_ethnicity()
- if self is EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS_ETHNICITY_GENDER:
- return employment_status_ethnicity_gender()
- if self is EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS_ETHNICITY_GENDER_MARITAL_STATUS:
- return employment_status_ethnicity_gender_marital_status()
- if self is EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS_ETHNICITY_MARITAL_STATUS:
- return employment_status_ethnicity_marital_status()
- if self is EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS_GENDER:
- return employment_status_gender()
- if self is EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS_GENDER_MARITAL_STATUS:
- return employment_status_gender_marital_status()
- if self is EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS_MARITAL_STATUS:
- return employment_status_marital_status()
- if self is EmployeesListRequestRemoteFields.ETHNICITY:
- return ethnicity()
- if self is EmployeesListRequestRemoteFields.ETHNICITY_GENDER:
- return ethnicity_gender()
- if self is EmployeesListRequestRemoteFields.ETHNICITY_GENDER_MARITAL_STATUS:
- return ethnicity_gender_marital_status()
- if self is EmployeesListRequestRemoteFields.ETHNICITY_MARITAL_STATUS:
- return ethnicity_marital_status()
- if self is EmployeesListRequestRemoteFields.GENDER:
- return gender()
- if self is EmployeesListRequestRemoteFields.GENDER_MARITAL_STATUS:
- return gender_marital_status()
- if self is EmployeesListRequestRemoteFields.MARITAL_STATUS:
- return marital_status()
+EmployeesListRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "employment_status",
+ "employment_status,ethnicity",
+ "employment_status,ethnicity,gender",
+ "employment_status,ethnicity,gender,marital_status",
+ "employment_status,ethnicity,marital_status",
+ "employment_status,gender",
+ "employment_status,gender,marital_status",
+ "employment_status,marital_status",
+ "ethnicity",
+ "ethnicity,gender",
+ "ethnicity,gender,marital_status",
+ "ethnicity,marital_status",
+ "gender",
+ "gender,marital_status",
+ "marital_status",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employees/types/employees_list_request_show_enum_origins.py b/src/merge/resources/hris/resources/employees/types/employees_list_request_show_enum_origins.py
index 2aa5f5c7..0f7b05a7 100644
--- a/src/merge/resources/hris/resources/employees/types/employees_list_request_show_enum_origins.py
+++ b/src/merge/resources/hris/resources/employees/types/employees_list_request_show_enum_origins.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeesListRequestShowEnumOrigins(str, enum.Enum):
- EMPLOYMENT_STATUS = "employment_status"
- EMPLOYMENT_STATUS_ETHNICITY = "employment_status,ethnicity"
- EMPLOYMENT_STATUS_ETHNICITY_GENDER = "employment_status,ethnicity,gender"
- EMPLOYMENT_STATUS_ETHNICITY_GENDER_MARITAL_STATUS = "employment_status,ethnicity,gender,marital_status"
- EMPLOYMENT_STATUS_ETHNICITY_MARITAL_STATUS = "employment_status,ethnicity,marital_status"
- EMPLOYMENT_STATUS_GENDER = "employment_status,gender"
- EMPLOYMENT_STATUS_GENDER_MARITAL_STATUS = "employment_status,gender,marital_status"
- EMPLOYMENT_STATUS_MARITAL_STATUS = "employment_status,marital_status"
- ETHNICITY = "ethnicity"
- ETHNICITY_GENDER = "ethnicity,gender"
- ETHNICITY_GENDER_MARITAL_STATUS = "ethnicity,gender,marital_status"
- ETHNICITY_MARITAL_STATUS = "ethnicity,marital_status"
- GENDER = "gender"
- GENDER_MARITAL_STATUS = "gender,marital_status"
- MARITAL_STATUS = "marital_status"
-
- def visit(
- self,
- employment_status: typing.Callable[[], T_Result],
- employment_status_ethnicity: typing.Callable[[], T_Result],
- employment_status_ethnicity_gender: typing.Callable[[], T_Result],
- employment_status_ethnicity_gender_marital_status: typing.Callable[[], T_Result],
- employment_status_ethnicity_marital_status: typing.Callable[[], T_Result],
- employment_status_gender: typing.Callable[[], T_Result],
- employment_status_gender_marital_status: typing.Callable[[], T_Result],
- employment_status_marital_status: typing.Callable[[], T_Result],
- ethnicity: typing.Callable[[], T_Result],
- ethnicity_gender: typing.Callable[[], T_Result],
- ethnicity_gender_marital_status: typing.Callable[[], T_Result],
- ethnicity_marital_status: typing.Callable[[], T_Result],
- gender: typing.Callable[[], T_Result],
- gender_marital_status: typing.Callable[[], T_Result],
- marital_status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS:
- return employment_status()
- if self is EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS_ETHNICITY:
- return employment_status_ethnicity()
- if self is EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS_ETHNICITY_GENDER:
- return employment_status_ethnicity_gender()
- if self is EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS_ETHNICITY_GENDER_MARITAL_STATUS:
- return employment_status_ethnicity_gender_marital_status()
- if self is EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS_ETHNICITY_MARITAL_STATUS:
- return employment_status_ethnicity_marital_status()
- if self is EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS_GENDER:
- return employment_status_gender()
- if self is EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS_GENDER_MARITAL_STATUS:
- return employment_status_gender_marital_status()
- if self is EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS_MARITAL_STATUS:
- return employment_status_marital_status()
- if self is EmployeesListRequestShowEnumOrigins.ETHNICITY:
- return ethnicity()
- if self is EmployeesListRequestShowEnumOrigins.ETHNICITY_GENDER:
- return ethnicity_gender()
- if self is EmployeesListRequestShowEnumOrigins.ETHNICITY_GENDER_MARITAL_STATUS:
- return ethnicity_gender_marital_status()
- if self is EmployeesListRequestShowEnumOrigins.ETHNICITY_MARITAL_STATUS:
- return ethnicity_marital_status()
- if self is EmployeesListRequestShowEnumOrigins.GENDER:
- return gender()
- if self is EmployeesListRequestShowEnumOrigins.GENDER_MARITAL_STATUS:
- return gender_marital_status()
- if self is EmployeesListRequestShowEnumOrigins.MARITAL_STATUS:
- return marital_status()
+EmployeesListRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "employment_status",
+ "employment_status,ethnicity",
+ "employment_status,ethnicity,gender",
+ "employment_status,ethnicity,gender,marital_status",
+ "employment_status,ethnicity,marital_status",
+ "employment_status,gender",
+ "employment_status,gender,marital_status",
+ "employment_status,marital_status",
+ "ethnicity",
+ "ethnicity,gender",
+ "ethnicity,gender,marital_status",
+ "ethnicity,marital_status",
+ "gender",
+ "gender,marital_status",
+ "marital_status",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_expand.py b/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_expand.py
index ff4ff63c..8fa9d406 100644
--- a/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_expand.py
+++ b/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_expand.py
@@ -1,1102 +1,264 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeesRetrieveRequestExpand(str, enum.Enum):
- COMPANY = "company"
- COMPANY_PAY_GROUP = "company,pay_group"
- EMPLOYMENTS = "employments"
- EMPLOYMENTS_COMPANY = "employments,company"
- EMPLOYMENTS_COMPANY_PAY_GROUP = "employments,company,pay_group"
- EMPLOYMENTS_GROUPS = "employments,groups"
- EMPLOYMENTS_GROUPS_COMPANY = "employments,groups,company"
- EMPLOYMENTS_GROUPS_COMPANY_PAY_GROUP = "employments,groups,company,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION = "employments,groups,home_location"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_COMPANY = "employments,groups,home_location,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_COMPANY_PAY_GROUP = "employments,groups,home_location,company,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER = "employments,groups,home_location,manager"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_COMPANY = "employments,groups,home_location,manager,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,manager,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_PAY_GROUP = "employments,groups,home_location,manager,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM = "employments,groups,home_location,manager,team"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY = "employments,groups,home_location,manager,team,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP = "employments,groups,home_location,manager,team,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_PAY_GROUP = "employments,groups,home_location,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM = "employments,groups,home_location,team"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_COMPANY = "employments,groups,home_location,team,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP = "employments,groups,home_location,team,company,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_PAY_GROUP = "employments,groups,home_location,team,pay_group"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION = "employments,groups,home_location,work_location"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY = "employments,groups,home_location,work_location,company"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,work_location,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER = "employments,groups,home_location,work_location,manager"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY = (
- "employments,groups,home_location,work_location,manager,company"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,work_location,manager,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP = (
- "employments,groups,home_location,work_location,manager,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM = (
- "employments,groups,home_location,work_location,manager,team"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY = (
- "employments,groups,home_location,work_location,manager,team,company"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,work_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = (
- "employments,groups,home_location,work_location,manager,team,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP = (
- "employments,groups,home_location,work_location,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM = "employments,groups,home_location,work_location,team"
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY = (
- "employments,groups,home_location,work_location,team,company"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = (
- "employments,groups,home_location,work_location,team,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP = (
- "employments,groups,home_location,work_location,team,pay_group"
- )
- EMPLOYMENTS_GROUPS_MANAGER = "employments,groups,manager"
- EMPLOYMENTS_GROUPS_MANAGER_COMPANY = "employments,groups,manager,company"
- EMPLOYMENTS_GROUPS_MANAGER_COMPANY_PAY_GROUP = "employments,groups,manager,company,pay_group"
- EMPLOYMENTS_GROUPS_MANAGER_PAY_GROUP = "employments,groups,manager,pay_group"
- EMPLOYMENTS_GROUPS_MANAGER_TEAM = "employments,groups,manager,team"
- EMPLOYMENTS_GROUPS_MANAGER_TEAM_COMPANY = "employments,groups,manager,team,company"
- EMPLOYMENTS_GROUPS_MANAGER_TEAM_COMPANY_PAY_GROUP = "employments,groups,manager,team,company,pay_group"
- EMPLOYMENTS_GROUPS_MANAGER_TEAM_PAY_GROUP = "employments,groups,manager,team,pay_group"
- EMPLOYMENTS_GROUPS_PAY_GROUP = "employments,groups,pay_group"
- EMPLOYMENTS_GROUPS_TEAM = "employments,groups,team"
- EMPLOYMENTS_GROUPS_TEAM_COMPANY = "employments,groups,team,company"
- EMPLOYMENTS_GROUPS_TEAM_COMPANY_PAY_GROUP = "employments,groups,team,company,pay_group"
- EMPLOYMENTS_GROUPS_TEAM_PAY_GROUP = "employments,groups,team,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION = "employments,groups,work_location"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_COMPANY = "employments,groups,work_location,company"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_COMPANY_PAY_GROUP = "employments,groups,work_location,company,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER = "employments,groups,work_location,manager"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_COMPANY = "employments,groups,work_location,manager,company"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "employments,groups,work_location,manager,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_PAY_GROUP = "employments,groups,work_location,manager,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM = "employments,groups,work_location,manager,team"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY = "employments,groups,work_location,manager,team,company"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,groups,work_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "employments,groups,work_location,manager,team,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_PAY_GROUP = "employments,groups,work_location,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM = "employments,groups,work_location,team"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_COMPANY = "employments,groups,work_location,team,company"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "employments,groups,work_location,team,company,pay_group"
- EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_PAY_GROUP = "employments,groups,work_location,team,pay_group"
- EMPLOYMENTS_HOME_LOCATION = "employments,home_location"
- EMPLOYMENTS_HOME_LOCATION_COMPANY = "employments,home_location,company"
- EMPLOYMENTS_HOME_LOCATION_COMPANY_PAY_GROUP = "employments,home_location,company,pay_group"
- EMPLOYMENTS_HOME_LOCATION_MANAGER = "employments,home_location,manager"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_COMPANY = "employments,home_location,manager,company"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP = "employments,home_location,manager,company,pay_group"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_PAY_GROUP = "employments,home_location,manager,pay_group"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM = "employments,home_location,manager,team"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_COMPANY = "employments,home_location,manager,team,company"
- EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,home_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP = "employments,home_location,manager,team,pay_group"
- EMPLOYMENTS_HOME_LOCATION_PAY_GROUP = "employments,home_location,pay_group"
- EMPLOYMENTS_HOME_LOCATION_TEAM = "employments,home_location,team"
- EMPLOYMENTS_HOME_LOCATION_TEAM_COMPANY = "employments,home_location,team,company"
- EMPLOYMENTS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP = "employments,home_location,team,company,pay_group"
- EMPLOYMENTS_HOME_LOCATION_TEAM_PAY_GROUP = "employments,home_location,team,pay_group"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION = "employments,home_location,work_location"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_COMPANY = "employments,home_location,work_location,company"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP = (
- "employments,home_location,work_location,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER = "employments,home_location,work_location,manager"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY = "employments,home_location,work_location,manager,company"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "employments,home_location,work_location,manager,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP = (
- "employments,home_location,work_location,manager,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM = "employments,home_location,work_location,manager,team"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY = (
- "employments,home_location,work_location,manager,team,company"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,home_location,work_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = (
- "employments,home_location,work_location,manager,team,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP = "employments,home_location,work_location,pay_group"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM = "employments,home_location,work_location,team"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY = "employments,home_location,work_location,team,company"
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = (
- "employments,home_location,work_location,team,company,pay_group"
- )
- EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP = "employments,home_location,work_location,team,pay_group"
- EMPLOYMENTS_MANAGER = "employments,manager"
- EMPLOYMENTS_MANAGER_COMPANY = "employments,manager,company"
- EMPLOYMENTS_MANAGER_COMPANY_PAY_GROUP = "employments,manager,company,pay_group"
- EMPLOYMENTS_MANAGER_PAY_GROUP = "employments,manager,pay_group"
- EMPLOYMENTS_MANAGER_TEAM = "employments,manager,team"
- EMPLOYMENTS_MANAGER_TEAM_COMPANY = "employments,manager,team,company"
- EMPLOYMENTS_MANAGER_TEAM_COMPANY_PAY_GROUP = "employments,manager,team,company,pay_group"
- EMPLOYMENTS_MANAGER_TEAM_PAY_GROUP = "employments,manager,team,pay_group"
- EMPLOYMENTS_PAY_GROUP = "employments,pay_group"
- EMPLOYMENTS_TEAM = "employments,team"
- EMPLOYMENTS_TEAM_COMPANY = "employments,team,company"
- EMPLOYMENTS_TEAM_COMPANY_PAY_GROUP = "employments,team,company,pay_group"
- EMPLOYMENTS_TEAM_PAY_GROUP = "employments,team,pay_group"
- EMPLOYMENTS_WORK_LOCATION = "employments,work_location"
- EMPLOYMENTS_WORK_LOCATION_COMPANY = "employments,work_location,company"
- EMPLOYMENTS_WORK_LOCATION_COMPANY_PAY_GROUP = "employments,work_location,company,pay_group"
- EMPLOYMENTS_WORK_LOCATION_MANAGER = "employments,work_location,manager"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_COMPANY = "employments,work_location,manager,company"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = "employments,work_location,manager,company,pay_group"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_PAY_GROUP = "employments,work_location,manager,pay_group"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM = "employments,work_location,manager,team"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_COMPANY = "employments,work_location,manager,team,company"
- EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "employments,work_location,manager,team,company,pay_group"
- )
- EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "employments,work_location,manager,team,pay_group"
- EMPLOYMENTS_WORK_LOCATION_PAY_GROUP = "employments,work_location,pay_group"
- EMPLOYMENTS_WORK_LOCATION_TEAM = "employments,work_location,team"
- EMPLOYMENTS_WORK_LOCATION_TEAM_COMPANY = "employments,work_location,team,company"
- EMPLOYMENTS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "employments,work_location,team,company,pay_group"
- EMPLOYMENTS_WORK_LOCATION_TEAM_PAY_GROUP = "employments,work_location,team,pay_group"
- GROUPS = "groups"
- GROUPS_COMPANY = "groups,company"
- GROUPS_COMPANY_PAY_GROUP = "groups,company,pay_group"
- GROUPS_HOME_LOCATION = "groups,home_location"
- GROUPS_HOME_LOCATION_COMPANY = "groups,home_location,company"
- GROUPS_HOME_LOCATION_COMPANY_PAY_GROUP = "groups,home_location,company,pay_group"
- GROUPS_HOME_LOCATION_MANAGER = "groups,home_location,manager"
- GROUPS_HOME_LOCATION_MANAGER_COMPANY = "groups,home_location,manager,company"
- GROUPS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP = "groups,home_location,manager,company,pay_group"
- GROUPS_HOME_LOCATION_MANAGER_PAY_GROUP = "groups,home_location,manager,pay_group"
- GROUPS_HOME_LOCATION_MANAGER_TEAM = "groups,home_location,manager,team"
- GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY = "groups,home_location,manager,team,company"
- GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = "groups,home_location,manager,team,company,pay_group"
- GROUPS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP = "groups,home_location,manager,team,pay_group"
- GROUPS_HOME_LOCATION_PAY_GROUP = "groups,home_location,pay_group"
- GROUPS_HOME_LOCATION_TEAM = "groups,home_location,team"
- GROUPS_HOME_LOCATION_TEAM_COMPANY = "groups,home_location,team,company"
- GROUPS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP = "groups,home_location,team,company,pay_group"
- GROUPS_HOME_LOCATION_TEAM_PAY_GROUP = "groups,home_location,team,pay_group"
- GROUPS_HOME_LOCATION_WORK_LOCATION = "groups,home_location,work_location"
- GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY = "groups,home_location,work_location,company"
- GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP = "groups,home_location,work_location,company,pay_group"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER = "groups,home_location,work_location,manager"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY = "groups,home_location,work_location,manager,company"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = (
- "groups,home_location,work_location,manager,company,pay_group"
- )
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP = "groups,home_location,work_location,manager,pay_group"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM = "groups,home_location,work_location,manager,team"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY = "groups,home_location,work_location,manager,team,company"
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "groups,home_location,work_location,manager,team,company,pay_group"
- )
- GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = (
- "groups,home_location,work_location,manager,team,pay_group"
- )
- GROUPS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP = "groups,home_location,work_location,pay_group"
- GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM = "groups,home_location,work_location,team"
- GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY = "groups,home_location,work_location,team,company"
- GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = (
- "groups,home_location,work_location,team,company,pay_group"
- )
- GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP = "groups,home_location,work_location,team,pay_group"
- GROUPS_MANAGER = "groups,manager"
- GROUPS_MANAGER_COMPANY = "groups,manager,company"
- GROUPS_MANAGER_COMPANY_PAY_GROUP = "groups,manager,company,pay_group"
- GROUPS_MANAGER_PAY_GROUP = "groups,manager,pay_group"
- GROUPS_MANAGER_TEAM = "groups,manager,team"
- GROUPS_MANAGER_TEAM_COMPANY = "groups,manager,team,company"
- GROUPS_MANAGER_TEAM_COMPANY_PAY_GROUP = "groups,manager,team,company,pay_group"
- GROUPS_MANAGER_TEAM_PAY_GROUP = "groups,manager,team,pay_group"
- GROUPS_PAY_GROUP = "groups,pay_group"
- GROUPS_TEAM = "groups,team"
- GROUPS_TEAM_COMPANY = "groups,team,company"
- GROUPS_TEAM_COMPANY_PAY_GROUP = "groups,team,company,pay_group"
- GROUPS_TEAM_PAY_GROUP = "groups,team,pay_group"
- GROUPS_WORK_LOCATION = "groups,work_location"
- GROUPS_WORK_LOCATION_COMPANY = "groups,work_location,company"
- GROUPS_WORK_LOCATION_COMPANY_PAY_GROUP = "groups,work_location,company,pay_group"
- GROUPS_WORK_LOCATION_MANAGER = "groups,work_location,manager"
- GROUPS_WORK_LOCATION_MANAGER_COMPANY = "groups,work_location,manager,company"
- GROUPS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = "groups,work_location,manager,company,pay_group"
- GROUPS_WORK_LOCATION_MANAGER_PAY_GROUP = "groups,work_location,manager,pay_group"
- GROUPS_WORK_LOCATION_MANAGER_TEAM = "groups,work_location,manager,team"
- GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY = "groups,work_location,manager,team,company"
- GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = "groups,work_location,manager,team,company,pay_group"
- GROUPS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "groups,work_location,manager,team,pay_group"
- GROUPS_WORK_LOCATION_PAY_GROUP = "groups,work_location,pay_group"
- GROUPS_WORK_LOCATION_TEAM = "groups,work_location,team"
- GROUPS_WORK_LOCATION_TEAM_COMPANY = "groups,work_location,team,company"
- GROUPS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "groups,work_location,team,company,pay_group"
- GROUPS_WORK_LOCATION_TEAM_PAY_GROUP = "groups,work_location,team,pay_group"
- HOME_LOCATION = "home_location"
- HOME_LOCATION_COMPANY = "home_location,company"
- HOME_LOCATION_COMPANY_PAY_GROUP = "home_location,company,pay_group"
- HOME_LOCATION_MANAGER = "home_location,manager"
- HOME_LOCATION_MANAGER_COMPANY = "home_location,manager,company"
- HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP = "home_location,manager,company,pay_group"
- HOME_LOCATION_MANAGER_PAY_GROUP = "home_location,manager,pay_group"
- HOME_LOCATION_MANAGER_TEAM = "home_location,manager,team"
- HOME_LOCATION_MANAGER_TEAM_COMPANY = "home_location,manager,team,company"
- HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = "home_location,manager,team,company,pay_group"
- HOME_LOCATION_MANAGER_TEAM_PAY_GROUP = "home_location,manager,team,pay_group"
- HOME_LOCATION_PAY_GROUP = "home_location,pay_group"
- HOME_LOCATION_TEAM = "home_location,team"
- HOME_LOCATION_TEAM_COMPANY = "home_location,team,company"
- HOME_LOCATION_TEAM_COMPANY_PAY_GROUP = "home_location,team,company,pay_group"
- HOME_LOCATION_TEAM_PAY_GROUP = "home_location,team,pay_group"
- HOME_LOCATION_WORK_LOCATION = "home_location,work_location"
- HOME_LOCATION_WORK_LOCATION_COMPANY = "home_location,work_location,company"
- HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP = "home_location,work_location,company,pay_group"
- HOME_LOCATION_WORK_LOCATION_MANAGER = "home_location,work_location,manager"
- HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY = "home_location,work_location,manager,company"
- HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = "home_location,work_location,manager,company,pay_group"
- HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP = "home_location,work_location,manager,pay_group"
- HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM = "home_location,work_location,manager,team"
- HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY = "home_location,work_location,manager,team,company"
- HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = (
- "home_location,work_location,manager,team,company,pay_group"
- )
- HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "home_location,work_location,manager,team,pay_group"
- HOME_LOCATION_WORK_LOCATION_PAY_GROUP = "home_location,work_location,pay_group"
- HOME_LOCATION_WORK_LOCATION_TEAM = "home_location,work_location,team"
- HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY = "home_location,work_location,team,company"
- HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "home_location,work_location,team,company,pay_group"
- HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP = "home_location,work_location,team,pay_group"
- MANAGER = "manager"
- MANAGER_COMPANY = "manager,company"
- MANAGER_COMPANY_PAY_GROUP = "manager,company,pay_group"
- MANAGER_PAY_GROUP = "manager,pay_group"
- MANAGER_TEAM = "manager,team"
- MANAGER_TEAM_COMPANY = "manager,team,company"
- MANAGER_TEAM_COMPANY_PAY_GROUP = "manager,team,company,pay_group"
- MANAGER_TEAM_PAY_GROUP = "manager,team,pay_group"
- PAY_GROUP = "pay_group"
- TEAM = "team"
- TEAM_COMPANY = "team,company"
- TEAM_COMPANY_PAY_GROUP = "team,company,pay_group"
- TEAM_PAY_GROUP = "team,pay_group"
- WORK_LOCATION = "work_location"
- WORK_LOCATION_COMPANY = "work_location,company"
- WORK_LOCATION_COMPANY_PAY_GROUP = "work_location,company,pay_group"
- WORK_LOCATION_MANAGER = "work_location,manager"
- WORK_LOCATION_MANAGER_COMPANY = "work_location,manager,company"
- WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP = "work_location,manager,company,pay_group"
- WORK_LOCATION_MANAGER_PAY_GROUP = "work_location,manager,pay_group"
- WORK_LOCATION_MANAGER_TEAM = "work_location,manager,team"
- WORK_LOCATION_MANAGER_TEAM_COMPANY = "work_location,manager,team,company"
- WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP = "work_location,manager,team,company,pay_group"
- WORK_LOCATION_MANAGER_TEAM_PAY_GROUP = "work_location,manager,team,pay_group"
- WORK_LOCATION_PAY_GROUP = "work_location,pay_group"
- WORK_LOCATION_TEAM = "work_location,team"
- WORK_LOCATION_TEAM_COMPANY = "work_location,team,company"
- WORK_LOCATION_TEAM_COMPANY_PAY_GROUP = "work_location,team,company,pay_group"
- WORK_LOCATION_TEAM_PAY_GROUP = "work_location,team,pay_group"
-
- def visit(
- self,
- company: typing.Callable[[], T_Result],
- company_pay_group: typing.Callable[[], T_Result],
- employments: typing.Callable[[], T_Result],
- employments_company: typing.Callable[[], T_Result],
- employments_company_pay_group: typing.Callable[[], T_Result],
- employments_groups: typing.Callable[[], T_Result],
- employments_groups_company: typing.Callable[[], T_Result],
- employments_groups_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location: typing.Callable[[], T_Result],
- employments_groups_home_location_company: typing.Callable[[], T_Result],
- employments_groups_home_location_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_manager: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_company: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_team: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_team_company: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_team: typing.Callable[[], T_Result],
- employments_groups_home_location_team_company: typing.Callable[[], T_Result],
- employments_groups_home_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_company: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_company: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_team: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_team_company: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_team: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_team_company: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_home_location_work_location_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_manager: typing.Callable[[], T_Result],
- employments_groups_manager_company: typing.Callable[[], T_Result],
- employments_groups_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_manager_pay_group: typing.Callable[[], T_Result],
- employments_groups_manager_team: typing.Callable[[], T_Result],
- employments_groups_manager_team_company: typing.Callable[[], T_Result],
- employments_groups_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_pay_group: typing.Callable[[], T_Result],
- employments_groups_team: typing.Callable[[], T_Result],
- employments_groups_team_company: typing.Callable[[], T_Result],
- employments_groups_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location: typing.Callable[[], T_Result],
- employments_groups_work_location_company: typing.Callable[[], T_Result],
- employments_groups_work_location_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_manager: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_company: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_team: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_team_company: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_team: typing.Callable[[], T_Result],
- employments_groups_work_location_team_company: typing.Callable[[], T_Result],
- employments_groups_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_groups_work_location_team_pay_group: typing.Callable[[], T_Result],
- employments_home_location: typing.Callable[[], T_Result],
- employments_home_location_company: typing.Callable[[], T_Result],
- employments_home_location_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_manager: typing.Callable[[], T_Result],
- employments_home_location_manager_company: typing.Callable[[], T_Result],
- employments_home_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_home_location_manager_team: typing.Callable[[], T_Result],
- employments_home_location_manager_team_company: typing.Callable[[], T_Result],
- employments_home_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_home_location_pay_group: typing.Callable[[], T_Result],
- employments_home_location_team: typing.Callable[[], T_Result],
- employments_home_location_team_company: typing.Callable[[], T_Result],
- employments_home_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_team_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location: typing.Callable[[], T_Result],
- employments_home_location_work_location_company: typing.Callable[[], T_Result],
- employments_home_location_work_location_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_company: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_team: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_team_company: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_team: typing.Callable[[], T_Result],
- employments_home_location_work_location_team_company: typing.Callable[[], T_Result],
- employments_home_location_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_home_location_work_location_team_pay_group: typing.Callable[[], T_Result],
- employments_manager: typing.Callable[[], T_Result],
- employments_manager_company: typing.Callable[[], T_Result],
- employments_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_manager_pay_group: typing.Callable[[], T_Result],
- employments_manager_team: typing.Callable[[], T_Result],
- employments_manager_team_company: typing.Callable[[], T_Result],
- employments_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_pay_group: typing.Callable[[], T_Result],
- employments_team: typing.Callable[[], T_Result],
- employments_team_company: typing.Callable[[], T_Result],
- employments_team_company_pay_group: typing.Callable[[], T_Result],
- employments_team_pay_group: typing.Callable[[], T_Result],
- employments_work_location: typing.Callable[[], T_Result],
- employments_work_location_company: typing.Callable[[], T_Result],
- employments_work_location_company_pay_group: typing.Callable[[], T_Result],
- employments_work_location_manager: typing.Callable[[], T_Result],
- employments_work_location_manager_company: typing.Callable[[], T_Result],
- employments_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- employments_work_location_manager_pay_group: typing.Callable[[], T_Result],
- employments_work_location_manager_team: typing.Callable[[], T_Result],
- employments_work_location_manager_team_company: typing.Callable[[], T_Result],
- employments_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- employments_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- employments_work_location_pay_group: typing.Callable[[], T_Result],
- employments_work_location_team: typing.Callable[[], T_Result],
- employments_work_location_team_company: typing.Callable[[], T_Result],
- employments_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- employments_work_location_team_pay_group: typing.Callable[[], T_Result],
- groups: typing.Callable[[], T_Result],
- groups_company: typing.Callable[[], T_Result],
- groups_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location: typing.Callable[[], T_Result],
- groups_home_location_company: typing.Callable[[], T_Result],
- groups_home_location_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_manager: typing.Callable[[], T_Result],
- groups_home_location_manager_company: typing.Callable[[], T_Result],
- groups_home_location_manager_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_manager_pay_group: typing.Callable[[], T_Result],
- groups_home_location_manager_team: typing.Callable[[], T_Result],
- groups_home_location_manager_team_company: typing.Callable[[], T_Result],
- groups_home_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_manager_team_pay_group: typing.Callable[[], T_Result],
- groups_home_location_pay_group: typing.Callable[[], T_Result],
- groups_home_location_team: typing.Callable[[], T_Result],
- groups_home_location_team_company: typing.Callable[[], T_Result],
- groups_home_location_team_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_team_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location: typing.Callable[[], T_Result],
- groups_home_location_work_location_company: typing.Callable[[], T_Result],
- groups_home_location_work_location_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_company: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_team: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_team_company: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_team: typing.Callable[[], T_Result],
- groups_home_location_work_location_team_company: typing.Callable[[], T_Result],
- groups_home_location_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- groups_home_location_work_location_team_pay_group: typing.Callable[[], T_Result],
- groups_manager: typing.Callable[[], T_Result],
- groups_manager_company: typing.Callable[[], T_Result],
- groups_manager_company_pay_group: typing.Callable[[], T_Result],
- groups_manager_pay_group: typing.Callable[[], T_Result],
- groups_manager_team: typing.Callable[[], T_Result],
- groups_manager_team_company: typing.Callable[[], T_Result],
- groups_manager_team_company_pay_group: typing.Callable[[], T_Result],
- groups_manager_team_pay_group: typing.Callable[[], T_Result],
- groups_pay_group: typing.Callable[[], T_Result],
- groups_team: typing.Callable[[], T_Result],
- groups_team_company: typing.Callable[[], T_Result],
- groups_team_company_pay_group: typing.Callable[[], T_Result],
- groups_team_pay_group: typing.Callable[[], T_Result],
- groups_work_location: typing.Callable[[], T_Result],
- groups_work_location_company: typing.Callable[[], T_Result],
- groups_work_location_company_pay_group: typing.Callable[[], T_Result],
- groups_work_location_manager: typing.Callable[[], T_Result],
- groups_work_location_manager_company: typing.Callable[[], T_Result],
- groups_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- groups_work_location_manager_pay_group: typing.Callable[[], T_Result],
- groups_work_location_manager_team: typing.Callable[[], T_Result],
- groups_work_location_manager_team_company: typing.Callable[[], T_Result],
- groups_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- groups_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- groups_work_location_pay_group: typing.Callable[[], T_Result],
- groups_work_location_team: typing.Callable[[], T_Result],
- groups_work_location_team_company: typing.Callable[[], T_Result],
- groups_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- groups_work_location_team_pay_group: typing.Callable[[], T_Result],
- home_location: typing.Callable[[], T_Result],
- home_location_company: typing.Callable[[], T_Result],
- home_location_company_pay_group: typing.Callable[[], T_Result],
- home_location_manager: typing.Callable[[], T_Result],
- home_location_manager_company: typing.Callable[[], T_Result],
- home_location_manager_company_pay_group: typing.Callable[[], T_Result],
- home_location_manager_pay_group: typing.Callable[[], T_Result],
- home_location_manager_team: typing.Callable[[], T_Result],
- home_location_manager_team_company: typing.Callable[[], T_Result],
- home_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- home_location_manager_team_pay_group: typing.Callable[[], T_Result],
- home_location_pay_group: typing.Callable[[], T_Result],
- home_location_team: typing.Callable[[], T_Result],
- home_location_team_company: typing.Callable[[], T_Result],
- home_location_team_company_pay_group: typing.Callable[[], T_Result],
- home_location_team_pay_group: typing.Callable[[], T_Result],
- home_location_work_location: typing.Callable[[], T_Result],
- home_location_work_location_company: typing.Callable[[], T_Result],
- home_location_work_location_company_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_manager: typing.Callable[[], T_Result],
- home_location_work_location_manager_company: typing.Callable[[], T_Result],
- home_location_work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_manager_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_manager_team: typing.Callable[[], T_Result],
- home_location_work_location_manager_team_company: typing.Callable[[], T_Result],
- home_location_work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_team: typing.Callable[[], T_Result],
- home_location_work_location_team_company: typing.Callable[[], T_Result],
- home_location_work_location_team_company_pay_group: typing.Callable[[], T_Result],
- home_location_work_location_team_pay_group: typing.Callable[[], T_Result],
- manager: typing.Callable[[], T_Result],
- manager_company: typing.Callable[[], T_Result],
- manager_company_pay_group: typing.Callable[[], T_Result],
- manager_pay_group: typing.Callable[[], T_Result],
- manager_team: typing.Callable[[], T_Result],
- manager_team_company: typing.Callable[[], T_Result],
- manager_team_company_pay_group: typing.Callable[[], T_Result],
- manager_team_pay_group: typing.Callable[[], T_Result],
- pay_group: typing.Callable[[], T_Result],
- team: typing.Callable[[], T_Result],
- team_company: typing.Callable[[], T_Result],
- team_company_pay_group: typing.Callable[[], T_Result],
- team_pay_group: typing.Callable[[], T_Result],
- work_location: typing.Callable[[], T_Result],
- work_location_company: typing.Callable[[], T_Result],
- work_location_company_pay_group: typing.Callable[[], T_Result],
- work_location_manager: typing.Callable[[], T_Result],
- work_location_manager_company: typing.Callable[[], T_Result],
- work_location_manager_company_pay_group: typing.Callable[[], T_Result],
- work_location_manager_pay_group: typing.Callable[[], T_Result],
- work_location_manager_team: typing.Callable[[], T_Result],
- work_location_manager_team_company: typing.Callable[[], T_Result],
- work_location_manager_team_company_pay_group: typing.Callable[[], T_Result],
- work_location_manager_team_pay_group: typing.Callable[[], T_Result],
- work_location_pay_group: typing.Callable[[], T_Result],
- work_location_team: typing.Callable[[], T_Result],
- work_location_team_company: typing.Callable[[], T_Result],
- work_location_team_company_pay_group: typing.Callable[[], T_Result],
- work_location_team_pay_group: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeesRetrieveRequestExpand.COMPANY:
- return company()
- if self is EmployeesRetrieveRequestExpand.COMPANY_PAY_GROUP:
- return company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS:
- return employments()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_COMPANY:
- return employments_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_COMPANY_PAY_GROUP:
- return employments_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS:
- return employments_groups()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_COMPANY:
- return employments_groups_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_COMPANY_PAY_GROUP:
- return employments_groups_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION:
- return employments_groups_home_location()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_COMPANY:
- return employments_groups_home_location_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_COMPANY_PAY_GROUP:
- return employments_groups_home_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER:
- return employments_groups_home_location_manager()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_COMPANY:
- return employments_groups_home_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_groups_home_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_PAY_GROUP:
- return employments_groups_home_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM:
- return employments_groups_home_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_groups_home_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_home_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_groups_home_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_PAY_GROUP:
- return employments_groups_home_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM:
- return employments_groups_home_location_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_COMPANY:
- return employments_groups_home_location_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_home_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_TEAM_PAY_GROUP:
- return employments_groups_home_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION:
- return employments_groups_home_location_work_location()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY:
- return employments_groups_home_location_work_location_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP:
- return employments_groups_home_location_work_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER:
- return employments_groups_home_location_work_location_manager()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY:
- return employments_groups_home_location_work_location_manager_company()
- if (
- self
- is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP
- ):
- return employments_groups_home_location_work_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP:
- return employments_groups_home_location_work_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM:
- return employments_groups_home_location_work_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_groups_home_location_work_location_manager_team_company()
- if (
- self
- is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP
- ):
- return employments_groups_home_location_work_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_groups_home_location_work_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP:
- return employments_groups_home_location_work_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM:
- return employments_groups_home_location_work_location_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY:
- return employments_groups_home_location_work_location_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_home_location_work_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP:
- return employments_groups_home_location_work_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_MANAGER:
- return employments_groups_manager()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_COMPANY:
- return employments_groups_manager_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_COMPANY_PAY_GROUP:
- return employments_groups_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_PAY_GROUP:
- return employments_groups_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_TEAM:
- return employments_groups_manager_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_TEAM_COMPANY:
- return employments_groups_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_MANAGER_TEAM_PAY_GROUP:
- return employments_groups_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_PAY_GROUP:
- return employments_groups_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_TEAM:
- return employments_groups_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_TEAM_COMPANY:
- return employments_groups_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_TEAM_PAY_GROUP:
- return employments_groups_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION:
- return employments_groups_work_location()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_COMPANY:
- return employments_groups_work_location_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_COMPANY_PAY_GROUP:
- return employments_groups_work_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER:
- return employments_groups_work_location_manager()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_COMPANY:
- return employments_groups_work_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_groups_work_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_PAY_GROUP:
- return employments_groups_work_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM:
- return employments_groups_work_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_groups_work_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_work_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_groups_work_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_PAY_GROUP:
- return employments_groups_work_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM:
- return employments_groups_work_location_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_COMPANY:
- return employments_groups_work_location_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_groups_work_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_GROUPS_WORK_LOCATION_TEAM_PAY_GROUP:
- return employments_groups_work_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION:
- return employments_home_location()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_COMPANY:
- return employments_home_location_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_COMPANY_PAY_GROUP:
- return employments_home_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER:
- return employments_home_location_manager()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_COMPANY:
- return employments_home_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_home_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_PAY_GROUP:
- return employments_home_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM:
- return employments_home_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_home_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_home_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_home_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_PAY_GROUP:
- return employments_home_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_TEAM:
- return employments_home_location_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_TEAM_COMPANY:
- return employments_home_location_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_home_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_TEAM_PAY_GROUP:
- return employments_home_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION:
- return employments_home_location_work_location()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_COMPANY:
- return employments_home_location_work_location_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP:
- return employments_home_location_work_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER:
- return employments_home_location_work_location_manager()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY:
- return employments_home_location_work_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_home_location_work_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP:
- return employments_home_location_work_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM:
- return employments_home_location_work_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_home_location_work_location_manager_team_company()
- if (
- self
- is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP
- ):
- return employments_home_location_work_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_home_location_work_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP:
- return employments_home_location_work_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM:
- return employments_home_location_work_location_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY:
- return employments_home_location_work_location_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_home_location_work_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP:
- return employments_home_location_work_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_MANAGER:
- return employments_manager()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_MANAGER_COMPANY:
- return employments_manager_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_MANAGER_COMPANY_PAY_GROUP:
- return employments_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_MANAGER_PAY_GROUP:
- return employments_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_MANAGER_TEAM:
- return employments_manager_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_MANAGER_TEAM_COMPANY:
- return employments_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_MANAGER_TEAM_PAY_GROUP:
- return employments_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_PAY_GROUP:
- return employments_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_TEAM:
- return employments_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_TEAM_COMPANY:
- return employments_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_TEAM_COMPANY_PAY_GROUP:
- return employments_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_TEAM_PAY_GROUP:
- return employments_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION:
- return employments_work_location()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_COMPANY:
- return employments_work_location_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_COMPANY_PAY_GROUP:
- return employments_work_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER:
- return employments_work_location_manager()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_COMPANY:
- return employments_work_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return employments_work_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_PAY_GROUP:
- return employments_work_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM:
- return employments_work_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return employments_work_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return employments_work_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return employments_work_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_PAY_GROUP:
- return employments_work_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_TEAM:
- return employments_work_location_team()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_TEAM_COMPANY:
- return employments_work_location_team_company()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return employments_work_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.EMPLOYMENTS_WORK_LOCATION_TEAM_PAY_GROUP:
- return employments_work_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS:
- return groups()
- if self is EmployeesRetrieveRequestExpand.GROUPS_COMPANY:
- return groups_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_COMPANY_PAY_GROUP:
- return groups_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION:
- return groups_home_location()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_COMPANY:
- return groups_home_location_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_COMPANY_PAY_GROUP:
- return groups_home_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_MANAGER:
- return groups_home_location_manager()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_MANAGER_COMPANY:
- return groups_home_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return groups_home_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_MANAGER_PAY_GROUP:
- return groups_home_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_MANAGER_TEAM:
- return groups_home_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY:
- return groups_home_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return groups_home_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return groups_home_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_PAY_GROUP:
- return groups_home_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_TEAM:
- return groups_home_location_team()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_TEAM_COMPANY:
- return groups_home_location_team_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return groups_home_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_TEAM_PAY_GROUP:
- return groups_home_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION:
- return groups_home_location_work_location()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY:
- return groups_home_location_work_location_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP:
- return groups_home_location_work_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER:
- return groups_home_location_work_location_manager()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY:
- return groups_home_location_work_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return groups_home_location_work_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP:
- return groups_home_location_work_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM:
- return groups_home_location_work_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return groups_home_location_work_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return groups_home_location_work_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return groups_home_location_work_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_PAY_GROUP:
- return groups_home_location_work_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM:
- return groups_home_location_work_location_team()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY:
- return groups_home_location_work_location_team_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return groups_home_location_work_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP:
- return groups_home_location_work_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_MANAGER:
- return groups_manager()
- if self is EmployeesRetrieveRequestExpand.GROUPS_MANAGER_COMPANY:
- return groups_manager_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_MANAGER_COMPANY_PAY_GROUP:
- return groups_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_MANAGER_PAY_GROUP:
- return groups_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_MANAGER_TEAM:
- return groups_manager_team()
- if self is EmployeesRetrieveRequestExpand.GROUPS_MANAGER_TEAM_COMPANY:
- return groups_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return groups_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_MANAGER_TEAM_PAY_GROUP:
- return groups_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_PAY_GROUP:
- return groups_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_TEAM:
- return groups_team()
- if self is EmployeesRetrieveRequestExpand.GROUPS_TEAM_COMPANY:
- return groups_team_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_TEAM_COMPANY_PAY_GROUP:
- return groups_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_TEAM_PAY_GROUP:
- return groups_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION:
- return groups_work_location()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_COMPANY:
- return groups_work_location_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_COMPANY_PAY_GROUP:
- return groups_work_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_MANAGER:
- return groups_work_location_manager()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_MANAGER_COMPANY:
- return groups_work_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return groups_work_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_MANAGER_PAY_GROUP:
- return groups_work_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_MANAGER_TEAM:
- return groups_work_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return groups_work_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return groups_work_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return groups_work_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_PAY_GROUP:
- return groups_work_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_TEAM:
- return groups_work_location_team()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_TEAM_COMPANY:
- return groups_work_location_team_company()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return groups_work_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.GROUPS_WORK_LOCATION_TEAM_PAY_GROUP:
- return groups_work_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION:
- return home_location()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_COMPANY:
- return home_location_company()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_COMPANY_PAY_GROUP:
- return home_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_MANAGER:
- return home_location_manager()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_MANAGER_COMPANY:
- return home_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return home_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_MANAGER_PAY_GROUP:
- return home_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_MANAGER_TEAM:
- return home_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_MANAGER_TEAM_COMPANY:
- return home_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return home_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return home_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_PAY_GROUP:
- return home_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_TEAM:
- return home_location_team()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_TEAM_COMPANY:
- return home_location_team_company()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return home_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_TEAM_PAY_GROUP:
- return home_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION:
- return home_location_work_location()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_COMPANY:
- return home_location_work_location_company()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_COMPANY_PAY_GROUP:
- return home_location_work_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER:
- return home_location_work_location_manager()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY:
- return home_location_work_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return home_location_work_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_PAY_GROUP:
- return home_location_work_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM:
- return home_location_work_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return home_location_work_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return home_location_work_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return home_location_work_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_PAY_GROUP:
- return home_location_work_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_TEAM:
- return home_location_work_location_team()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY:
- return home_location_work_location_team_company()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return home_location_work_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.HOME_LOCATION_WORK_LOCATION_TEAM_PAY_GROUP:
- return home_location_work_location_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.MANAGER:
- return manager()
- if self is EmployeesRetrieveRequestExpand.MANAGER_COMPANY:
- return manager_company()
- if self is EmployeesRetrieveRequestExpand.MANAGER_COMPANY_PAY_GROUP:
- return manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.MANAGER_PAY_GROUP:
- return manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.MANAGER_TEAM:
- return manager_team()
- if self is EmployeesRetrieveRequestExpand.MANAGER_TEAM_COMPANY:
- return manager_team_company()
- if self is EmployeesRetrieveRequestExpand.MANAGER_TEAM_COMPANY_PAY_GROUP:
- return manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.MANAGER_TEAM_PAY_GROUP:
- return manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.PAY_GROUP:
- return pay_group()
- if self is EmployeesRetrieveRequestExpand.TEAM:
- return team()
- if self is EmployeesRetrieveRequestExpand.TEAM_COMPANY:
- return team_company()
- if self is EmployeesRetrieveRequestExpand.TEAM_COMPANY_PAY_GROUP:
- return team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.TEAM_PAY_GROUP:
- return team_pay_group()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION:
- return work_location()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_COMPANY:
- return work_location_company()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_COMPANY_PAY_GROUP:
- return work_location_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_MANAGER:
- return work_location_manager()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_MANAGER_COMPANY:
- return work_location_manager_company()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_MANAGER_COMPANY_PAY_GROUP:
- return work_location_manager_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_MANAGER_PAY_GROUP:
- return work_location_manager_pay_group()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_MANAGER_TEAM:
- return work_location_manager_team()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_MANAGER_TEAM_COMPANY:
- return work_location_manager_team_company()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_MANAGER_TEAM_COMPANY_PAY_GROUP:
- return work_location_manager_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_MANAGER_TEAM_PAY_GROUP:
- return work_location_manager_team_pay_group()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_PAY_GROUP:
- return work_location_pay_group()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_TEAM:
- return work_location_team()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_TEAM_COMPANY:
- return work_location_team_company()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_TEAM_COMPANY_PAY_GROUP:
- return work_location_team_company_pay_group()
- if self is EmployeesRetrieveRequestExpand.WORK_LOCATION_TEAM_PAY_GROUP:
- return work_location_team_pay_group()
+EmployeesRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "company",
+ "company,pay_group",
+ "employments",
+ "employments,company",
+ "employments,company,pay_group",
+ "employments,groups",
+ "employments,groups,company",
+ "employments,groups,company,pay_group",
+ "employments,groups,home_location",
+ "employments,groups,home_location,company",
+ "employments,groups,home_location,company,pay_group",
+ "employments,groups,home_location,manager",
+ "employments,groups,home_location,manager,company",
+ "employments,groups,home_location,manager,company,pay_group",
+ "employments,groups,home_location,manager,pay_group",
+ "employments,groups,home_location,manager,team",
+ "employments,groups,home_location,manager,team,company",
+ "employments,groups,home_location,manager,team,company,pay_group",
+ "employments,groups,home_location,manager,team,pay_group",
+ "employments,groups,home_location,pay_group",
+ "employments,groups,home_location,team",
+ "employments,groups,home_location,team,company",
+ "employments,groups,home_location,team,company,pay_group",
+ "employments,groups,home_location,team,pay_group",
+ "employments,groups,home_location,work_location",
+ "employments,groups,home_location,work_location,company",
+ "employments,groups,home_location,work_location,company,pay_group",
+ "employments,groups,home_location,work_location,manager",
+ "employments,groups,home_location,work_location,manager,company",
+ "employments,groups,home_location,work_location,manager,company,pay_group",
+ "employments,groups,home_location,work_location,manager,pay_group",
+ "employments,groups,home_location,work_location,manager,team",
+ "employments,groups,home_location,work_location,manager,team,company",
+ "employments,groups,home_location,work_location,manager,team,company,pay_group",
+ "employments,groups,home_location,work_location,manager,team,pay_group",
+ "employments,groups,home_location,work_location,pay_group",
+ "employments,groups,home_location,work_location,team",
+ "employments,groups,home_location,work_location,team,company",
+ "employments,groups,home_location,work_location,team,company,pay_group",
+ "employments,groups,home_location,work_location,team,pay_group",
+ "employments,groups,manager",
+ "employments,groups,manager,company",
+ "employments,groups,manager,company,pay_group",
+ "employments,groups,manager,pay_group",
+ "employments,groups,manager,team",
+ "employments,groups,manager,team,company",
+ "employments,groups,manager,team,company,pay_group",
+ "employments,groups,manager,team,pay_group",
+ "employments,groups,pay_group",
+ "employments,groups,team",
+ "employments,groups,team,company",
+ "employments,groups,team,company,pay_group",
+ "employments,groups,team,pay_group",
+ "employments,groups,work_location",
+ "employments,groups,work_location,company",
+ "employments,groups,work_location,company,pay_group",
+ "employments,groups,work_location,manager",
+ "employments,groups,work_location,manager,company",
+ "employments,groups,work_location,manager,company,pay_group",
+ "employments,groups,work_location,manager,pay_group",
+ "employments,groups,work_location,manager,team",
+ "employments,groups,work_location,manager,team,company",
+ "employments,groups,work_location,manager,team,company,pay_group",
+ "employments,groups,work_location,manager,team,pay_group",
+ "employments,groups,work_location,pay_group",
+ "employments,groups,work_location,team",
+ "employments,groups,work_location,team,company",
+ "employments,groups,work_location,team,company,pay_group",
+ "employments,groups,work_location,team,pay_group",
+ "employments,home_location",
+ "employments,home_location,company",
+ "employments,home_location,company,pay_group",
+ "employments,home_location,manager",
+ "employments,home_location,manager,company",
+ "employments,home_location,manager,company,pay_group",
+ "employments,home_location,manager,pay_group",
+ "employments,home_location,manager,team",
+ "employments,home_location,manager,team,company",
+ "employments,home_location,manager,team,company,pay_group",
+ "employments,home_location,manager,team,pay_group",
+ "employments,home_location,pay_group",
+ "employments,home_location,team",
+ "employments,home_location,team,company",
+ "employments,home_location,team,company,pay_group",
+ "employments,home_location,team,pay_group",
+ "employments,home_location,work_location",
+ "employments,home_location,work_location,company",
+ "employments,home_location,work_location,company,pay_group",
+ "employments,home_location,work_location,manager",
+ "employments,home_location,work_location,manager,company",
+ "employments,home_location,work_location,manager,company,pay_group",
+ "employments,home_location,work_location,manager,pay_group",
+ "employments,home_location,work_location,manager,team",
+ "employments,home_location,work_location,manager,team,company",
+ "employments,home_location,work_location,manager,team,company,pay_group",
+ "employments,home_location,work_location,manager,team,pay_group",
+ "employments,home_location,work_location,pay_group",
+ "employments,home_location,work_location,team",
+ "employments,home_location,work_location,team,company",
+ "employments,home_location,work_location,team,company,pay_group",
+ "employments,home_location,work_location,team,pay_group",
+ "employments,manager",
+ "employments,manager,company",
+ "employments,manager,company,pay_group",
+ "employments,manager,pay_group",
+ "employments,manager,team",
+ "employments,manager,team,company",
+ "employments,manager,team,company,pay_group",
+ "employments,manager,team,pay_group",
+ "employments,pay_group",
+ "employments,team",
+ "employments,team,company",
+ "employments,team,company,pay_group",
+ "employments,team,pay_group",
+ "employments,work_location",
+ "employments,work_location,company",
+ "employments,work_location,company,pay_group",
+ "employments,work_location,manager",
+ "employments,work_location,manager,company",
+ "employments,work_location,manager,company,pay_group",
+ "employments,work_location,manager,pay_group",
+ "employments,work_location,manager,team",
+ "employments,work_location,manager,team,company",
+ "employments,work_location,manager,team,company,pay_group",
+ "employments,work_location,manager,team,pay_group",
+ "employments,work_location,pay_group",
+ "employments,work_location,team",
+ "employments,work_location,team,company",
+ "employments,work_location,team,company,pay_group",
+ "employments,work_location,team,pay_group",
+ "groups",
+ "groups,company",
+ "groups,company,pay_group",
+ "groups,home_location",
+ "groups,home_location,company",
+ "groups,home_location,company,pay_group",
+ "groups,home_location,manager",
+ "groups,home_location,manager,company",
+ "groups,home_location,manager,company,pay_group",
+ "groups,home_location,manager,pay_group",
+ "groups,home_location,manager,team",
+ "groups,home_location,manager,team,company",
+ "groups,home_location,manager,team,company,pay_group",
+ "groups,home_location,manager,team,pay_group",
+ "groups,home_location,pay_group",
+ "groups,home_location,team",
+ "groups,home_location,team,company",
+ "groups,home_location,team,company,pay_group",
+ "groups,home_location,team,pay_group",
+ "groups,home_location,work_location",
+ "groups,home_location,work_location,company",
+ "groups,home_location,work_location,company,pay_group",
+ "groups,home_location,work_location,manager",
+ "groups,home_location,work_location,manager,company",
+ "groups,home_location,work_location,manager,company,pay_group",
+ "groups,home_location,work_location,manager,pay_group",
+ "groups,home_location,work_location,manager,team",
+ "groups,home_location,work_location,manager,team,company",
+ "groups,home_location,work_location,manager,team,company,pay_group",
+ "groups,home_location,work_location,manager,team,pay_group",
+ "groups,home_location,work_location,pay_group",
+ "groups,home_location,work_location,team",
+ "groups,home_location,work_location,team,company",
+ "groups,home_location,work_location,team,company,pay_group",
+ "groups,home_location,work_location,team,pay_group",
+ "groups,manager",
+ "groups,manager,company",
+ "groups,manager,company,pay_group",
+ "groups,manager,pay_group",
+ "groups,manager,team",
+ "groups,manager,team,company",
+ "groups,manager,team,company,pay_group",
+ "groups,manager,team,pay_group",
+ "groups,pay_group",
+ "groups,team",
+ "groups,team,company",
+ "groups,team,company,pay_group",
+ "groups,team,pay_group",
+ "groups,work_location",
+ "groups,work_location,company",
+ "groups,work_location,company,pay_group",
+ "groups,work_location,manager",
+ "groups,work_location,manager,company",
+ "groups,work_location,manager,company,pay_group",
+ "groups,work_location,manager,pay_group",
+ "groups,work_location,manager,team",
+ "groups,work_location,manager,team,company",
+ "groups,work_location,manager,team,company,pay_group",
+ "groups,work_location,manager,team,pay_group",
+ "groups,work_location,pay_group",
+ "groups,work_location,team",
+ "groups,work_location,team,company",
+ "groups,work_location,team,company,pay_group",
+ "groups,work_location,team,pay_group",
+ "home_location",
+ "home_location,company",
+ "home_location,company,pay_group",
+ "home_location,manager",
+ "home_location,manager,company",
+ "home_location,manager,company,pay_group",
+ "home_location,manager,pay_group",
+ "home_location,manager,team",
+ "home_location,manager,team,company",
+ "home_location,manager,team,company,pay_group",
+ "home_location,manager,team,pay_group",
+ "home_location,pay_group",
+ "home_location,team",
+ "home_location,team,company",
+ "home_location,team,company,pay_group",
+ "home_location,team,pay_group",
+ "home_location,work_location",
+ "home_location,work_location,company",
+ "home_location,work_location,company,pay_group",
+ "home_location,work_location,manager",
+ "home_location,work_location,manager,company",
+ "home_location,work_location,manager,company,pay_group",
+ "home_location,work_location,manager,pay_group",
+ "home_location,work_location,manager,team",
+ "home_location,work_location,manager,team,company",
+ "home_location,work_location,manager,team,company,pay_group",
+ "home_location,work_location,manager,team,pay_group",
+ "home_location,work_location,pay_group",
+ "home_location,work_location,team",
+ "home_location,work_location,team,company",
+ "home_location,work_location,team,company,pay_group",
+ "home_location,work_location,team,pay_group",
+ "manager",
+ "manager,company",
+ "manager,company,pay_group",
+ "manager,pay_group",
+ "manager,team",
+ "manager,team,company",
+ "manager,team,company,pay_group",
+ "manager,team,pay_group",
+ "pay_group",
+ "team",
+ "team,company",
+ "team,company,pay_group",
+ "team,pay_group",
+ "work_location",
+ "work_location,company",
+ "work_location,company,pay_group",
+ "work_location,manager",
+ "work_location,manager,company",
+ "work_location,manager,company,pay_group",
+ "work_location,manager,pay_group",
+ "work_location,manager,team",
+ "work_location,manager,team,company",
+ "work_location,manager,team,company,pay_group",
+ "work_location,manager,team,pay_group",
+ "work_location,pay_group",
+ "work_location,team",
+ "work_location,team,company",
+ "work_location,team,company,pay_group",
+ "work_location,team,pay_group",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_remote_fields.py b/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_remote_fields.py
index d35a401f..841ee974 100644
--- a/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_remote_fields.py
+++ b/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_remote_fields.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeesRetrieveRequestRemoteFields(str, enum.Enum):
- EMPLOYMENT_STATUS = "employment_status"
- EMPLOYMENT_STATUS_ETHNICITY = "employment_status,ethnicity"
- EMPLOYMENT_STATUS_ETHNICITY_GENDER = "employment_status,ethnicity,gender"
- EMPLOYMENT_STATUS_ETHNICITY_GENDER_MARITAL_STATUS = "employment_status,ethnicity,gender,marital_status"
- EMPLOYMENT_STATUS_ETHNICITY_MARITAL_STATUS = "employment_status,ethnicity,marital_status"
- EMPLOYMENT_STATUS_GENDER = "employment_status,gender"
- EMPLOYMENT_STATUS_GENDER_MARITAL_STATUS = "employment_status,gender,marital_status"
- EMPLOYMENT_STATUS_MARITAL_STATUS = "employment_status,marital_status"
- ETHNICITY = "ethnicity"
- ETHNICITY_GENDER = "ethnicity,gender"
- ETHNICITY_GENDER_MARITAL_STATUS = "ethnicity,gender,marital_status"
- ETHNICITY_MARITAL_STATUS = "ethnicity,marital_status"
- GENDER = "gender"
- GENDER_MARITAL_STATUS = "gender,marital_status"
- MARITAL_STATUS = "marital_status"
-
- def visit(
- self,
- employment_status: typing.Callable[[], T_Result],
- employment_status_ethnicity: typing.Callable[[], T_Result],
- employment_status_ethnicity_gender: typing.Callable[[], T_Result],
- employment_status_ethnicity_gender_marital_status: typing.Callable[[], T_Result],
- employment_status_ethnicity_marital_status: typing.Callable[[], T_Result],
- employment_status_gender: typing.Callable[[], T_Result],
- employment_status_gender_marital_status: typing.Callable[[], T_Result],
- employment_status_marital_status: typing.Callable[[], T_Result],
- ethnicity: typing.Callable[[], T_Result],
- ethnicity_gender: typing.Callable[[], T_Result],
- ethnicity_gender_marital_status: typing.Callable[[], T_Result],
- ethnicity_marital_status: typing.Callable[[], T_Result],
- gender: typing.Callable[[], T_Result],
- gender_marital_status: typing.Callable[[], T_Result],
- marital_status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS:
- return employment_status()
- if self is EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS_ETHNICITY:
- return employment_status_ethnicity()
- if self is EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS_ETHNICITY_GENDER:
- return employment_status_ethnicity_gender()
- if self is EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS_ETHNICITY_GENDER_MARITAL_STATUS:
- return employment_status_ethnicity_gender_marital_status()
- if self is EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS_ETHNICITY_MARITAL_STATUS:
- return employment_status_ethnicity_marital_status()
- if self is EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS_GENDER:
- return employment_status_gender()
- if self is EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS_GENDER_MARITAL_STATUS:
- return employment_status_gender_marital_status()
- if self is EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS_MARITAL_STATUS:
- return employment_status_marital_status()
- if self is EmployeesRetrieveRequestRemoteFields.ETHNICITY:
- return ethnicity()
- if self is EmployeesRetrieveRequestRemoteFields.ETHNICITY_GENDER:
- return ethnicity_gender()
- if self is EmployeesRetrieveRequestRemoteFields.ETHNICITY_GENDER_MARITAL_STATUS:
- return ethnicity_gender_marital_status()
- if self is EmployeesRetrieveRequestRemoteFields.ETHNICITY_MARITAL_STATUS:
- return ethnicity_marital_status()
- if self is EmployeesRetrieveRequestRemoteFields.GENDER:
- return gender()
- if self is EmployeesRetrieveRequestRemoteFields.GENDER_MARITAL_STATUS:
- return gender_marital_status()
- if self is EmployeesRetrieveRequestRemoteFields.MARITAL_STATUS:
- return marital_status()
+EmployeesRetrieveRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "employment_status",
+ "employment_status,ethnicity",
+ "employment_status,ethnicity,gender",
+ "employment_status,ethnicity,gender,marital_status",
+ "employment_status,ethnicity,marital_status",
+ "employment_status,gender",
+ "employment_status,gender,marital_status",
+ "employment_status,marital_status",
+ "ethnicity",
+ "ethnicity,gender",
+ "ethnicity,gender,marital_status",
+ "ethnicity,marital_status",
+ "gender",
+ "gender,marital_status",
+ "marital_status",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_show_enum_origins.py b/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_show_enum_origins.py
index d307e05b..3176f8cc 100644
--- a/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/hris/resources/employees/types/employees_retrieve_request_show_enum_origins.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmployeesRetrieveRequestShowEnumOrigins(str, enum.Enum):
- EMPLOYMENT_STATUS = "employment_status"
- EMPLOYMENT_STATUS_ETHNICITY = "employment_status,ethnicity"
- EMPLOYMENT_STATUS_ETHNICITY_GENDER = "employment_status,ethnicity,gender"
- EMPLOYMENT_STATUS_ETHNICITY_GENDER_MARITAL_STATUS = "employment_status,ethnicity,gender,marital_status"
- EMPLOYMENT_STATUS_ETHNICITY_MARITAL_STATUS = "employment_status,ethnicity,marital_status"
- EMPLOYMENT_STATUS_GENDER = "employment_status,gender"
- EMPLOYMENT_STATUS_GENDER_MARITAL_STATUS = "employment_status,gender,marital_status"
- EMPLOYMENT_STATUS_MARITAL_STATUS = "employment_status,marital_status"
- ETHNICITY = "ethnicity"
- ETHNICITY_GENDER = "ethnicity,gender"
- ETHNICITY_GENDER_MARITAL_STATUS = "ethnicity,gender,marital_status"
- ETHNICITY_MARITAL_STATUS = "ethnicity,marital_status"
- GENDER = "gender"
- GENDER_MARITAL_STATUS = "gender,marital_status"
- MARITAL_STATUS = "marital_status"
-
- def visit(
- self,
- employment_status: typing.Callable[[], T_Result],
- employment_status_ethnicity: typing.Callable[[], T_Result],
- employment_status_ethnicity_gender: typing.Callable[[], T_Result],
- employment_status_ethnicity_gender_marital_status: typing.Callable[[], T_Result],
- employment_status_ethnicity_marital_status: typing.Callable[[], T_Result],
- employment_status_gender: typing.Callable[[], T_Result],
- employment_status_gender_marital_status: typing.Callable[[], T_Result],
- employment_status_marital_status: typing.Callable[[], T_Result],
- ethnicity: typing.Callable[[], T_Result],
- ethnicity_gender: typing.Callable[[], T_Result],
- ethnicity_gender_marital_status: typing.Callable[[], T_Result],
- ethnicity_marital_status: typing.Callable[[], T_Result],
- gender: typing.Callable[[], T_Result],
- gender_marital_status: typing.Callable[[], T_Result],
- marital_status: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS:
- return employment_status()
- if self is EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS_ETHNICITY:
- return employment_status_ethnicity()
- if self is EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS_ETHNICITY_GENDER:
- return employment_status_ethnicity_gender()
- if self is EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS_ETHNICITY_GENDER_MARITAL_STATUS:
- return employment_status_ethnicity_gender_marital_status()
- if self is EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS_ETHNICITY_MARITAL_STATUS:
- return employment_status_ethnicity_marital_status()
- if self is EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS_GENDER:
- return employment_status_gender()
- if self is EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS_GENDER_MARITAL_STATUS:
- return employment_status_gender_marital_status()
- if self is EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS_MARITAL_STATUS:
- return employment_status_marital_status()
- if self is EmployeesRetrieveRequestShowEnumOrigins.ETHNICITY:
- return ethnicity()
- if self is EmployeesRetrieveRequestShowEnumOrigins.ETHNICITY_GENDER:
- return ethnicity_gender()
- if self is EmployeesRetrieveRequestShowEnumOrigins.ETHNICITY_GENDER_MARITAL_STATUS:
- return ethnicity_gender_marital_status()
- if self is EmployeesRetrieveRequestShowEnumOrigins.ETHNICITY_MARITAL_STATUS:
- return ethnicity_marital_status()
- if self is EmployeesRetrieveRequestShowEnumOrigins.GENDER:
- return gender()
- if self is EmployeesRetrieveRequestShowEnumOrigins.GENDER_MARITAL_STATUS:
- return gender_marital_status()
- if self is EmployeesRetrieveRequestShowEnumOrigins.MARITAL_STATUS:
- return marital_status()
+EmployeesRetrieveRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "employment_status",
+ "employment_status,ethnicity",
+ "employment_status,ethnicity,gender",
+ "employment_status,ethnicity,gender,marital_status",
+ "employment_status,ethnicity,marital_status",
+ "employment_status,gender",
+ "employment_status,gender,marital_status",
+ "employment_status,marital_status",
+ "ethnicity",
+ "ethnicity,gender",
+ "ethnicity,gender,marital_status",
+ "ethnicity,marital_status",
+ "gender",
+ "gender,marital_status",
+ "marital_status",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employees/types/ignore_common_model_request_reason.py b/src/merge/resources/hris/resources/employees/types/ignore_common_model_request_reason.py
index 4baf20f1..0cc08995 100644
--- a/src/merge/resources/hris/resources/employees/types/ignore_common_model_request_reason.py
+++ b/src/merge/resources/hris/resources/employees/types/ignore_common_model_request_reason.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from ....types.reason_enum import ReasonEnum
IgnoreCommonModelRequestReason = typing.Union[ReasonEnum, str]
diff --git a/src/merge/resources/hris/resources/employer_benefits/client.py b/src/merge/resources/hris/resources/employer_benefits/client.py
index a9815b0e..74d8e1d9 100644
--- a/src/merge/resources/hris/resources/employer_benefits/client.py
+++ b/src/merge/resources/hris/resources/employer_benefits/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_employer_benefit_list import PaginatedEmployerBenefitList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.employer_benefit import EmployerBenefit
-from ...types.paginated_employer_benefit_list import PaginatedEmployerBenefitList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class EmployerBenefitsClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEmployerBenefitList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEmployerBenefitList,
+ parse_obj_as(
+ type_=PaginatedEmployerBenefitList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/employer-benefits/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EmployerBenefit, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EmployerBenefit,
+ parse_obj_as(
+ type_=EmployerBenefit, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employer_benefits.list()
+
+
+ async def main() -> None:
+ await client.hris.employer_benefits.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/employer-benefits",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEmployerBenefitList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEmployerBenefitList,
+ parse_obj_as(
+ type_=PaginatedEmployerBenefitList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employer_benefits.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.employer_benefits.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/employer-benefits/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(EmployerBenefit, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ EmployerBenefit,
+ parse_obj_as(
+ type_=EmployerBenefit, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/employments/client.py b/src/merge/resources/hris/resources/employments/client.py
index 3f45c45c..a93caa2f 100644
--- a/src/merge/resources/hris/resources/employments/client.py
+++ b/src/merge/resources/hris/resources/employments/client.py
@@ -1,24 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.employment import Employment
-from ...types.paginated_employment_list import PaginatedEmploymentList
+import datetime as dt
from .types.employments_list_request_expand import EmploymentsListRequestExpand
from .types.employments_list_request_order_by import EmploymentsListRequestOrderBy
from .types.employments_list_request_remote_fields import EmploymentsListRequestRemoteFields
from .types.employments_list_request_show_enum_origins import EmploymentsListRequestShowEnumOrigins
+from .....core.request_options import RequestOptions
+from ...types.paginated_employment_list import PaginatedEmploymentList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.employments_retrieve_request_expand import EmploymentsRetrieveRequestExpand
from .types.employments_retrieve_request_remote_fields import EmploymentsRetrieveRequestRemoteFields
from .types.employments_retrieve_request_show_enum_origins import EmploymentsRetrieveRequestShowEnumOrigins
+from ...types.employment import Employment
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class EmploymentsClient:
@@ -101,7 +101,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -130,9 +130,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEmploymentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEmploymentList,
+ parse_obj_as(
+ type_=PaginatedEmploymentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -177,7 +183,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -198,9 +204,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Employment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Employment,
+ parse_obj_as(
+ type_=Employment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -287,13 +299,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employments.list()
+
+
+ async def main() -> None:
+ await client.hris.employments.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/employments",
@@ -316,9 +336,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedEmploymentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedEmploymentList,
+ parse_obj_as(
+ type_=PaginatedEmploymentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -363,15 +389,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.employments.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.employments.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/employments/{jsonable_encoder(id)}",
@@ -384,9 +418,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Employment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Employment,
+ parse_obj_as(
+ type_=Employment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/employments/types/employments_list_request_expand.py b/src/merge/resources/hris/resources/employments/types/employments_list_request_expand.py
index f123ef47..65920738 100644
--- a/src/merge/resources/hris/resources/employments/types/employments_list_request_expand.py
+++ b/src/merge/resources/hris/resources/employments/types/employments_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentsListRequestExpand(str, enum.Enum):
- EMPLOYEE = "employee"
- EMPLOYEE_PAY_GROUP = "employee,pay_group"
- PAY_GROUP = "pay_group"
-
- def visit(
- self,
- employee: typing.Callable[[], T_Result],
- employee_pay_group: typing.Callable[[], T_Result],
- pay_group: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentsListRequestExpand.EMPLOYEE:
- return employee()
- if self is EmploymentsListRequestExpand.EMPLOYEE_PAY_GROUP:
- return employee_pay_group()
- if self is EmploymentsListRequestExpand.PAY_GROUP:
- return pay_group()
+EmploymentsListRequestExpand = typing.Union[typing.Literal["employee", "employee,pay_group", "pay_group"], typing.Any]
diff --git a/src/merge/resources/hris/resources/employments/types/employments_list_request_order_by.py b/src/merge/resources/hris/resources/employments/types/employments_list_request_order_by.py
index 4d1fe86f..69d148d9 100644
--- a/src/merge/resources/hris/resources/employments/types/employments_list_request_order_by.py
+++ b/src/merge/resources/hris/resources/employments/types/employments_list_request_order_by.py
@@ -1,21 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentsListRequestOrderBy(str, enum.Enum):
- EFFECTIVE_DATE_DESCENDING = "-effective_date"
- EFFECTIVE_DATE_ASCENDING = "effective_date"
-
- def visit(
- self,
- effective_date_descending: typing.Callable[[], T_Result],
- effective_date_ascending: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentsListRequestOrderBy.EFFECTIVE_DATE_DESCENDING:
- return effective_date_descending()
- if self is EmploymentsListRequestOrderBy.EFFECTIVE_DATE_ASCENDING:
- return effective_date_ascending()
+EmploymentsListRequestOrderBy = typing.Union[typing.Literal["-effective_date", "effective_date"], typing.Any]
diff --git a/src/merge/resources/hris/resources/employments/types/employments_list_request_remote_fields.py b/src/merge/resources/hris/resources/employments/types/employments_list_request_remote_fields.py
index b8b35640..9e3fcec4 100644
--- a/src/merge/resources/hris/resources/employments/types/employments_list_request_remote_fields.py
+++ b/src/merge/resources/hris/resources/employments/types/employments_list_request_remote_fields.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentsListRequestRemoteFields(str, enum.Enum):
- EMPLOYMENT_TYPE = "employment_type"
- EMPLOYMENT_TYPE_FLSA_STATUS = "employment_type,flsa_status"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY = "employment_type,flsa_status,pay_frequency"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD = "employment_type,flsa_status,pay_frequency,pay_period"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_PERIOD = "employment_type,flsa_status,pay_period"
- EMPLOYMENT_TYPE_PAY_FREQUENCY = "employment_type,pay_frequency"
- EMPLOYMENT_TYPE_PAY_FREQUENCY_PAY_PERIOD = "employment_type,pay_frequency,pay_period"
- EMPLOYMENT_TYPE_PAY_PERIOD = "employment_type,pay_period"
- FLSA_STATUS = "flsa_status"
- FLSA_STATUS_PAY_FREQUENCY = "flsa_status,pay_frequency"
- FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD = "flsa_status,pay_frequency,pay_period"
- FLSA_STATUS_PAY_PERIOD = "flsa_status,pay_period"
- PAY_FREQUENCY = "pay_frequency"
- PAY_FREQUENCY_PAY_PERIOD = "pay_frequency,pay_period"
- PAY_PERIOD = "pay_period"
-
- def visit(
- self,
- employment_type: typing.Callable[[], T_Result],
- employment_type_flsa_status: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_frequency: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_frequency_pay_period: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_period: typing.Callable[[], T_Result],
- employment_type_pay_frequency: typing.Callable[[], T_Result],
- employment_type_pay_frequency_pay_period: typing.Callable[[], T_Result],
- employment_type_pay_period: typing.Callable[[], T_Result],
- flsa_status: typing.Callable[[], T_Result],
- flsa_status_pay_frequency: typing.Callable[[], T_Result],
- flsa_status_pay_frequency_pay_period: typing.Callable[[], T_Result],
- flsa_status_pay_period: typing.Callable[[], T_Result],
- pay_frequency: typing.Callable[[], T_Result],
- pay_frequency_pay_period: typing.Callable[[], T_Result],
- pay_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE:
- return employment_type()
- if self is EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE_FLSA_STATUS:
- return employment_type_flsa_status()
- if self is EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY:
- return employment_type_flsa_status_pay_frequency()
- if self is EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD:
- return employment_type_flsa_status_pay_frequency_pay_period()
- if self is EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_PERIOD:
- return employment_type_flsa_status_pay_period()
- if self is EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE_PAY_FREQUENCY:
- return employment_type_pay_frequency()
- if self is EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE_PAY_FREQUENCY_PAY_PERIOD:
- return employment_type_pay_frequency_pay_period()
- if self is EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE_PAY_PERIOD:
- return employment_type_pay_period()
- if self is EmploymentsListRequestRemoteFields.FLSA_STATUS:
- return flsa_status()
- if self is EmploymentsListRequestRemoteFields.FLSA_STATUS_PAY_FREQUENCY:
- return flsa_status_pay_frequency()
- if self is EmploymentsListRequestRemoteFields.FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD:
- return flsa_status_pay_frequency_pay_period()
- if self is EmploymentsListRequestRemoteFields.FLSA_STATUS_PAY_PERIOD:
- return flsa_status_pay_period()
- if self is EmploymentsListRequestRemoteFields.PAY_FREQUENCY:
- return pay_frequency()
- if self is EmploymentsListRequestRemoteFields.PAY_FREQUENCY_PAY_PERIOD:
- return pay_frequency_pay_period()
- if self is EmploymentsListRequestRemoteFields.PAY_PERIOD:
- return pay_period()
+EmploymentsListRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "employment_type",
+ "employment_type,flsa_status",
+ "employment_type,flsa_status,pay_frequency",
+ "employment_type,flsa_status,pay_frequency,pay_period",
+ "employment_type,flsa_status,pay_period",
+ "employment_type,pay_frequency",
+ "employment_type,pay_frequency,pay_period",
+ "employment_type,pay_period",
+ "flsa_status",
+ "flsa_status,pay_frequency",
+ "flsa_status,pay_frequency,pay_period",
+ "flsa_status,pay_period",
+ "pay_frequency",
+ "pay_frequency,pay_period",
+ "pay_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employments/types/employments_list_request_show_enum_origins.py b/src/merge/resources/hris/resources/employments/types/employments_list_request_show_enum_origins.py
index 023d425b..f4e2015f 100644
--- a/src/merge/resources/hris/resources/employments/types/employments_list_request_show_enum_origins.py
+++ b/src/merge/resources/hris/resources/employments/types/employments_list_request_show_enum_origins.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentsListRequestShowEnumOrigins(str, enum.Enum):
- EMPLOYMENT_TYPE = "employment_type"
- EMPLOYMENT_TYPE_FLSA_STATUS = "employment_type,flsa_status"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY = "employment_type,flsa_status,pay_frequency"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD = "employment_type,flsa_status,pay_frequency,pay_period"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_PERIOD = "employment_type,flsa_status,pay_period"
- EMPLOYMENT_TYPE_PAY_FREQUENCY = "employment_type,pay_frequency"
- EMPLOYMENT_TYPE_PAY_FREQUENCY_PAY_PERIOD = "employment_type,pay_frequency,pay_period"
- EMPLOYMENT_TYPE_PAY_PERIOD = "employment_type,pay_period"
- FLSA_STATUS = "flsa_status"
- FLSA_STATUS_PAY_FREQUENCY = "flsa_status,pay_frequency"
- FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD = "flsa_status,pay_frequency,pay_period"
- FLSA_STATUS_PAY_PERIOD = "flsa_status,pay_period"
- PAY_FREQUENCY = "pay_frequency"
- PAY_FREQUENCY_PAY_PERIOD = "pay_frequency,pay_period"
- PAY_PERIOD = "pay_period"
-
- def visit(
- self,
- employment_type: typing.Callable[[], T_Result],
- employment_type_flsa_status: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_frequency: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_frequency_pay_period: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_period: typing.Callable[[], T_Result],
- employment_type_pay_frequency: typing.Callable[[], T_Result],
- employment_type_pay_frequency_pay_period: typing.Callable[[], T_Result],
- employment_type_pay_period: typing.Callable[[], T_Result],
- flsa_status: typing.Callable[[], T_Result],
- flsa_status_pay_frequency: typing.Callable[[], T_Result],
- flsa_status_pay_frequency_pay_period: typing.Callable[[], T_Result],
- flsa_status_pay_period: typing.Callable[[], T_Result],
- pay_frequency: typing.Callable[[], T_Result],
- pay_frequency_pay_period: typing.Callable[[], T_Result],
- pay_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE:
- return employment_type()
- if self is EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE_FLSA_STATUS:
- return employment_type_flsa_status()
- if self is EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY:
- return employment_type_flsa_status_pay_frequency()
- if self is EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD:
- return employment_type_flsa_status_pay_frequency_pay_period()
- if self is EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_PERIOD:
- return employment_type_flsa_status_pay_period()
- if self is EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE_PAY_FREQUENCY:
- return employment_type_pay_frequency()
- if self is EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE_PAY_FREQUENCY_PAY_PERIOD:
- return employment_type_pay_frequency_pay_period()
- if self is EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE_PAY_PERIOD:
- return employment_type_pay_period()
- if self is EmploymentsListRequestShowEnumOrigins.FLSA_STATUS:
- return flsa_status()
- if self is EmploymentsListRequestShowEnumOrigins.FLSA_STATUS_PAY_FREQUENCY:
- return flsa_status_pay_frequency()
- if self is EmploymentsListRequestShowEnumOrigins.FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD:
- return flsa_status_pay_frequency_pay_period()
- if self is EmploymentsListRequestShowEnumOrigins.FLSA_STATUS_PAY_PERIOD:
- return flsa_status_pay_period()
- if self is EmploymentsListRequestShowEnumOrigins.PAY_FREQUENCY:
- return pay_frequency()
- if self is EmploymentsListRequestShowEnumOrigins.PAY_FREQUENCY_PAY_PERIOD:
- return pay_frequency_pay_period()
- if self is EmploymentsListRequestShowEnumOrigins.PAY_PERIOD:
- return pay_period()
+EmploymentsListRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "employment_type",
+ "employment_type,flsa_status",
+ "employment_type,flsa_status,pay_frequency",
+ "employment_type,flsa_status,pay_frequency,pay_period",
+ "employment_type,flsa_status,pay_period",
+ "employment_type,pay_frequency",
+ "employment_type,pay_frequency,pay_period",
+ "employment_type,pay_period",
+ "flsa_status",
+ "flsa_status,pay_frequency",
+ "flsa_status,pay_frequency,pay_period",
+ "flsa_status,pay_period",
+ "pay_frequency",
+ "pay_frequency,pay_period",
+ "pay_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_expand.py b/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_expand.py
index 98db9ac2..30d83a74 100644
--- a/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_expand.py
+++ b/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_expand.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentsRetrieveRequestExpand(str, enum.Enum):
- EMPLOYEE = "employee"
- EMPLOYEE_PAY_GROUP = "employee,pay_group"
- PAY_GROUP = "pay_group"
-
- def visit(
- self,
- employee: typing.Callable[[], T_Result],
- employee_pay_group: typing.Callable[[], T_Result],
- pay_group: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentsRetrieveRequestExpand.EMPLOYEE:
- return employee()
- if self is EmploymentsRetrieveRequestExpand.EMPLOYEE_PAY_GROUP:
- return employee_pay_group()
- if self is EmploymentsRetrieveRequestExpand.PAY_GROUP:
- return pay_group()
+EmploymentsRetrieveRequestExpand = typing.Union[
+ typing.Literal["employee", "employee,pay_group", "pay_group"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_remote_fields.py b/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_remote_fields.py
index b54db8d1..f67dec0b 100644
--- a/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_remote_fields.py
+++ b/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_remote_fields.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentsRetrieveRequestRemoteFields(str, enum.Enum):
- EMPLOYMENT_TYPE = "employment_type"
- EMPLOYMENT_TYPE_FLSA_STATUS = "employment_type,flsa_status"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY = "employment_type,flsa_status,pay_frequency"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD = "employment_type,flsa_status,pay_frequency,pay_period"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_PERIOD = "employment_type,flsa_status,pay_period"
- EMPLOYMENT_TYPE_PAY_FREQUENCY = "employment_type,pay_frequency"
- EMPLOYMENT_TYPE_PAY_FREQUENCY_PAY_PERIOD = "employment_type,pay_frequency,pay_period"
- EMPLOYMENT_TYPE_PAY_PERIOD = "employment_type,pay_period"
- FLSA_STATUS = "flsa_status"
- FLSA_STATUS_PAY_FREQUENCY = "flsa_status,pay_frequency"
- FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD = "flsa_status,pay_frequency,pay_period"
- FLSA_STATUS_PAY_PERIOD = "flsa_status,pay_period"
- PAY_FREQUENCY = "pay_frequency"
- PAY_FREQUENCY_PAY_PERIOD = "pay_frequency,pay_period"
- PAY_PERIOD = "pay_period"
-
- def visit(
- self,
- employment_type: typing.Callable[[], T_Result],
- employment_type_flsa_status: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_frequency: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_frequency_pay_period: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_period: typing.Callable[[], T_Result],
- employment_type_pay_frequency: typing.Callable[[], T_Result],
- employment_type_pay_frequency_pay_period: typing.Callable[[], T_Result],
- employment_type_pay_period: typing.Callable[[], T_Result],
- flsa_status: typing.Callable[[], T_Result],
- flsa_status_pay_frequency: typing.Callable[[], T_Result],
- flsa_status_pay_frequency_pay_period: typing.Callable[[], T_Result],
- flsa_status_pay_period: typing.Callable[[], T_Result],
- pay_frequency: typing.Callable[[], T_Result],
- pay_frequency_pay_period: typing.Callable[[], T_Result],
- pay_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE:
- return employment_type()
- if self is EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE_FLSA_STATUS:
- return employment_type_flsa_status()
- if self is EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY:
- return employment_type_flsa_status_pay_frequency()
- if self is EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD:
- return employment_type_flsa_status_pay_frequency_pay_period()
- if self is EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_PERIOD:
- return employment_type_flsa_status_pay_period()
- if self is EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE_PAY_FREQUENCY:
- return employment_type_pay_frequency()
- if self is EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE_PAY_FREQUENCY_PAY_PERIOD:
- return employment_type_pay_frequency_pay_period()
- if self is EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE_PAY_PERIOD:
- return employment_type_pay_period()
- if self is EmploymentsRetrieveRequestRemoteFields.FLSA_STATUS:
- return flsa_status()
- if self is EmploymentsRetrieveRequestRemoteFields.FLSA_STATUS_PAY_FREQUENCY:
- return flsa_status_pay_frequency()
- if self is EmploymentsRetrieveRequestRemoteFields.FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD:
- return flsa_status_pay_frequency_pay_period()
- if self is EmploymentsRetrieveRequestRemoteFields.FLSA_STATUS_PAY_PERIOD:
- return flsa_status_pay_period()
- if self is EmploymentsRetrieveRequestRemoteFields.PAY_FREQUENCY:
- return pay_frequency()
- if self is EmploymentsRetrieveRequestRemoteFields.PAY_FREQUENCY_PAY_PERIOD:
- return pay_frequency_pay_period()
- if self is EmploymentsRetrieveRequestRemoteFields.PAY_PERIOD:
- return pay_period()
+EmploymentsRetrieveRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "employment_type",
+ "employment_type,flsa_status",
+ "employment_type,flsa_status,pay_frequency",
+ "employment_type,flsa_status,pay_frequency,pay_period",
+ "employment_type,flsa_status,pay_period",
+ "employment_type,pay_frequency",
+ "employment_type,pay_frequency,pay_period",
+ "employment_type,pay_period",
+ "flsa_status",
+ "flsa_status,pay_frequency",
+ "flsa_status,pay_frequency,pay_period",
+ "flsa_status,pay_period",
+ "pay_frequency",
+ "pay_frequency,pay_period",
+ "pay_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_show_enum_origins.py b/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_show_enum_origins.py
index 60ec6042..f0b14975 100644
--- a/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/hris/resources/employments/types/employments_retrieve_request_show_enum_origins.py
@@ -1,73 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentsRetrieveRequestShowEnumOrigins(str, enum.Enum):
- EMPLOYMENT_TYPE = "employment_type"
- EMPLOYMENT_TYPE_FLSA_STATUS = "employment_type,flsa_status"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY = "employment_type,flsa_status,pay_frequency"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD = "employment_type,flsa_status,pay_frequency,pay_period"
- EMPLOYMENT_TYPE_FLSA_STATUS_PAY_PERIOD = "employment_type,flsa_status,pay_period"
- EMPLOYMENT_TYPE_PAY_FREQUENCY = "employment_type,pay_frequency"
- EMPLOYMENT_TYPE_PAY_FREQUENCY_PAY_PERIOD = "employment_type,pay_frequency,pay_period"
- EMPLOYMENT_TYPE_PAY_PERIOD = "employment_type,pay_period"
- FLSA_STATUS = "flsa_status"
- FLSA_STATUS_PAY_FREQUENCY = "flsa_status,pay_frequency"
- FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD = "flsa_status,pay_frequency,pay_period"
- FLSA_STATUS_PAY_PERIOD = "flsa_status,pay_period"
- PAY_FREQUENCY = "pay_frequency"
- PAY_FREQUENCY_PAY_PERIOD = "pay_frequency,pay_period"
- PAY_PERIOD = "pay_period"
-
- def visit(
- self,
- employment_type: typing.Callable[[], T_Result],
- employment_type_flsa_status: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_frequency: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_frequency_pay_period: typing.Callable[[], T_Result],
- employment_type_flsa_status_pay_period: typing.Callable[[], T_Result],
- employment_type_pay_frequency: typing.Callable[[], T_Result],
- employment_type_pay_frequency_pay_period: typing.Callable[[], T_Result],
- employment_type_pay_period: typing.Callable[[], T_Result],
- flsa_status: typing.Callable[[], T_Result],
- flsa_status_pay_frequency: typing.Callable[[], T_Result],
- flsa_status_pay_frequency_pay_period: typing.Callable[[], T_Result],
- flsa_status_pay_period: typing.Callable[[], T_Result],
- pay_frequency: typing.Callable[[], T_Result],
- pay_frequency_pay_period: typing.Callable[[], T_Result],
- pay_period: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE:
- return employment_type()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE_FLSA_STATUS:
- return employment_type_flsa_status()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY:
- return employment_type_flsa_status_pay_frequency()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD:
- return employment_type_flsa_status_pay_frequency_pay_period()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE_FLSA_STATUS_PAY_PERIOD:
- return employment_type_flsa_status_pay_period()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE_PAY_FREQUENCY:
- return employment_type_pay_frequency()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE_PAY_FREQUENCY_PAY_PERIOD:
- return employment_type_pay_frequency_pay_period()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE_PAY_PERIOD:
- return employment_type_pay_period()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.FLSA_STATUS:
- return flsa_status()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.FLSA_STATUS_PAY_FREQUENCY:
- return flsa_status_pay_frequency()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.FLSA_STATUS_PAY_FREQUENCY_PAY_PERIOD:
- return flsa_status_pay_frequency_pay_period()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.FLSA_STATUS_PAY_PERIOD:
- return flsa_status_pay_period()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.PAY_FREQUENCY:
- return pay_frequency()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.PAY_FREQUENCY_PAY_PERIOD:
- return pay_frequency_pay_period()
- if self is EmploymentsRetrieveRequestShowEnumOrigins.PAY_PERIOD:
- return pay_period()
+EmploymentsRetrieveRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "employment_type",
+ "employment_type,flsa_status",
+ "employment_type,flsa_status,pay_frequency",
+ "employment_type,flsa_status,pay_frequency,pay_period",
+ "employment_type,flsa_status,pay_period",
+ "employment_type,pay_frequency",
+ "employment_type,pay_frequency,pay_period",
+ "employment_type,pay_period",
+ "flsa_status",
+ "flsa_status,pay_frequency",
+ "flsa_status,pay_frequency,pay_period",
+ "flsa_status,pay_period",
+ "pay_frequency",
+ "pay_frequency,pay_period",
+ "pay_period",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/field_mapping/client.py b/src/merge/resources/hris/resources/field_mapping/client.py
index 5b6d9dbd..31a8b727 100644
--- a/src/merge/resources/hris/resources/field_mapping/client.py
+++ b/src/merge/resources/hris/resources/field_mapping/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
-from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
from ...types.field_mapping_api_instance_response import FieldMappingApiInstanceResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.field_mapping_instance_response import FieldMappingInstanceResponse
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.remote_field_api_response import RemoteFieldApiResponse
+from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -39,7 +39,7 @@ def field_mappings_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,11 +48,19 @@ def field_mappings_retrieve(
client.hris.field_mapping.field_mappings_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/field-mappings", method="GET", request_options=request_options
+ "hris/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -63,7 +71,7 @@ def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -80,7 +88,7 @@ def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -102,7 +110,7 @@ def field_mappings_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -131,9 +139,15 @@ def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -159,7 +173,7 @@ def field_mappings_destroy(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -174,9 +188,15 @@ def field_mappings_destroy(
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,7 +206,7 @@ def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -198,7 +218,7 @@ def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -217,7 +237,7 @@ def field_mappings_partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -238,9 +258,15 @@ def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -274,7 +300,7 @@ def remote_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -285,12 +311,21 @@ def remote_fields_retrieve(
_response = self._client_wrapper.httpx_client.request(
"hris/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -314,7 +349,7 @@ def target_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -323,11 +358,19 @@ def target_fields_retrieve(
client.hris.field_mapping.target_fields_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/target-fields", method="GET", request_options=request_options
+ "hris/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -356,20 +399,36 @@ async def field_mappings_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.field_mapping.field_mappings_retrieve()
+
+
+ async def main() -> None:
+ await client.hris.field_mapping.field_mappings_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/field-mappings", method="GET", request_options=request_options
+ "hris/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -380,7 +439,7 @@ async def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -397,7 +456,7 @@ async def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -419,20 +478,28 @@ async def field_mappings_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.field_mapping.field_mappings_create(
- target_field_name="example_target_field_name",
- target_field_description="this is a example description of the target field",
- remote_field_traversal_path=["example_remote_field"],
- remote_method="GET",
- remote_url_path="/example-url-path",
- common_model_name="ExampleCommonModel",
- )
+
+
+ async def main() -> None:
+ await client.hris.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/field-mappings",
@@ -448,9 +515,15 @@ async def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -476,24 +549,38 @@ async def field_mappings_destroy(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.field_mapping.field_mappings_destroy(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.hris.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -503,7 +590,7 @@ async def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -515,7 +602,7 @@ async def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -534,15 +621,23 @@ async def field_mappings_partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.field_mapping.field_mappings_partial_update(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.hris.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
@@ -555,9 +650,15 @@ async def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -591,23 +692,40 @@ async def remote_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.field_mapping.remote_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.hris.field_mapping.remote_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -631,20 +749,36 @@ async def target_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.field_mapping.target_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.hris.field_mapping.target_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/target-fields", method="GET", request_options=request_options
+ "hris/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/force_resync/client.py b/src/merge/resources/hris/resources/force_resync/client.py
index 8d591b64..5be88fbf 100644
--- a/src/merge/resources/hris/resources/force_resync/client.py
+++ b/src/merge/resources/hris/resources/force_resync/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.sync_status import SyncStatus
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class ForceResyncClient:
@@ -32,7 +32,7 @@ def sync_status_resync_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -41,11 +41,19 @@ def sync_status_resync_create(
client.hris.force_resync.sync_status_resync_create()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/sync-status/resync", method="POST", request_options=request_options
+ "hris/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,20 +82,36 @@ async def sync_status_resync_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.force_resync.sync_status_resync_create()
+
+
+ async def main() -> None:
+ await client.hris.force_resync.sync_status_resync_create()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/sync-status/resync", method="POST", request_options=request_options
+ "hris/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/generate_key/client.py b/src/merge/resources/hris/resources/generate_key/client.py
index 2304c5e0..915194d4 100644
--- a/src/merge/resources/hris/resources/generate_key/client.py
+++ b/src/merge/resources/hris/resources/generate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,11 +47,23 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "hris/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,22 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.generate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.hris.generate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "hris/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/groups/client.py b/src/merge/resources/hris/resources/groups/client.py
index 79f59371..670a3e92 100644
--- a/src/merge/resources/hris/resources/groups/client.py
+++ b/src/merge/resources/hris/resources/groups/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_group_list import PaginatedGroupList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.group import Group
-from ...types.paginated_group_list import PaginatedGroupList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class GroupsClient:
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -123,9 +123,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedGroupList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedGroupList,
+ parse_obj_as(
+ type_=PaginatedGroupList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -166,7 +172,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -186,9 +192,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Group, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Group,
+ parse_obj_as(
+ type_=Group, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -275,13 +287,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.groups.list()
+
+
+ async def main() -> None:
+ await client.hris.groups.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/groups",
@@ -304,9 +324,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedGroupList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedGroupList,
+ parse_obj_as(
+ type_=PaginatedGroupList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -347,15 +373,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.groups.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.groups.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/groups/{jsonable_encoder(id)}",
@@ -367,9 +401,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Group, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Group,
+ parse_obj_as(
+ type_=Group, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/issues/client.py b/src/merge/resources/hris/resources/issues/client.py
index 28348a38..b19c0412 100644
--- a/src/merge/resources/hris/resources/issues/client.py
+++ b/src/merge/resources/hris/resources/issues/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_issue_list import PaginatedIssueList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.issue import Issue
-from ...types.paginated_issue_list import PaginatedIssueList
-from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class IssuesClient:
@@ -95,7 +95,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -132,9 +132,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -158,7 +164,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -169,11 +175,19 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"hris/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"hris/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -260,13 +274,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.issues.list()
+
+
+ async def main() -> None:
+ await client.hris.issues.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/issues",
@@ -297,9 +319,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -323,22 +351,38 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.issues.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.issues.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"hris/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"hris/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/issues/types/issues_list_request_status.py b/src/merge/resources/hris/resources/issues/types/issues_list_request_status.py
index 2bd3521e..3886423c 100644
--- a/src/merge/resources/hris/resources/issues/types/issues_list_request_status.py
+++ b/src/merge/resources/hris/resources/issues/types/issues_list_request_status.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssuesListRequestStatus(str, enum.Enum):
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssuesListRequestStatus.ONGOING:
- return ongoing()
- if self is IssuesListRequestStatus.RESOLVED:
- return resolved()
+IssuesListRequestStatus = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/hris/resources/link_token/client.py b/src/merge/resources/hris/resources/link_token/client.py
index b083b2ca..4749278e 100644
--- a/src/merge/resources/hris/resources/link_token/client.py
+++ b/src/merge/resources/hris/resources/link_token/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.categories_enum import CategoriesEnum
from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.request_options import RequestOptions
from ...types.link_token import LinkToken
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,8 +36,8 @@ def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -77,7 +77,7 @@ def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -90,8 +90,7 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.hris import CategoriesEnum
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,7 +100,7 @@ def create(
end_user_email_address="example@gmail.com",
end_user_organization_name="Test Organization",
end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
+ categories=["hris", "ats"],
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -124,9 +123,15 @@ def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,8 +158,8 @@ async def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -194,7 +199,7 @@ async def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -207,19 +212,26 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.hris import CategoriesEnum
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.link_token.create(
- end_user_email_address="example@gmail.com",
- end_user_organization_name="Test Organization",
- end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
- )
+
+
+ async def main() -> None:
+ await client.hris.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/link-token",
@@ -241,9 +253,15 @@ async def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/linked_accounts/client.py b/src/merge/resources/hris/resources/linked_accounts/client.py
index 58bd0f72..60e0e5ba 100644
--- a/src/merge/resources/hris/resources/linked_accounts/client.py
+++ b/src/merge/resources/hris/resources/linked_accounts/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
from .....core.request_options import RequestOptions
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
-from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class LinkedAccountsClient:
@@ -31,7 +31,7 @@ def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -122,9 +122,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -151,7 +157,7 @@ async def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -214,13 +220,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.linked_accounts.list()
+
+
+ async def main() -> None:
+ await client.hris.linked_accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/linked-accounts",
@@ -242,9 +256,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/linked_accounts/types/linked_accounts_list_request_category.py b/src/merge/resources/hris/resources/linked_accounts/types/linked_accounts_list_request_category.py
index bd873ea8..531279d5 100644
--- a/src/merge/resources/hris/resources/linked_accounts/types/linked_accounts_list_request_category.py
+++ b/src/merge/resources/hris/resources/linked_accounts/types/linked_accounts_list_request_category.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LinkedAccountsListRequestCategory(str, enum.Enum):
- ACCOUNTING = "accounting"
- ATS = "ats"
- CRM = "crm"
- FILESTORAGE = "filestorage"
- HRIS = "hris"
- MKTG = "mktg"
- TICKETING = "ticketing"
-
- def visit(
- self,
- accounting: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- hris: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is LinkedAccountsListRequestCategory.ACCOUNTING:
- return accounting()
- if self is LinkedAccountsListRequestCategory.ATS:
- return ats()
- if self is LinkedAccountsListRequestCategory.CRM:
- return crm()
- if self is LinkedAccountsListRequestCategory.FILESTORAGE:
- return filestorage()
- if self is LinkedAccountsListRequestCategory.HRIS:
- return hris()
- if self is LinkedAccountsListRequestCategory.MKTG:
- return mktg()
- if self is LinkedAccountsListRequestCategory.TICKETING:
- return ticketing()
+LinkedAccountsListRequestCategory = typing.Union[
+ typing.Literal["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/locations/client.py b/src/merge/resources/hris/resources/locations/client.py
index be88581a..4f9a226f 100644
--- a/src/merge/resources/hris/resources/locations/client.py
+++ b/src/merge/resources/hris/resources/locations/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .types.locations_list_request_location_type import LocationsListRequestLocationType
+from .....core.request_options import RequestOptions
+from ...types.paginated_location_list import PaginatedLocationList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.location import Location
-from ...types.paginated_location_list import PaginatedLocationList
-from .types.locations_list_request_location_type import LocationsListRequestLocationType
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class LocationsClient:
@@ -90,7 +90,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -117,9 +117,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedLocationList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedLocationList,
+ parse_obj_as(
+ type_=PaginatedLocationList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -160,7 +166,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -180,9 +186,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Location, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Location,
+ parse_obj_as(
+ type_=Location, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -264,13 +276,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.locations.list()
+
+
+ async def main() -> None:
+ await client.hris.locations.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/locations",
@@ -291,9 +311,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedLocationList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedLocationList,
+ parse_obj_as(
+ type_=PaginatedLocationList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -334,15 +360,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.locations.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.locations.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/locations/{jsonable_encoder(id)}",
@@ -354,9 +388,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Location, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Location,
+ parse_obj_as(
+ type_=Location, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/locations/types/locations_list_request_location_type.py b/src/merge/resources/hris/resources/locations/types/locations_list_request_location_type.py
index b24d33e7..d54d33d3 100644
--- a/src/merge/resources/hris/resources/locations/types/locations_list_request_location_type.py
+++ b/src/merge/resources/hris/resources/locations/types/locations_list_request_location_type.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LocationsListRequestLocationType(str, enum.Enum):
- HOME = "HOME"
- WORK = "WORK"
-
- def visit(self, home: typing.Callable[[], T_Result], work: typing.Callable[[], T_Result]) -> T_Result:
- if self is LocationsListRequestLocationType.HOME:
- return home()
- if self is LocationsListRequestLocationType.WORK:
- return work()
+LocationsListRequestLocationType = typing.Union[typing.Literal["HOME", "WORK"], typing.Any]
diff --git a/src/merge/resources/hris/resources/passthrough/client.py b/src/merge/resources/hris/resources/passthrough/client.py
index 063bb68f..2695037d 100644
--- a/src/merge/resources/hris/resources/passthrough/client.py
+++ b/src/merge/resources/hris/resources/passthrough/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.request_options import RequestOptions
from ...types.remote_response import RemoteResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -38,8 +38,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.hris import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.hris import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,17 +47,27 @@ def create(
)
client.hris.passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "hris/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -88,26 +98,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.hris import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.hris import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.hris.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "hris/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/pay_groups/client.py b/src/merge/resources/hris/resources/pay_groups/client.py
index 755204f2..f157833c 100644
--- a/src/merge/resources/hris/resources/pay_groups/client.py
+++ b/src/merge/resources/hris/resources/pay_groups/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_pay_group_list import PaginatedPayGroupList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.pay_group import PayGroup
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class PayGroupsClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedPayGroupList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedPayGroupList,
+ parse_obj_as(
+ type_=PaginatedPayGroupList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/pay-groups/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PayGroup, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PayGroup,
+ parse_obj_as(
+ type_=PayGroup, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.pay_groups.list()
+
+
+ async def main() -> None:
+ await client.hris.pay_groups.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/pay-groups",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedPayGroupList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedPayGroupList,
+ parse_obj_as(
+ type_=PaginatedPayGroupList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.pay_groups.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.pay_groups.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/pay-groups/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PayGroup, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PayGroup,
+ parse_obj_as(
+ type_=PayGroup, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/payroll_runs/client.py b/src/merge/resources/hris/resources/payroll_runs/client.py
index 4f731aaa..33ac3320 100644
--- a/src/merge/resources/hris/resources/payroll_runs/client.py
+++ b/src/merge/resources/hris/resources/payroll_runs/client.py
@@ -1,22 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.paginated_payroll_run_list import PaginatedPayrollRunList
-from ...types.payroll_run import PayrollRun
+import datetime as dt
from .types.payroll_runs_list_request_remote_fields import PayrollRunsListRequestRemoteFields
from .types.payroll_runs_list_request_run_type import PayrollRunsListRequestRunType
from .types.payroll_runs_list_request_show_enum_origins import PayrollRunsListRequestShowEnumOrigins
+from .....core.request_options import RequestOptions
+from ...types.paginated_payroll_run_list import PaginatedPayrollRunList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.payroll_runs_retrieve_request_remote_fields import PayrollRunsRetrieveRequestRemoteFields
from .types.payroll_runs_retrieve_request_show_enum_origins import PayrollRunsRetrieveRequestShowEnumOrigins
+from ...types.payroll_run import PayrollRun
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class PayrollRunsClient:
@@ -113,7 +113,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -144,9 +144,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedPayrollRunList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedPayrollRunList,
+ parse_obj_as(
+ type_=PaginatedPayrollRunList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -187,7 +193,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -207,9 +213,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PayrollRun, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PayrollRun,
+ parse_obj_as(
+ type_=PayrollRun, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -310,13 +322,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.payroll_runs.list()
+
+
+ async def main() -> None:
+ await client.hris.payroll_runs.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/payroll-runs",
@@ -341,9 +361,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedPayrollRunList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedPayrollRunList,
+ parse_obj_as(
+ type_=PaginatedPayrollRunList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -384,15 +410,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.payroll_runs.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.payroll_runs.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/payroll-runs/{jsonable_encoder(id)}",
@@ -404,9 +438,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PayrollRun, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PayrollRun,
+ parse_obj_as(
+ type_=PayrollRun, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_remote_fields.py b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_remote_fields.py
index 7ab87d64..36f49be1 100644
--- a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_remote_fields.py
+++ b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_remote_fields.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PayrollRunsListRequestRemoteFields(str, enum.Enum):
- RUN_STATE = "run_state"
- RUN_STATE_RUN_TYPE = "run_state,run_type"
- RUN_TYPE = "run_type"
-
- def visit(
- self,
- run_state: typing.Callable[[], T_Result],
- run_state_run_type: typing.Callable[[], T_Result],
- run_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PayrollRunsListRequestRemoteFields.RUN_STATE:
- return run_state()
- if self is PayrollRunsListRequestRemoteFields.RUN_STATE_RUN_TYPE:
- return run_state_run_type()
- if self is PayrollRunsListRequestRemoteFields.RUN_TYPE:
- return run_type()
+PayrollRunsListRequestRemoteFields = typing.Union[
+ typing.Literal["run_state", "run_state,run_type", "run_type"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_run_type.py b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_run_type.py
index 0a8acc2a..a7001ba2 100644
--- a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_run_type.py
+++ b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_run_type.py
@@ -1,33 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PayrollRunsListRequestRunType(str, enum.Enum):
- CORRECTION = "CORRECTION"
- OFF_CYCLE = "OFF_CYCLE"
- REGULAR = "REGULAR"
- SIGN_ON_BONUS = "SIGN_ON_BONUS"
- TERMINATION = "TERMINATION"
-
- def visit(
- self,
- correction: typing.Callable[[], T_Result],
- off_cycle: typing.Callable[[], T_Result],
- regular: typing.Callable[[], T_Result],
- sign_on_bonus: typing.Callable[[], T_Result],
- termination: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PayrollRunsListRequestRunType.CORRECTION:
- return correction()
- if self is PayrollRunsListRequestRunType.OFF_CYCLE:
- return off_cycle()
- if self is PayrollRunsListRequestRunType.REGULAR:
- return regular()
- if self is PayrollRunsListRequestRunType.SIGN_ON_BONUS:
- return sign_on_bonus()
- if self is PayrollRunsListRequestRunType.TERMINATION:
- return termination()
+PayrollRunsListRequestRunType = typing.Union[
+ typing.Literal["CORRECTION", "OFF_CYCLE", "REGULAR", "SIGN_ON_BONUS", "TERMINATION"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_show_enum_origins.py b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_show_enum_origins.py
index d4d03e13..af726ef2 100644
--- a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_show_enum_origins.py
+++ b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_list_request_show_enum_origins.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PayrollRunsListRequestShowEnumOrigins(str, enum.Enum):
- RUN_STATE = "run_state"
- RUN_STATE_RUN_TYPE = "run_state,run_type"
- RUN_TYPE = "run_type"
-
- def visit(
- self,
- run_state: typing.Callable[[], T_Result],
- run_state_run_type: typing.Callable[[], T_Result],
- run_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PayrollRunsListRequestShowEnumOrigins.RUN_STATE:
- return run_state()
- if self is PayrollRunsListRequestShowEnumOrigins.RUN_STATE_RUN_TYPE:
- return run_state_run_type()
- if self is PayrollRunsListRequestShowEnumOrigins.RUN_TYPE:
- return run_type()
+PayrollRunsListRequestShowEnumOrigins = typing.Union[
+ typing.Literal["run_state", "run_state,run_type", "run_type"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_retrieve_request_remote_fields.py b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_retrieve_request_remote_fields.py
index 3a3b0653..a9756782 100644
--- a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_retrieve_request_remote_fields.py
+++ b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_retrieve_request_remote_fields.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PayrollRunsRetrieveRequestRemoteFields(str, enum.Enum):
- RUN_STATE = "run_state"
- RUN_STATE_RUN_TYPE = "run_state,run_type"
- RUN_TYPE = "run_type"
-
- def visit(
- self,
- run_state: typing.Callable[[], T_Result],
- run_state_run_type: typing.Callable[[], T_Result],
- run_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PayrollRunsRetrieveRequestRemoteFields.RUN_STATE:
- return run_state()
- if self is PayrollRunsRetrieveRequestRemoteFields.RUN_STATE_RUN_TYPE:
- return run_state_run_type()
- if self is PayrollRunsRetrieveRequestRemoteFields.RUN_TYPE:
- return run_type()
+PayrollRunsRetrieveRequestRemoteFields = typing.Union[
+ typing.Literal["run_state", "run_state,run_type", "run_type"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_retrieve_request_show_enum_origins.py b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_retrieve_request_show_enum_origins.py
index ecc6fe99..af029e2c 100644
--- a/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/hris/resources/payroll_runs/types/payroll_runs_retrieve_request_show_enum_origins.py
@@ -1,25 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PayrollRunsRetrieveRequestShowEnumOrigins(str, enum.Enum):
- RUN_STATE = "run_state"
- RUN_STATE_RUN_TYPE = "run_state,run_type"
- RUN_TYPE = "run_type"
-
- def visit(
- self,
- run_state: typing.Callable[[], T_Result],
- run_state_run_type: typing.Callable[[], T_Result],
- run_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE:
- return run_state()
- if self is PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE_RUN_TYPE:
- return run_state_run_type()
- if self is PayrollRunsRetrieveRequestShowEnumOrigins.RUN_TYPE:
- return run_type()
+PayrollRunsRetrieveRequestShowEnumOrigins = typing.Union[
+ typing.Literal["run_state", "run_state,run_type", "run_type"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/regenerate_key/client.py b/src/merge/resources/hris/resources/regenerate_key/client.py
index a06628c1..60e32942 100644
--- a/src/merge/resources/hris/resources/regenerate_key/client.py
+++ b/src/merge/resources/hris/resources/regenerate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,11 +47,23 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/regenerate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "hris/v1/regenerate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,22 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.regenerate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.hris.regenerate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/regenerate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "hris/v1/regenerate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/scopes/client.py b/src/merge/resources/hris/resources/scopes/client.py
index d5aac689..88a301f8 100644
--- a/src/merge/resources/hris/resources/scopes/client.py
+++ b/src/merge/resources/hris/resources/scopes/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.common_model_scope_api import CommonModelScopeApi
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def default_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -45,11 +45,19 @@ def default_scopes_retrieve(
client.hris.scopes.default_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/default-scopes", method="GET", request_options=request_options
+ "hris/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -73,7 +81,7 @@ def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -82,11 +90,19 @@ def linked_account_scopes_retrieve(
client.hris.scopes.linked_account_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/linked-account-scopes", method="GET", request_options=request_options
+ "hris/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -96,7 +112,7 @@ def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -116,7 +132,7 @@ def linked_account_scopes_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.hris import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -153,13 +169,21 @@ def linked_account_scopes_create(
_response = self._client_wrapper.httpx_client.request(
"hris/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -188,20 +212,36 @@ async def default_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.scopes.default_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.hris.scopes.default_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/default-scopes", method="GET", request_options=request_options
+ "hris/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -225,20 +265,36 @@ async def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.scopes.linked_account_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.hris.scopes.linked_account_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/linked-account-scopes", method="GET", request_options=request_options
+ "hris/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -248,7 +304,7 @@ async def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -268,7 +324,9 @@ async def linked_account_scopes_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.hris import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -278,40 +336,54 @@ async def linked_account_scopes_create(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.scopes.linked_account_scopes_create(
- common_models=[
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Employee",
- model_permissions={
- "READ": ModelPermissionDeserializerRequest(
- is_enabled=True,
- ),
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- ),
- },
- ),
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Benefit",
- model_permissions={
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- )
- },
- ),
- ],
- )
+
+
+ async def main() -> None:
+ await client.hris.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/sync_status/client.py b/src/merge/resources/hris/resources/sync_status/client.py
index a1ab5a1b..18d89973 100644
--- a/src/merge/resources/hris/resources/sync_status/client.py
+++ b/src/merge/resources/hris/resources/sync_status/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_sync_status_list import PaginatedSyncStatusList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class SyncStatusClient:
@@ -19,7 +19,7 @@ def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -42,7 +42,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -53,12 +53,21 @@ def list(
_response = self._client_wrapper.httpx_client.request(
"hris/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,7 +83,7 @@ async def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -97,23 +106,40 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.sync_status.list()
+
+
+ async def main() -> None:
+ await client.hris.sync_status.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/teams/client.py b/src/merge/resources/hris/resources/teams/client.py
index b5fde795..0683e98e 100644
--- a/src/merge/resources/hris/resources/teams/client.py
+++ b/src/merge/resources/hris/resources/teams/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_team_list import PaginatedTeamList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.team import Team
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class TeamsClient:
@@ -82,7 +82,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -108,9 +108,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTeamList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTeamList,
+ parse_obj_as(
+ type_=PaginatedTeamList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -147,7 +153,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -160,12 +166,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/teams/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Team, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Team,
+ parse_obj_as(
+ type_=Team, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -240,13 +255,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.teams.list()
+
+
+ async def main() -> None:
+ await client.hris.teams.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/teams",
@@ -266,9 +289,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTeamList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTeamList,
+ parse_obj_as(
+ type_=PaginatedTeamList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -305,25 +334,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.teams.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.teams.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/teams/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Team, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Team,
+ parse_obj_as(
+ type_=Team, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/time_off/client.py b/src/merge/resources/hris/resources/time_off/client.py
index a729c018..7d262e36 100644
--- a/src/merge/resources/hris/resources/time_off/client.py
+++ b/src/merge/resources/hris/resources/time_off/client.py
@@ -1,28 +1,28 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
-from ...types.paginated_time_off_list import PaginatedTimeOffList
-from ...types.time_off import TimeOff
-from ...types.time_off_request import TimeOffRequest
-from ...types.time_off_response import TimeOffResponse
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
from .types.time_off_list_request_expand import TimeOffListRequestExpand
from .types.time_off_list_request_remote_fields import TimeOffListRequestRemoteFields
from .types.time_off_list_request_request_type import TimeOffListRequestRequestType
from .types.time_off_list_request_show_enum_origins import TimeOffListRequestShowEnumOrigins
from .types.time_off_list_request_status import TimeOffListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_time_off_list import PaginatedTimeOffList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from ...types.time_off_request import TimeOffRequest
+from ...types.time_off_response import TimeOffResponse
from .types.time_off_retrieve_request_expand import TimeOffRetrieveRequestExpand
from .types.time_off_retrieve_request_remote_fields import TimeOffRetrieveRequestRemoteFields
from .types.time_off_retrieve_request_show_enum_origins import TimeOffRetrieveRequestShowEnumOrigins
+from ...types.time_off import TimeOff
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -145,7 +145,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -180,9 +180,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTimeOffList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTimeOffList,
+ parse_obj_as(
+ type_=PaginatedTimeOffList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -219,7 +225,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.hris import TimeOffRequest
client = Merge(
@@ -233,14 +239,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"hris/v1/time-off",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimeOffResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimeOffResponse,
+ parse_obj_as(
+ type_=TimeOffResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -285,7 +302,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -306,9 +323,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimeOff, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimeOff,
+ parse_obj_as(
+ type_=TimeOff, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -330,7 +353,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -339,11 +362,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.hris.time_off.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/time-off/meta/post", method="GET", request_options=request_options
+ "hris/v1/time-off/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -467,13 +498,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.time_off.list()
+
+
+ async def main() -> None:
+ await client.hris.time_off.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/time-off",
@@ -502,9 +541,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTimeOffList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTimeOffList,
+ parse_obj_as(
+ type_=PaginatedTimeOffList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -541,28 +586,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.hris import TimeOffRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.time_off.create(
- model=TimeOffRequest(),
- )
+
+
+ async def main() -> None:
+ await client.hris.time_off.create(
+ model=TimeOffRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/time-off",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimeOffResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimeOffResponse,
+ parse_obj_as(
+ type_=TimeOffResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -607,15 +671,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.time_off.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.time_off.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/time-off/{jsonable_encoder(id)}",
@@ -628,9 +700,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimeOff, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimeOff,
+ parse_obj_as(
+ type_=TimeOff, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -652,20 +730,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.time_off.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.hris.time_off.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/time-off/meta/post", method="GET", request_options=request_options
+ "hris/v1/time-off/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_expand.py b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_expand.py
index 6c41625f..e99c95ca 100644
--- a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_expand.py
+++ b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffListRequestExpand(str, enum.Enum):
- APPROVER = "approver"
- EMPLOYEE = "employee"
- EMPLOYEE_APPROVER = "employee,approver"
-
- def visit(
- self,
- approver: typing.Callable[[], T_Result],
- employee: typing.Callable[[], T_Result],
- employee_approver: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffListRequestExpand.APPROVER:
- return approver()
- if self is TimeOffListRequestExpand.EMPLOYEE:
- return employee()
- if self is TimeOffListRequestExpand.EMPLOYEE_APPROVER:
- return employee_approver()
+TimeOffListRequestExpand = typing.Union[typing.Literal["approver", "employee", "employee,approver"], typing.Any]
diff --git a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_remote_fields.py b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_remote_fields.py
index 4f22e08e..d4e3bd8a 100644
--- a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_remote_fields.py
+++ b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_remote_fields.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffListRequestRemoteFields(str, enum.Enum):
- REQUEST_TYPE = "request_type"
- REQUEST_TYPE_STATUS = "request_type,status"
- REQUEST_TYPE_STATUS_UNITS = "request_type,status,units"
- REQUEST_TYPE_UNITS = "request_type,units"
- STATUS = "status"
- STATUS_UNITS = "status,units"
- UNITS = "units"
-
- def visit(
- self,
- request_type: typing.Callable[[], T_Result],
- request_type_status: typing.Callable[[], T_Result],
- request_type_status_units: typing.Callable[[], T_Result],
- request_type_units: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- status_units: typing.Callable[[], T_Result],
- units: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffListRequestRemoteFields.REQUEST_TYPE:
- return request_type()
- if self is TimeOffListRequestRemoteFields.REQUEST_TYPE_STATUS:
- return request_type_status()
- if self is TimeOffListRequestRemoteFields.REQUEST_TYPE_STATUS_UNITS:
- return request_type_status_units()
- if self is TimeOffListRequestRemoteFields.REQUEST_TYPE_UNITS:
- return request_type_units()
- if self is TimeOffListRequestRemoteFields.STATUS:
- return status()
- if self is TimeOffListRequestRemoteFields.STATUS_UNITS:
- return status_units()
- if self is TimeOffListRequestRemoteFields.UNITS:
- return units()
+TimeOffListRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "request_type",
+ "request_type,status",
+ "request_type,status,units",
+ "request_type,units",
+ "status",
+ "status,units",
+ "units",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_request_type.py b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_request_type.py
index bacc5d5c..adf6ba1a 100644
--- a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_request_type.py
+++ b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_request_type.py
@@ -1,37 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffListRequestRequestType(str, enum.Enum):
- BEREAVEMENT = "BEREAVEMENT"
- JURY_DUTY = "JURY_DUTY"
- PERSONAL = "PERSONAL"
- SICK = "SICK"
- VACATION = "VACATION"
- VOLUNTEER = "VOLUNTEER"
-
- def visit(
- self,
- bereavement: typing.Callable[[], T_Result],
- jury_duty: typing.Callable[[], T_Result],
- personal: typing.Callable[[], T_Result],
- sick: typing.Callable[[], T_Result],
- vacation: typing.Callable[[], T_Result],
- volunteer: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffListRequestRequestType.BEREAVEMENT:
- return bereavement()
- if self is TimeOffListRequestRequestType.JURY_DUTY:
- return jury_duty()
- if self is TimeOffListRequestRequestType.PERSONAL:
- return personal()
- if self is TimeOffListRequestRequestType.SICK:
- return sick()
- if self is TimeOffListRequestRequestType.VACATION:
- return vacation()
- if self is TimeOffListRequestRequestType.VOLUNTEER:
- return volunteer()
+TimeOffListRequestRequestType = typing.Union[
+ typing.Literal["BEREAVEMENT", "JURY_DUTY", "PERSONAL", "SICK", "VACATION", "VOLUNTEER"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_show_enum_origins.py b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_show_enum_origins.py
index 15187c89..d0562c29 100644
--- a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_show_enum_origins.py
+++ b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_show_enum_origins.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffListRequestShowEnumOrigins(str, enum.Enum):
- REQUEST_TYPE = "request_type"
- REQUEST_TYPE_STATUS = "request_type,status"
- REQUEST_TYPE_STATUS_UNITS = "request_type,status,units"
- REQUEST_TYPE_UNITS = "request_type,units"
- STATUS = "status"
- STATUS_UNITS = "status,units"
- UNITS = "units"
-
- def visit(
- self,
- request_type: typing.Callable[[], T_Result],
- request_type_status: typing.Callable[[], T_Result],
- request_type_status_units: typing.Callable[[], T_Result],
- request_type_units: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- status_units: typing.Callable[[], T_Result],
- units: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffListRequestShowEnumOrigins.REQUEST_TYPE:
- return request_type()
- if self is TimeOffListRequestShowEnumOrigins.REQUEST_TYPE_STATUS:
- return request_type_status()
- if self is TimeOffListRequestShowEnumOrigins.REQUEST_TYPE_STATUS_UNITS:
- return request_type_status_units()
- if self is TimeOffListRequestShowEnumOrigins.REQUEST_TYPE_UNITS:
- return request_type_units()
- if self is TimeOffListRequestShowEnumOrigins.STATUS:
- return status()
- if self is TimeOffListRequestShowEnumOrigins.STATUS_UNITS:
- return status_units()
- if self is TimeOffListRequestShowEnumOrigins.UNITS:
- return units()
+TimeOffListRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "request_type",
+ "request_type,status",
+ "request_type,status,units",
+ "request_type,units",
+ "status",
+ "status,units",
+ "units",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_status.py b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_status.py
index 40bdbd45..55b95ab3 100644
--- a/src/merge/resources/hris/resources/time_off/types/time_off_list_request_status.py
+++ b/src/merge/resources/hris/resources/time_off/types/time_off_list_request_status.py
@@ -1,33 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffListRequestStatus(str, enum.Enum):
- APPROVED = "APPROVED"
- CANCELLED = "CANCELLED"
- DECLINED = "DECLINED"
- DELETED = "DELETED"
- REQUESTED = "REQUESTED"
-
- def visit(
- self,
- approved: typing.Callable[[], T_Result],
- cancelled: typing.Callable[[], T_Result],
- declined: typing.Callable[[], T_Result],
- deleted: typing.Callable[[], T_Result],
- requested: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffListRequestStatus.APPROVED:
- return approved()
- if self is TimeOffListRequestStatus.CANCELLED:
- return cancelled()
- if self is TimeOffListRequestStatus.DECLINED:
- return declined()
- if self is TimeOffListRequestStatus.DELETED:
- return deleted()
- if self is TimeOffListRequestStatus.REQUESTED:
- return requested()
+TimeOffListRequestStatus = typing.Union[
+ typing.Literal["APPROVED", "CANCELLED", "DECLINED", "DELETED", "REQUESTED"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_expand.py b/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_expand.py
index 6a0972a8..78ba2c32 100644
--- a/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_expand.py
+++ b/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffRetrieveRequestExpand(str, enum.Enum):
- APPROVER = "approver"
- EMPLOYEE = "employee"
- EMPLOYEE_APPROVER = "employee,approver"
-
- def visit(
- self,
- approver: typing.Callable[[], T_Result],
- employee: typing.Callable[[], T_Result],
- employee_approver: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffRetrieveRequestExpand.APPROVER:
- return approver()
- if self is TimeOffRetrieveRequestExpand.EMPLOYEE:
- return employee()
- if self is TimeOffRetrieveRequestExpand.EMPLOYEE_APPROVER:
- return employee_approver()
+TimeOffRetrieveRequestExpand = typing.Union[typing.Literal["approver", "employee", "employee,approver"], typing.Any]
diff --git a/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_remote_fields.py b/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_remote_fields.py
index e76db22a..6f946076 100644
--- a/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_remote_fields.py
+++ b/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_remote_fields.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffRetrieveRequestRemoteFields(str, enum.Enum):
- REQUEST_TYPE = "request_type"
- REQUEST_TYPE_STATUS = "request_type,status"
- REQUEST_TYPE_STATUS_UNITS = "request_type,status,units"
- REQUEST_TYPE_UNITS = "request_type,units"
- STATUS = "status"
- STATUS_UNITS = "status,units"
- UNITS = "units"
-
- def visit(
- self,
- request_type: typing.Callable[[], T_Result],
- request_type_status: typing.Callable[[], T_Result],
- request_type_status_units: typing.Callable[[], T_Result],
- request_type_units: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- status_units: typing.Callable[[], T_Result],
- units: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE:
- return request_type()
- if self is TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE_STATUS:
- return request_type_status()
- if self is TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE_STATUS_UNITS:
- return request_type_status_units()
- if self is TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE_UNITS:
- return request_type_units()
- if self is TimeOffRetrieveRequestRemoteFields.STATUS:
- return status()
- if self is TimeOffRetrieveRequestRemoteFields.STATUS_UNITS:
- return status_units()
- if self is TimeOffRetrieveRequestRemoteFields.UNITS:
- return units()
+TimeOffRetrieveRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "request_type",
+ "request_type,status",
+ "request_type,status,units",
+ "request_type,units",
+ "status",
+ "status,units",
+ "units",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_show_enum_origins.py b/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_show_enum_origins.py
index 079a76e8..b514c93c 100644
--- a/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/hris/resources/time_off/types/time_off_retrieve_request_show_enum_origins.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffRetrieveRequestShowEnumOrigins(str, enum.Enum):
- REQUEST_TYPE = "request_type"
- REQUEST_TYPE_STATUS = "request_type,status"
- REQUEST_TYPE_STATUS_UNITS = "request_type,status,units"
- REQUEST_TYPE_UNITS = "request_type,units"
- STATUS = "status"
- STATUS_UNITS = "status,units"
- UNITS = "units"
-
- def visit(
- self,
- request_type: typing.Callable[[], T_Result],
- request_type_status: typing.Callable[[], T_Result],
- request_type_status_units: typing.Callable[[], T_Result],
- request_type_units: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- status_units: typing.Callable[[], T_Result],
- units: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE:
- return request_type()
- if self is TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE_STATUS:
- return request_type_status()
- if self is TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE_STATUS_UNITS:
- return request_type_status_units()
- if self is TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE_UNITS:
- return request_type_units()
- if self is TimeOffRetrieveRequestShowEnumOrigins.STATUS:
- return status()
- if self is TimeOffRetrieveRequestShowEnumOrigins.STATUS_UNITS:
- return status_units()
- if self is TimeOffRetrieveRequestShowEnumOrigins.UNITS:
- return units()
+TimeOffRetrieveRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "request_type",
+ "request_type,status",
+ "request_type,status,units",
+ "request_type,units",
+ "status",
+ "status,units",
+ "units",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/resources/time_off_balances/client.py b/src/merge/resources/hris/resources/time_off_balances/client.py
index 4794caff..c6c82cbc 100644
--- a/src/merge/resources/hris/resources/time_off_balances/client.py
+++ b/src/merge/resources/hris/resources/time_off_balances/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.time_off_balances_list_request_policy_type import TimeOffBalancesListRequestPolicyType
from .....core.request_options import RequestOptions
from ...types.paginated_time_off_balance_list import PaginatedTimeOffBalanceList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.time_off_balance import TimeOffBalance
-from .types.time_off_balances_list_request_policy_type import TimeOffBalancesListRequestPolicyType
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class TimeOffBalancesClient:
@@ -102,7 +102,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -131,9 +131,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTimeOffBalanceList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTimeOffBalanceList,
+ parse_obj_as(
+ type_=PaginatedTimeOffBalanceList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -178,7 +184,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -199,9 +205,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimeOffBalance, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimeOffBalance,
+ parse_obj_as(
+ type_=TimeOffBalance, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -295,13 +307,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.time_off_balances.list()
+
+
+ async def main() -> None:
+ await client.hris.time_off_balances.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/time-off-balances",
@@ -324,9 +344,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTimeOffBalanceList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTimeOffBalanceList,
+ parse_obj_as(
+ type_=PaginatedTimeOffBalanceList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -371,15 +397,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.time_off_balances.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.time_off_balances.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/time-off-balances/{jsonable_encoder(id)}",
@@ -392,9 +426,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimeOffBalance, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimeOffBalance,
+ parse_obj_as(
+ type_=TimeOffBalance, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/time_off_balances/types/time_off_balances_list_request_policy_type.py b/src/merge/resources/hris/resources/time_off_balances/types/time_off_balances_list_request_policy_type.py
index e2f96117..34e99f9c 100644
--- a/src/merge/resources/hris/resources/time_off_balances/types/time_off_balances_list_request_policy_type.py
+++ b/src/merge/resources/hris/resources/time_off_balances/types/time_off_balances_list_request_policy_type.py
@@ -1,37 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffBalancesListRequestPolicyType(str, enum.Enum):
- BEREAVEMENT = "BEREAVEMENT"
- JURY_DUTY = "JURY_DUTY"
- PERSONAL = "PERSONAL"
- SICK = "SICK"
- VACATION = "VACATION"
- VOLUNTEER = "VOLUNTEER"
-
- def visit(
- self,
- bereavement: typing.Callable[[], T_Result],
- jury_duty: typing.Callable[[], T_Result],
- personal: typing.Callable[[], T_Result],
- sick: typing.Callable[[], T_Result],
- vacation: typing.Callable[[], T_Result],
- volunteer: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffBalancesListRequestPolicyType.BEREAVEMENT:
- return bereavement()
- if self is TimeOffBalancesListRequestPolicyType.JURY_DUTY:
- return jury_duty()
- if self is TimeOffBalancesListRequestPolicyType.PERSONAL:
- return personal()
- if self is TimeOffBalancesListRequestPolicyType.SICK:
- return sick()
- if self is TimeOffBalancesListRequestPolicyType.VACATION:
- return vacation()
- if self is TimeOffBalancesListRequestPolicyType.VOLUNTEER:
- return volunteer()
+TimeOffBalancesListRequestPolicyType = typing.Union[
+ typing.Literal["BEREAVEMENT", "JURY_DUTY", "PERSONAL", "SICK", "VACATION", "VOLUNTEER"], typing.Any
+]
diff --git a/src/merge/resources/hris/resources/timesheet_entries/client.py b/src/merge/resources/hris/resources/timesheet_entries/client.py
index f61662a6..5ac1fbb0 100644
--- a/src/merge/resources/hris/resources/timesheet_entries/client.py
+++ b/src/merge/resources/hris/resources/timesheet_entries/client.py
@@ -1,21 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.timesheet_entries_list_request_order_by import TimesheetEntriesListRequestOrderBy
from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
from ...types.paginated_timesheet_entry_list import PaginatedTimesheetEntryList
-from ...types.timesheet_entry import TimesheetEntry
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.timesheet_entry_request import TimesheetEntryRequest
from ...types.timesheet_entry_response import TimesheetEntryResponse
-from .types.timesheet_entries_list_request_order_by import TimesheetEntriesListRequestOrderBy
+from ...types.timesheet_entry import TimesheetEntry
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -105,7 +105,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -135,9 +135,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTimesheetEntryList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTimesheetEntryList,
+ parse_obj_as(
+ type_=PaginatedTimesheetEntryList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -174,7 +180,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.hris import TimesheetEntryRequest
client = Merge(
@@ -188,14 +194,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"hris/v1/timesheet-entries",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimesheetEntryResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimesheetEntryResponse,
+ parse_obj_as(
+ type_=TimesheetEntryResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -228,7 +245,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -241,12 +258,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"hris/v1/timesheet-entries/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimesheetEntry, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimesheetEntry,
+ parse_obj_as(
+ type_=TimesheetEntry, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -268,7 +293,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -277,11 +302,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.hris.timesheet_entries.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/timesheet-entries/meta/post", method="GET", request_options=request_options
+ "hris/v1/timesheet-entries/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -372,13 +405,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.timesheet_entries.list()
+
+
+ async def main() -> None:
+ await client.hris.timesheet_entries.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/timesheet-entries",
@@ -402,9 +443,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTimesheetEntryList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTimesheetEntryList,
+ parse_obj_as(
+ type_=PaginatedTimesheetEntryList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -441,28 +488,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.hris import TimesheetEntryRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.timesheet_entries.create(
- model=TimesheetEntryRequest(),
- )
+
+
+ async def main() -> None:
+ await client.hris.timesheet_entries.create(
+ model=TimesheetEntryRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/timesheet-entries",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimesheetEntryResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimesheetEntryResponse,
+ parse_obj_as(
+ type_=TimesheetEntryResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -495,25 +561,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.timesheet_entries.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.hris.timesheet_entries.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"hris/v1/timesheet-entries/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TimesheetEntry, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TimesheetEntry,
+ parse_obj_as(
+ type_=TimesheetEntry, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -535,20 +617,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.timesheet_entries.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.hris.timesheet_entries.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/timesheet-entries/meta/post", method="GET", request_options=request_options
+ "hris/v1/timesheet-entries/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/resources/timesheet_entries/types/timesheet_entries_list_request_order_by.py b/src/merge/resources/hris/resources/timesheet_entries/types/timesheet_entries_list_request_order_by.py
index bd5713ff..7733cf73 100644
--- a/src/merge/resources/hris/resources/timesheet_entries/types/timesheet_entries_list_request_order_by.py
+++ b/src/merge/resources/hris/resources/timesheet_entries/types/timesheet_entries_list_request_order_by.py
@@ -1,19 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimesheetEntriesListRequestOrderBy(str, enum.Enum):
- START_TIME_DESCENDING = "-start_time"
- START_TIME_ASCENDING = "start_time"
-
- def visit(
- self, start_time_descending: typing.Callable[[], T_Result], start_time_ascending: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is TimesheetEntriesListRequestOrderBy.START_TIME_DESCENDING:
- return start_time_descending()
- if self is TimesheetEntriesListRequestOrderBy.START_TIME_ASCENDING:
- return start_time_ascending()
+TimesheetEntriesListRequestOrderBy = typing.Union[typing.Literal["-start_time", "start_time"], typing.Any]
diff --git a/src/merge/resources/hris/resources/webhook_receivers/client.py b/src/merge/resources/hris/resources/webhook_receivers/client.py
index 76ef467d..a9464754 100644
--- a/src/merge/resources/hris/resources/webhook_receivers/client.py
+++ b/src/merge/resources/hris/resources/webhook_receivers/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.webhook_receiver import WebhookReceiver
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -33,7 +33,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -42,11 +42,19 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
client.hris.webhook_receivers.list()
"""
_response = self._client_wrapper.httpx_client.request(
- "hris/v1/webhook-receivers", method="GET", request_options=request_options
+ "hris/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -58,7 +66,7 @@ def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -81,7 +89,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -95,13 +103,23 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"hris/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -128,20 +146,36 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None)
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.webhook_receivers.list()
+
+
+ async def main() -> None:
+ await client.hris.webhook_receivers.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "hris/v1/webhook-receivers", method="GET", request_options=request_options
+ "hris/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,7 +187,7 @@ async def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -176,27 +210,45 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.hris.webhook_receivers.create(
- event="event",
- is_active=True,
- )
+
+
+ async def main() -> None:
+ await client.hris.webhook_receivers.create(
+ event="event",
+ is_active=True,
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"hris/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/hris/types/account_details.py b/src/merge/resources/hris/types/account_details.py
index 81f9587b..50a3736a 100644
--- a/src/merge/resources/hris/types/account_details.py
+++ b/src/merge/resources/hris/types/account_details.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .category_enum import CategoryEnum
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetails(pydantic_v1.BaseModel):
+class AccountDetails(UniversalBaseModel):
id: typing.Optional[str]
integration: typing.Optional[str]
integration_slug: typing.Optional[str]
@@ -18,27 +17,18 @@ class AccountDetails(pydantic_v1.BaseModel):
end_user_email_address: typing.Optional[str]
status: typing.Optional[str]
webhook_listener_url: typing.Optional[str]
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
account_type: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/account_details_and_actions.py b/src/merge/resources/hris/types/account_details_and_actions.py
index 6a1b2874..39a7b0da 100644
--- a/src/merge/resources/hris/types/account_details_and_actions.py
+++ b/src/merge/resources/hris/types/account_details_and_actions.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
-from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
from .category_enum import CategoryEnum
+from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
+import pydantic
+from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetailsAndActions(pydantic_v1.BaseModel):
+class AccountDetailsAndActions(UniversalBaseModel):
"""
# The LinkedAccount Object
@@ -30,13 +29,13 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
end_user_origin_id: typing.Optional[str]
end_user_organization_name: str
end_user_email_address: str
- subdomain: typing.Optional[str] = pydantic_v1.Field()
+ subdomain: typing.Optional[str] = pydantic.Field()
"""
The tenant or domain the customer has provided access to.
"""
webhook_listener_url: str
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
@@ -44,20 +43,11 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
integration: typing.Optional[AccountDetailsAndActionsIntegration]
account_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/account_details_and_actions_integration.py b/src/merge/resources/hris/types/account_details_and_actions_integration.py
index 7c300a2b..5779ac5b 100644
--- a/src/merge/resources/hris/types/account_details_and_actions_integration.py
+++ b/src/merge/resources/hris/types/account_details_and_actions_integration.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
+class AccountDetailsAndActionsIntegration(UniversalBaseModel):
name: str
categories: typing.List[CategoriesEnum]
image: typing.Optional[str]
@@ -19,20 +18,11 @@ class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/account_details_and_actions_status_enum.py b/src/merge/resources/hris/types/account_details_and_actions_status_enum.py
index a904e550..47a6e845 100644
--- a/src/merge/resources/hris/types/account_details_and_actions_status_enum.py
+++ b/src/merge/resources/hris/types/account_details_and_actions_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountDetailsAndActionsStatusEnum(str, enum.Enum):
- """
- - `COMPLETE` - COMPLETE
- - `INCOMPLETE` - INCOMPLETE
- - `RELINK_NEEDED` - RELINK_NEEDED
- """
-
- COMPLETE = "COMPLETE"
- INCOMPLETE = "INCOMPLETE"
- RELINK_NEEDED = "RELINK_NEEDED"
-
- def visit(
- self,
- complete: typing.Callable[[], T_Result],
- incomplete: typing.Callable[[], T_Result],
- relink_needed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountDetailsAndActionsStatusEnum.COMPLETE:
- return complete()
- if self is AccountDetailsAndActionsStatusEnum.INCOMPLETE:
- return incomplete()
- if self is AccountDetailsAndActionsStatusEnum.RELINK_NEEDED:
- return relink_needed()
+AccountDetailsAndActionsStatusEnum = typing.Union[typing.Literal["COMPLETE", "INCOMPLETE", "RELINK_NEEDED"], typing.Any]
diff --git a/src/merge/resources/hris/types/account_integration.py b/src/merge/resources/hris/types/account_integration.py
index ad3fd193..b1e4ec7e 100644
--- a/src/merge/resources/hris/types/account_integration.py
+++ b/src/merge/resources/hris/types/account_integration.py
@@ -1,74 +1,66 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountIntegration(pydantic_v1.BaseModel):
- name: str = pydantic_v1.Field()
+class AccountIntegration(UniversalBaseModel):
+ name: str = pydantic.Field()
"""
Company name.
"""
- abbreviated_name: typing.Optional[str] = pydantic_v1.Field()
+ abbreviated_name: typing.Optional[str] = pydantic.Field()
"""
Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).
Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)
"""
- categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic_v1.Field()
+ categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic.Field()
"""
Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].
"""
- image: typing.Optional[str] = pydantic_v1.Field()
+ image: typing.Optional[str] = pydantic.Field()
"""
Company logo in rectangular shape. Upload an image with a clear background.
"""
- square_image: typing.Optional[str] = pydantic_v1.Field()
+ square_image: typing.Optional[str] = pydantic.Field()
"""
Company logo in square shape. Upload an image with a white background.
"""
- color: typing.Optional[str] = pydantic_v1.Field()
+ color: typing.Optional[str] = pydantic.Field()
"""
The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color.
"""
slug: typing.Optional[str]
- api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = (
+ pydantic.Field()
+ )
"""
Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}
"""
- webhook_setup_guide_url: typing.Optional[str] = pydantic_v1.Field()
+ webhook_setup_guide_url: typing.Optional[str] = pydantic.Field()
"""
Setup guide URL for third party webhook creation. Exposed in Merge Docs.
"""
- category_beta_status: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ category_beta_status: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
Category or categories this integration is in beta status for.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/account_token.py b/src/merge/resources/hris/types/account_token.py
index 4794fea3..fa8b76ec 100644
--- a/src/merge/resources/hris/types/account_token.py
+++ b/src/merge/resources/hris/types/account_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class AccountToken(pydantic_v1.BaseModel):
+class AccountToken(UniversalBaseModel):
account_token: str
integration: AccountIntegration
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/account_type_enum.py b/src/merge/resources/hris/types/account_type_enum.py
index 8491f7ad..425fe8ae 100644
--- a/src/merge/resources/hris/types/account_type_enum.py
+++ b/src/merge/resources/hris/types/account_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountTypeEnum(str, enum.Enum):
- """
- - `SAVINGS` - SAVINGS
- - `CHECKING` - CHECKING
- """
-
- SAVINGS = "SAVINGS"
- CHECKING = "CHECKING"
-
- def visit(self, savings: typing.Callable[[], T_Result], checking: typing.Callable[[], T_Result]) -> T_Result:
- if self is AccountTypeEnum.SAVINGS:
- return savings()
- if self is AccountTypeEnum.CHECKING:
- return checking()
+AccountTypeEnum = typing.Union[typing.Literal["SAVINGS", "CHECKING"], typing.Any]
diff --git a/src/merge/resources/hris/types/advanced_metadata.py b/src/merge/resources/hris/types/advanced_metadata.py
index 2aa7d1d6..6287a842 100644
--- a/src/merge/resources/hris/types/advanced_metadata.py
+++ b/src/merge/resources/hris/types/advanced_metadata.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AdvancedMetadata(pydantic_v1.BaseModel):
+class AdvancedMetadata(UniversalBaseModel):
id: str
display_name: typing.Optional[str]
description: typing.Optional[str]
is_required: typing.Optional[bool]
is_custom: typing.Optional[bool]
- field_choices: typing.Optional[typing.List[typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_choices: typing.Optional[typing.List[typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/async_passthrough_reciept.py b/src/merge/resources/hris/types/async_passthrough_reciept.py
index 2cc33210..43dc5284 100644
--- a/src/merge/resources/hris/types/async_passthrough_reciept.py
+++ b/src/merge/resources/hris/types/async_passthrough_reciept.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AsyncPassthroughReciept(pydantic_v1.BaseModel):
+class AsyncPassthroughReciept(UniversalBaseModel):
async_passthrough_receipt_id: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/audit_log_event.py b/src/merge/resources/hris/types/audit_log_event.py
index 051c0286..b57101fc 100644
--- a/src/merge/resources/hris/types/audit_log_event.py
+++ b/src/merge/resources/hris/types/audit_log_event.py
@@ -1,27 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .audit_log_event_event_type import AuditLogEventEventType
+import pydantic
from .audit_log_event_role import AuditLogEventRole
+from .audit_log_event_event_type import AuditLogEventEventType
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AuditLogEvent(pydantic_v1.BaseModel):
+class AuditLogEvent(UniversalBaseModel):
id: typing.Optional[str]
- user_name: typing.Optional[str] = pydantic_v1.Field()
+ user_name: typing.Optional[str] = pydantic.Field()
"""
The User's full name at the time of this Event occurring.
"""
- user_email: typing.Optional[str] = pydantic_v1.Field()
+ user_email: typing.Optional[str] = pydantic.Field()
"""
The User's email at the time of this Event occurring.
"""
- role: AuditLogEventRole = pydantic_v1.Field()
+ role: AuditLogEventRole = pydantic.Field()
"""
Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.
@@ -34,7 +34,7 @@ class AuditLogEvent(pydantic_v1.BaseModel):
"""
ip_address: str
- event_type: AuditLogEventEventType = pydantic_v1.Field()
+ event_type: AuditLogEventEventType = pydantic.Field()
"""
Designates the type of event that occurred.
@@ -81,20 +81,11 @@ class AuditLogEvent(pydantic_v1.BaseModel):
event_description: str
created_at: typing.Optional[dt.datetime]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/audit_log_event_event_type.py b/src/merge/resources/hris/types/audit_log_event_event_type.py
index f9c9d2b3..f9d43eed 100644
--- a/src/merge/resources/hris/types/audit_log_event_event_type.py
+++ b/src/merge/resources/hris/types/audit_log_event_event_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .event_type_enum import EventTypeEnum
AuditLogEventEventType = typing.Union[EventTypeEnum, str]
diff --git a/src/merge/resources/hris/types/audit_log_event_role.py b/src/merge/resources/hris/types/audit_log_event_role.py
index fe91ed6f..83ecd93a 100644
--- a/src/merge/resources/hris/types/audit_log_event_role.py
+++ b/src/merge/resources/hris/types/audit_log_event_role.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .role_enum import RoleEnum
AuditLogEventRole = typing.Union[RoleEnum, str]
diff --git a/src/merge/resources/hris/types/available_actions.py b/src/merge/resources/hris/types/available_actions.py
index bbd94581..5f164db6 100644
--- a/src/merge/resources/hris/types/available_actions.py
+++ b/src/merge/resources/hris/types/available_actions.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+import typing
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AvailableActions(pydantic_v1.BaseModel):
+class AvailableActions(UniversalBaseModel):
"""
# The AvailableActions Object
@@ -26,20 +25,11 @@ class AvailableActions(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/bank_info.py b/src/merge/resources/hris/types/bank_info.py
index 4d4bdf91..fcfbfad6 100644
--- a/src/merge/resources/hris/types/bank_info.py
+++ b/src/merge/resources/hris/types/bank_info.py
@@ -1,16 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .bank_info_account_type import BankInfoAccountType
+import pydantic
+import datetime as dt
from .bank_info_employee import BankInfoEmployee
+from .bank_info_account_type import BankInfoAccountType
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class BankInfo(pydantic_v1.BaseModel):
+class BankInfo(UniversalBaseModel):
"""
# The BankInfo Object
@@ -24,42 +29,42 @@ class BankInfo(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- employee: typing.Optional[BankInfoEmployee] = pydantic_v1.Field()
+ employee: typing.Optional[BankInfoEmployee] = pydantic.Field()
"""
The employee with this bank account.
"""
- account_number: typing.Optional[str] = pydantic_v1.Field()
+ account_number: typing.Optional[str] = pydantic.Field()
"""
The account number.
"""
- routing_number: typing.Optional[str] = pydantic_v1.Field()
+ routing_number: typing.Optional[str] = pydantic.Field()
"""
The routing number.
"""
- bank_name: typing.Optional[str] = pydantic_v1.Field()
+ bank_name: typing.Optional[str] = pydantic.Field()
"""
The bank name.
"""
- account_type: typing.Optional[BankInfoAccountType] = pydantic_v1.Field()
+ account_type: typing.Optional[BankInfoAccountType] = pydantic.Field()
"""
The bank account type
@@ -67,33 +72,29 @@ class BankInfo(pydantic_v1.BaseModel):
- `CHECKING` - CHECKING
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the matching bank object was created in the third party system.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, BankInfo=BankInfo)
+update_forward_refs(Employment, BankInfo=BankInfo)
+update_forward_refs(Team, BankInfo=BankInfo)
diff --git a/src/merge/resources/hris/types/bank_info_account_type.py b/src/merge/resources/hris/types/bank_info_account_type.py
index 9fe05384..31056616 100644
--- a/src/merge/resources/hris/types/bank_info_account_type.py
+++ b/src/merge/resources/hris/types/bank_info_account_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account_type_enum import AccountTypeEnum
BankInfoAccountType = typing.Union[AccountTypeEnum, str]
diff --git a/src/merge/resources/hris/types/bank_info_employee.py b/src/merge/resources/hris/types/bank_info_employee.py
index b81c6648..17874e5a 100644
--- a/src/merge/resources/hris/types/bank_info_employee.py
+++ b/src/merge/resources/hris/types/bank_info_employee.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
BankInfoEmployee = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/benefit.py b/src/merge/resources/hris/types/benefit.py
index 5d0d2d70..bd18446e 100644
--- a/src/merge/resources/hris/types/benefit.py
+++ b/src/merge/resources/hris/types/benefit.py
@@ -1,15 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .benefit_employee import BenefitEmployee
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Benefit(pydantic_v1.BaseModel):
+class Benefit(UniversalBaseModel):
"""
# The Benefit Object
@@ -23,83 +28,79 @@ class Benefit(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- employee: typing.Optional[BenefitEmployee] = pydantic_v1.Field()
+ employee: typing.Optional[BenefitEmployee] = pydantic.Field()
"""
The employee on the plan.
"""
- provider_name: typing.Optional[str] = pydantic_v1.Field()
+ provider_name: typing.Optional[str] = pydantic.Field()
"""
The name of the benefit provider.
"""
- benefit_plan_type: typing.Optional[str] = pydantic_v1.Field()
+ benefit_plan_type: typing.Optional[str] = pydantic.Field()
"""
The type of benefit plan
"""
- employee_contribution: typing.Optional[float] = pydantic_v1.Field()
+ employee_contribution: typing.Optional[float] = pydantic.Field()
"""
The employee's contribution.
"""
- company_contribution: typing.Optional[float] = pydantic_v1.Field()
+ company_contribution: typing.Optional[float] = pydantic.Field()
"""
The company's contribution.
"""
- start_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time the benefit started.
"""
- end_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time the benefit ended.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- employer_benefit: typing.Optional[str] = pydantic_v1.Field()
+ employer_benefit: typing.Optional[str] = pydantic.Field()
"""
The employer benefit plan the employee is enrolled in.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, Benefit=Benefit)
+update_forward_refs(Employment, Benefit=Benefit)
+update_forward_refs(Team, Benefit=Benefit)
diff --git a/src/merge/resources/hris/types/benefit_employee.py b/src/merge/resources/hris/types/benefit_employee.py
index 4ded9a94..aba7102a 100644
--- a/src/merge/resources/hris/types/benefit_employee.py
+++ b/src/merge/resources/hris/types/benefit_employee.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
BenefitEmployee = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/benefit_plan_type_enum.py b/src/merge/resources/hris/types/benefit_plan_type_enum.py
index c7cfb64c..8636b15c 100644
--- a/src/merge/resources/hris/types/benefit_plan_type_enum.py
+++ b/src/merge/resources/hris/types/benefit_plan_type_enum.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class BenefitPlanTypeEnum(str, enum.Enum):
- """
- - `MEDICAL` - MEDICAL
- - `HEALTH_SAVINGS` - HEALTH_SAVINGS
- - `INSURANCE` - INSURANCE
- - `RETIREMENT` - RETIREMENT
- - `OTHER` - OTHER
- """
-
- MEDICAL = "MEDICAL"
- HEALTH_SAVINGS = "HEALTH_SAVINGS"
- INSURANCE = "INSURANCE"
- RETIREMENT = "RETIREMENT"
- OTHER = "OTHER"
-
- def visit(
- self,
- medical: typing.Callable[[], T_Result],
- health_savings: typing.Callable[[], T_Result],
- insurance: typing.Callable[[], T_Result],
- retirement: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is BenefitPlanTypeEnum.MEDICAL:
- return medical()
- if self is BenefitPlanTypeEnum.HEALTH_SAVINGS:
- return health_savings()
- if self is BenefitPlanTypeEnum.INSURANCE:
- return insurance()
- if self is BenefitPlanTypeEnum.RETIREMENT:
- return retirement()
- if self is BenefitPlanTypeEnum.OTHER:
- return other()
+BenefitPlanTypeEnum = typing.Union[
+ typing.Literal["MEDICAL", "HEALTH_SAVINGS", "INSURANCE", "RETIREMENT", "OTHER"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/categories_enum.py b/src/merge/resources/hris/types/categories_enum.py
index ee5cac33..14d064dd 100644
--- a/src/merge/resources/hris/types/categories_enum.py
+++ b/src/merge/resources/hris/types/categories_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoriesEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoriesEnum.HRIS:
- return hris()
- if self is CategoriesEnum.ATS:
- return ats()
- if self is CategoriesEnum.ACCOUNTING:
- return accounting()
- if self is CategoriesEnum.TICKETING:
- return ticketing()
- if self is CategoriesEnum.CRM:
- return crm()
- if self is CategoriesEnum.MKTG:
- return mktg()
- if self is CategoriesEnum.FILESTORAGE:
- return filestorage()
+CategoriesEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/category_enum.py b/src/merge/resources/hris/types/category_enum.py
index ad5a0688..597342a8 100644
--- a/src/merge/resources/hris/types/category_enum.py
+++ b/src/merge/resources/hris/types/category_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoryEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoryEnum.HRIS:
- return hris()
- if self is CategoryEnum.ATS:
- return ats()
- if self is CategoryEnum.ACCOUNTING:
- return accounting()
- if self is CategoryEnum.TICKETING:
- return ticketing()
- if self is CategoryEnum.CRM:
- return crm()
- if self is CategoryEnum.MKTG:
- return mktg()
- if self is CategoryEnum.FILESTORAGE:
- return filestorage()
+CategoryEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/common_model_scope_api.py b/src/merge/resources/hris/types/common_model_scope_api.py
index d6fdec56..c6a178b1 100644
--- a/src/merge/resources/hris/types/common_model_scope_api.py
+++ b/src/merge/resources/hris/types/common_model_scope_api.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .individual_common_model_scope_deserializer import IndividualCommonModelScopeDeserializer
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CommonModelScopeApi(pydantic_v1.BaseModel):
- common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic_v1.Field()
+class CommonModelScopeApi(UniversalBaseModel):
+ common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic.Field()
"""
The common models you want to update the scopes for
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/common_model_scopes_body_request.py b/src/merge/resources/hris/types/common_model_scopes_body_request.py
index e956cbdc..305ab44c 100644
--- a/src/merge/resources/hris/types/common_model_scopes_body_request.py
+++ b/src/merge/resources/hris/types/common_model_scopes_body_request.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .enabled_actions_enum import EnabledActionsEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CommonModelScopesBodyRequest(pydantic_v1.BaseModel):
+class CommonModelScopesBodyRequest(UniversalBaseModel):
model_id: str
enabled_actions: typing.List[EnabledActionsEnum]
disabled_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/company.py b/src/merge/resources/hris/types/company.py
index 50e78999..dda7a382 100644
--- a/src/merge/resources/hris/types/company.py
+++ b/src/merge/resources/hris/types/company.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Company(pydantic_v1.BaseModel):
+class Company(UniversalBaseModel):
"""
# The Company Object
@@ -22,58 +22,49 @@ class Company(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- legal_name: typing.Optional[str] = pydantic_v1.Field()
+ legal_name: typing.Optional[str] = pydantic.Field()
"""
The company's legal name.
"""
- display_name: typing.Optional[str] = pydantic_v1.Field()
+ display_name: typing.Optional[str] = pydantic.Field()
"""
The company's display name.
"""
- eins: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ eins: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The company's Employer Identification Numbers.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/country_enum.py b/src/merge/resources/hris/types/country_enum.py
index 7e6b7a0e..3aab022f 100644
--- a/src/merge/resources/hris/types/country_enum.py
+++ b/src/merge/resources/hris/types/country_enum.py
@@ -1,1261 +1,258 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CountryEnum(str, enum.Enum):
- """
- - `AF` - Afghanistan
- - `AX` - Γ
land Islands
- - `AL` - Albania
- - `DZ` - Algeria
- - `AS` - American Samoa
- - `AD` - Andorra
- - `AO` - Angola
- - `AI` - Anguilla
- - `AQ` - Antarctica
- - `AG` - Antigua and Barbuda
- - `AR` - Argentina
- - `AM` - Armenia
- - `AW` - Aruba
- - `AU` - Australia
- - `AT` - Austria
- - `AZ` - Azerbaijan
- - `BS` - Bahamas
- - `BH` - Bahrain
- - `BD` - Bangladesh
- - `BB` - Barbados
- - `BY` - Belarus
- - `BE` - Belgium
- - `BZ` - Belize
- - `BJ` - Benin
- - `BM` - Bermuda
- - `BT` - Bhutan
- - `BO` - Bolivia
- - `BQ` - Bonaire, Sint Eustatius and Saba
- - `BA` - Bosnia and Herzegovina
- - `BW` - Botswana
- - `BV` - Bouvet Island
- - `BR` - Brazil
- - `IO` - British Indian Ocean Territory
- - `BN` - Brunei
- - `BG` - Bulgaria
- - `BF` - Burkina Faso
- - `BI` - Burundi
- - `CV` - Cabo Verde
- - `KH` - Cambodia
- - `CM` - Cameroon
- - `CA` - Canada
- - `KY` - Cayman Islands
- - `CF` - Central African Republic
- - `TD` - Chad
- - `CL` - Chile
- - `CN` - China
- - `CX` - Christmas Island
- - `CC` - Cocos (Keeling) Islands
- - `CO` - Colombia
- - `KM` - Comoros
- - `CG` - Congo
- - `CD` - Congo (the Democratic Republic of the)
- - `CK` - Cook Islands
- - `CR` - Costa Rica
- - `CI` - CΓ΄te d'Ivoire
- - `HR` - Croatia
- - `CU` - Cuba
- - `CW` - CuraΓ§ao
- - `CY` - Cyprus
- - `CZ` - Czechia
- - `DK` - Denmark
- - `DJ` - Djibouti
- - `DM` - Dominica
- - `DO` - Dominican Republic
- - `EC` - Ecuador
- - `EG` - Egypt
- - `SV` - El Salvador
- - `GQ` - Equatorial Guinea
- - `ER` - Eritrea
- - `EE` - Estonia
- - `SZ` - Eswatini
- - `ET` - Ethiopia
- - `FK` - Falkland Islands (Malvinas)
- - `FO` - Faroe Islands
- - `FJ` - Fiji
- - `FI` - Finland
- - `FR` - France
- - `GF` - French Guiana
- - `PF` - French Polynesia
- - `TF` - French Southern Territories
- - `GA` - Gabon
- - `GM` - Gambia
- - `GE` - Georgia
- - `DE` - Germany
- - `GH` - Ghana
- - `GI` - Gibraltar
- - `GR` - Greece
- - `GL` - Greenland
- - `GD` - Grenada
- - `GP` - Guadeloupe
- - `GU` - Guam
- - `GT` - Guatemala
- - `GG` - Guernsey
- - `GN` - Guinea
- - `GW` - Guinea-Bissau
- - `GY` - Guyana
- - `HT` - Haiti
- - `HM` - Heard Island and McDonald Islands
- - `VA` - Holy See
- - `HN` - Honduras
- - `HK` - Hong Kong
- - `HU` - Hungary
- - `IS` - Iceland
- - `IN` - India
- - `ID` - Indonesia
- - `IR` - Iran
- - `IQ` - Iraq
- - `IE` - Ireland
- - `IM` - Isle of Man
- - `IL` - Israel
- - `IT` - Italy
- - `JM` - Jamaica
- - `JP` - Japan
- - `JE` - Jersey
- - `JO` - Jordan
- - `KZ` - Kazakhstan
- - `KE` - Kenya
- - `KI` - Kiribati
- - `KW` - Kuwait
- - `KG` - Kyrgyzstan
- - `LA` - Laos
- - `LV` - Latvia
- - `LB` - Lebanon
- - `LS` - Lesotho
- - `LR` - Liberia
- - `LY` - Libya
- - `LI` - Liechtenstein
- - `LT` - Lithuania
- - `LU` - Luxembourg
- - `MO` - Macao
- - `MG` - Madagascar
- - `MW` - Malawi
- - `MY` - Malaysia
- - `MV` - Maldives
- - `ML` - Mali
- - `MT` - Malta
- - `MH` - Marshall Islands
- - `MQ` - Martinique
- - `MR` - Mauritania
- - `MU` - Mauritius
- - `YT` - Mayotte
- - `MX` - Mexico
- - `FM` - Micronesia (Federated States of)
- - `MD` - Moldova
- - `MC` - Monaco
- - `MN` - Mongolia
- - `ME` - Montenegro
- - `MS` - Montserrat
- - `MA` - Morocco
- - `MZ` - Mozambique
- - `MM` - Myanmar
- - `NA` - Namibia
- - `NR` - Nauru
- - `NP` - Nepal
- - `NL` - Netherlands
- - `NC` - New Caledonia
- - `NZ` - New Zealand
- - `NI` - Nicaragua
- - `NE` - Niger
- - `NG` - Nigeria
- - `NU` - Niue
- - `NF` - Norfolk Island
- - `KP` - North Korea
- - `MK` - North Macedonia
- - `MP` - Northern Mariana Islands
- - `NO` - Norway
- - `OM` - Oman
- - `PK` - Pakistan
- - `PW` - Palau
- - `PS` - Palestine, State of
- - `PA` - Panama
- - `PG` - Papua New Guinea
- - `PY` - Paraguay
- - `PE` - Peru
- - `PH` - Philippines
- - `PN` - Pitcairn
- - `PL` - Poland
- - `PT` - Portugal
- - `PR` - Puerto Rico
- - `QA` - Qatar
- - `RE` - RΓ©union
- - `RO` - Romania
- - `RU` - Russia
- - `RW` - Rwanda
- - `BL` - Saint BarthΓ©lemy
- - `SH` - Saint Helena, Ascension and Tristan da Cunha
- - `KN` - Saint Kitts and Nevis
- - `LC` - Saint Lucia
- - `MF` - Saint Martin (French part)
- - `PM` - Saint Pierre and Miquelon
- - `VC` - Saint Vincent and the Grenadines
- - `WS` - Samoa
- - `SM` - San Marino
- - `ST` - Sao Tome and Principe
- - `SA` - Saudi Arabia
- - `SN` - Senegal
- - `RS` - Serbia
- - `SC` - Seychelles
- - `SL` - Sierra Leone
- - `SG` - Singapore
- - `SX` - Sint Maarten (Dutch part)
- - `SK` - Slovakia
- - `SI` - Slovenia
- - `SB` - Solomon Islands
- - `SO` - Somalia
- - `ZA` - South Africa
- - `GS` - South Georgia and the South Sandwich Islands
- - `KR` - South Korea
- - `SS` - South Sudan
- - `ES` - Spain
- - `LK` - Sri Lanka
- - `SD` - Sudan
- - `SR` - Suriname
- - `SJ` - Svalbard and Jan Mayen
- - `SE` - Sweden
- - `CH` - Switzerland
- - `SY` - Syria
- - `TW` - Taiwan
- - `TJ` - Tajikistan
- - `TZ` - Tanzania
- - `TH` - Thailand
- - `TL` - Timor-Leste
- - `TG` - Togo
- - `TK` - Tokelau
- - `TO` - Tonga
- - `TT` - Trinidad and Tobago
- - `TN` - Tunisia
- - `TR` - Turkey
- - `TM` - Turkmenistan
- - `TC` - Turks and Caicos Islands
- - `TV` - Tuvalu
- - `UG` - Uganda
- - `UA` - Ukraine
- - `AE` - United Arab Emirates
- - `GB` - United Kingdom
- - `UM` - United States Minor Outlying Islands
- - `US` - United States of America
- - `UY` - Uruguay
- - `UZ` - Uzbekistan
- - `VU` - Vanuatu
- - `VE` - Venezuela
- - `VN` - Vietnam
- - `VG` - Virgin Islands (British)
- - `VI` - Virgin Islands (U.S.)
- - `WF` - Wallis and Futuna
- - `EH` - Western Sahara
- - `YE` - Yemen
- - `ZM` - Zambia
- - `ZW` - Zimbabwe
- """
-
- AF = "AF"
- AX = "AX"
- AL = "AL"
- DZ = "DZ"
- AS = "AS"
- AD = "AD"
- AO = "AO"
- AI = "AI"
- AQ = "AQ"
- AG = "AG"
- AR = "AR"
- AM = "AM"
- AW = "AW"
- AU = "AU"
- AT = "AT"
- AZ = "AZ"
- BS = "BS"
- BH = "BH"
- BD = "BD"
- BB = "BB"
- BY = "BY"
- BE = "BE"
- BZ = "BZ"
- BJ = "BJ"
- BM = "BM"
- BT = "BT"
- BO = "BO"
- BQ = "BQ"
- BA = "BA"
- BW = "BW"
- BV = "BV"
- BR = "BR"
- IO = "IO"
- BN = "BN"
- BG = "BG"
- BF = "BF"
- BI = "BI"
- CV = "CV"
- KH = "KH"
- CM = "CM"
- CA = "CA"
- KY = "KY"
- CF = "CF"
- TD = "TD"
- CL = "CL"
- CN = "CN"
- CX = "CX"
- CC = "CC"
- CO = "CO"
- KM = "KM"
- CG = "CG"
- CD = "CD"
- CK = "CK"
- CR = "CR"
- CI = "CI"
- HR = "HR"
- CU = "CU"
- CW = "CW"
- CY = "CY"
- CZ = "CZ"
- DK = "DK"
- DJ = "DJ"
- DM = "DM"
- DO = "DO"
- EC = "EC"
- EG = "EG"
- SV = "SV"
- GQ = "GQ"
- ER = "ER"
- EE = "EE"
- SZ = "SZ"
- ET = "ET"
- FK = "FK"
- FO = "FO"
- FJ = "FJ"
- FI = "FI"
- FR = "FR"
- GF = "GF"
- PF = "PF"
- TF = "TF"
- GA = "GA"
- GM = "GM"
- GE = "GE"
- DE = "DE"
- GH = "GH"
- GI = "GI"
- GR = "GR"
- GL = "GL"
- GD = "GD"
- GP = "GP"
- GU = "GU"
- GT = "GT"
- GG = "GG"
- GN = "GN"
- GW = "GW"
- GY = "GY"
- HT = "HT"
- HM = "HM"
- VA = "VA"
- HN = "HN"
- HK = "HK"
- HU = "HU"
- IS = "IS"
- IN = "IN"
- ID = "ID"
- IR = "IR"
- IQ = "IQ"
- IE = "IE"
- IM = "IM"
- IL = "IL"
- IT = "IT"
- JM = "JM"
- JP = "JP"
- JE = "JE"
- JO = "JO"
- KZ = "KZ"
- KE = "KE"
- KI = "KI"
- KW = "KW"
- KG = "KG"
- LA = "LA"
- LV = "LV"
- LB = "LB"
- LS = "LS"
- LR = "LR"
- LY = "LY"
- LI = "LI"
- LT = "LT"
- LU = "LU"
- MO = "MO"
- MG = "MG"
- MW = "MW"
- MY = "MY"
- MV = "MV"
- ML = "ML"
- MT = "MT"
- MH = "MH"
- MQ = "MQ"
- MR = "MR"
- MU = "MU"
- YT = "YT"
- MX = "MX"
- FM = "FM"
- MD = "MD"
- MC = "MC"
- MN = "MN"
- ME = "ME"
- MS = "MS"
- MA = "MA"
- MZ = "MZ"
- MM = "MM"
- NA = "NA"
- NR = "NR"
- NP = "NP"
- NL = "NL"
- NC = "NC"
- NZ = "NZ"
- NI = "NI"
- NE = "NE"
- NG = "NG"
- NU = "NU"
- NF = "NF"
- KP = "KP"
- MK = "MK"
- MP = "MP"
- NO = "NO"
- OM = "OM"
- PK = "PK"
- PW = "PW"
- PS = "PS"
- PA = "PA"
- PG = "PG"
- PY = "PY"
- PE = "PE"
- PH = "PH"
- PN = "PN"
- PL = "PL"
- PT = "PT"
- PR = "PR"
- QA = "QA"
- RE = "RE"
- RO = "RO"
- RU = "RU"
- RW = "RW"
- BL = "BL"
- SH = "SH"
- KN = "KN"
- LC = "LC"
- MF = "MF"
- PM = "PM"
- VC = "VC"
- WS = "WS"
- SM = "SM"
- ST = "ST"
- SA = "SA"
- SN = "SN"
- RS = "RS"
- SC = "SC"
- SL = "SL"
- SG = "SG"
- SX = "SX"
- SK = "SK"
- SI = "SI"
- SB = "SB"
- SO = "SO"
- ZA = "ZA"
- GS = "GS"
- KR = "KR"
- SS = "SS"
- ES = "ES"
- LK = "LK"
- SD = "SD"
- SR = "SR"
- SJ = "SJ"
- SE = "SE"
- CH = "CH"
- SY = "SY"
- TW = "TW"
- TJ = "TJ"
- TZ = "TZ"
- TH = "TH"
- TL = "TL"
- TG = "TG"
- TK = "TK"
- TO = "TO"
- TT = "TT"
- TN = "TN"
- TR = "TR"
- TM = "TM"
- TC = "TC"
- TV = "TV"
- UG = "UG"
- UA = "UA"
- AE = "AE"
- GB = "GB"
- UM = "UM"
- US = "US"
- UY = "UY"
- UZ = "UZ"
- VU = "VU"
- VE = "VE"
- VN = "VN"
- VG = "VG"
- VI = "VI"
- WF = "WF"
- EH = "EH"
- YE = "YE"
- ZM = "ZM"
- ZW = "ZW"
-
- def visit(
- self,
- af: typing.Callable[[], T_Result],
- ax: typing.Callable[[], T_Result],
- al: typing.Callable[[], T_Result],
- dz: typing.Callable[[], T_Result],
- as_: typing.Callable[[], T_Result],
- ad: typing.Callable[[], T_Result],
- ao: typing.Callable[[], T_Result],
- ai: typing.Callable[[], T_Result],
- aq: typing.Callable[[], T_Result],
- ag: typing.Callable[[], T_Result],
- ar: typing.Callable[[], T_Result],
- am: typing.Callable[[], T_Result],
- aw: typing.Callable[[], T_Result],
- au: typing.Callable[[], T_Result],
- at: typing.Callable[[], T_Result],
- az: typing.Callable[[], T_Result],
- bs: typing.Callable[[], T_Result],
- bh: typing.Callable[[], T_Result],
- bd: typing.Callable[[], T_Result],
- bb: typing.Callable[[], T_Result],
- by: typing.Callable[[], T_Result],
- be: typing.Callable[[], T_Result],
- bz: typing.Callable[[], T_Result],
- bj: typing.Callable[[], T_Result],
- bm: typing.Callable[[], T_Result],
- bt: typing.Callable[[], T_Result],
- bo: typing.Callable[[], T_Result],
- bq: typing.Callable[[], T_Result],
- ba: typing.Callable[[], T_Result],
- bw: typing.Callable[[], T_Result],
- bv: typing.Callable[[], T_Result],
- br: typing.Callable[[], T_Result],
- io: typing.Callable[[], T_Result],
- bn: typing.Callable[[], T_Result],
- bg: typing.Callable[[], T_Result],
- bf: typing.Callable[[], T_Result],
- bi: typing.Callable[[], T_Result],
- cv: typing.Callable[[], T_Result],
- kh: typing.Callable[[], T_Result],
- cm: typing.Callable[[], T_Result],
- ca: typing.Callable[[], T_Result],
- ky: typing.Callable[[], T_Result],
- cf: typing.Callable[[], T_Result],
- td: typing.Callable[[], T_Result],
- cl: typing.Callable[[], T_Result],
- cn: typing.Callable[[], T_Result],
- cx: typing.Callable[[], T_Result],
- cc: typing.Callable[[], T_Result],
- co: typing.Callable[[], T_Result],
- km: typing.Callable[[], T_Result],
- cg: typing.Callable[[], T_Result],
- cd: typing.Callable[[], T_Result],
- ck: typing.Callable[[], T_Result],
- cr: typing.Callable[[], T_Result],
- ci: typing.Callable[[], T_Result],
- hr: typing.Callable[[], T_Result],
- cu: typing.Callable[[], T_Result],
- cw: typing.Callable[[], T_Result],
- cy: typing.Callable[[], T_Result],
- cz: typing.Callable[[], T_Result],
- dk: typing.Callable[[], T_Result],
- dj: typing.Callable[[], T_Result],
- dm: typing.Callable[[], T_Result],
- do: typing.Callable[[], T_Result],
- ec: typing.Callable[[], T_Result],
- eg: typing.Callable[[], T_Result],
- sv: typing.Callable[[], T_Result],
- gq: typing.Callable[[], T_Result],
- er: typing.Callable[[], T_Result],
- ee: typing.Callable[[], T_Result],
- sz: typing.Callable[[], T_Result],
- et: typing.Callable[[], T_Result],
- fk: typing.Callable[[], T_Result],
- fo: typing.Callable[[], T_Result],
- fj: typing.Callable[[], T_Result],
- fi: typing.Callable[[], T_Result],
- fr: typing.Callable[[], T_Result],
- gf: typing.Callable[[], T_Result],
- pf: typing.Callable[[], T_Result],
- tf: typing.Callable[[], T_Result],
- ga: typing.Callable[[], T_Result],
- gm: typing.Callable[[], T_Result],
- ge: typing.Callable[[], T_Result],
- de: typing.Callable[[], T_Result],
- gh: typing.Callable[[], T_Result],
- gi: typing.Callable[[], T_Result],
- gr: typing.Callable[[], T_Result],
- gl: typing.Callable[[], T_Result],
- gd: typing.Callable[[], T_Result],
- gp: typing.Callable[[], T_Result],
- gu: typing.Callable[[], T_Result],
- gt: typing.Callable[[], T_Result],
- gg: typing.Callable[[], T_Result],
- gn: typing.Callable[[], T_Result],
- gw: typing.Callable[[], T_Result],
- gy: typing.Callable[[], T_Result],
- ht: typing.Callable[[], T_Result],
- hm: typing.Callable[[], T_Result],
- va: typing.Callable[[], T_Result],
- hn: typing.Callable[[], T_Result],
- hk: typing.Callable[[], T_Result],
- hu: typing.Callable[[], T_Result],
- is_: typing.Callable[[], T_Result],
- in_: typing.Callable[[], T_Result],
- id: typing.Callable[[], T_Result],
- ir: typing.Callable[[], T_Result],
- iq: typing.Callable[[], T_Result],
- ie: typing.Callable[[], T_Result],
- im: typing.Callable[[], T_Result],
- il: typing.Callable[[], T_Result],
- it: typing.Callable[[], T_Result],
- jm: typing.Callable[[], T_Result],
- jp: typing.Callable[[], T_Result],
- je: typing.Callable[[], T_Result],
- jo: typing.Callable[[], T_Result],
- kz: typing.Callable[[], T_Result],
- ke: typing.Callable[[], T_Result],
- ki: typing.Callable[[], T_Result],
- kw: typing.Callable[[], T_Result],
- kg: typing.Callable[[], T_Result],
- la: typing.Callable[[], T_Result],
- lv: typing.Callable[[], T_Result],
- lb: typing.Callable[[], T_Result],
- ls: typing.Callable[[], T_Result],
- lr: typing.Callable[[], T_Result],
- ly: typing.Callable[[], T_Result],
- li: typing.Callable[[], T_Result],
- lt: typing.Callable[[], T_Result],
- lu: typing.Callable[[], T_Result],
- mo: typing.Callable[[], T_Result],
- mg: typing.Callable[[], T_Result],
- mw: typing.Callable[[], T_Result],
- my: typing.Callable[[], T_Result],
- mv: typing.Callable[[], T_Result],
- ml: typing.Callable[[], T_Result],
- mt: typing.Callable[[], T_Result],
- mh: typing.Callable[[], T_Result],
- mq: typing.Callable[[], T_Result],
- mr: typing.Callable[[], T_Result],
- mu: typing.Callable[[], T_Result],
- yt: typing.Callable[[], T_Result],
- mx: typing.Callable[[], T_Result],
- fm: typing.Callable[[], T_Result],
- md: typing.Callable[[], T_Result],
- mc: typing.Callable[[], T_Result],
- mn: typing.Callable[[], T_Result],
- me: typing.Callable[[], T_Result],
- ms: typing.Callable[[], T_Result],
- ma: typing.Callable[[], T_Result],
- mz: typing.Callable[[], T_Result],
- mm: typing.Callable[[], T_Result],
- na: typing.Callable[[], T_Result],
- nr: typing.Callable[[], T_Result],
- np: typing.Callable[[], T_Result],
- nl: typing.Callable[[], T_Result],
- nc: typing.Callable[[], T_Result],
- nz: typing.Callable[[], T_Result],
- ni: typing.Callable[[], T_Result],
- ne: typing.Callable[[], T_Result],
- ng: typing.Callable[[], T_Result],
- nu: typing.Callable[[], T_Result],
- nf: typing.Callable[[], T_Result],
- kp: typing.Callable[[], T_Result],
- mk: typing.Callable[[], T_Result],
- mp: typing.Callable[[], T_Result],
- no: typing.Callable[[], T_Result],
- om: typing.Callable[[], T_Result],
- pk: typing.Callable[[], T_Result],
- pw: typing.Callable[[], T_Result],
- ps: typing.Callable[[], T_Result],
- pa: typing.Callable[[], T_Result],
- pg: typing.Callable[[], T_Result],
- py: typing.Callable[[], T_Result],
- pe: typing.Callable[[], T_Result],
- ph: typing.Callable[[], T_Result],
- pn: typing.Callable[[], T_Result],
- pl: typing.Callable[[], T_Result],
- pt: typing.Callable[[], T_Result],
- pr: typing.Callable[[], T_Result],
- qa: typing.Callable[[], T_Result],
- re: typing.Callable[[], T_Result],
- ro: typing.Callable[[], T_Result],
- ru: typing.Callable[[], T_Result],
- rw: typing.Callable[[], T_Result],
- bl: typing.Callable[[], T_Result],
- sh: typing.Callable[[], T_Result],
- kn: typing.Callable[[], T_Result],
- lc: typing.Callable[[], T_Result],
- mf: typing.Callable[[], T_Result],
- pm: typing.Callable[[], T_Result],
- vc: typing.Callable[[], T_Result],
- ws: typing.Callable[[], T_Result],
- sm: typing.Callable[[], T_Result],
- st: typing.Callable[[], T_Result],
- sa: typing.Callable[[], T_Result],
- sn: typing.Callable[[], T_Result],
- rs: typing.Callable[[], T_Result],
- sc: typing.Callable[[], T_Result],
- sl: typing.Callable[[], T_Result],
- sg: typing.Callable[[], T_Result],
- sx: typing.Callable[[], T_Result],
- sk: typing.Callable[[], T_Result],
- si: typing.Callable[[], T_Result],
- sb: typing.Callable[[], T_Result],
- so: typing.Callable[[], T_Result],
- za: typing.Callable[[], T_Result],
- gs: typing.Callable[[], T_Result],
- kr: typing.Callable[[], T_Result],
- ss: typing.Callable[[], T_Result],
- es: typing.Callable[[], T_Result],
- lk: typing.Callable[[], T_Result],
- sd: typing.Callable[[], T_Result],
- sr: typing.Callable[[], T_Result],
- sj: typing.Callable[[], T_Result],
- se: typing.Callable[[], T_Result],
- ch: typing.Callable[[], T_Result],
- sy: typing.Callable[[], T_Result],
- tw: typing.Callable[[], T_Result],
- tj: typing.Callable[[], T_Result],
- tz: typing.Callable[[], T_Result],
- th: typing.Callable[[], T_Result],
- tl: typing.Callable[[], T_Result],
- tg: typing.Callable[[], T_Result],
- tk: typing.Callable[[], T_Result],
- to: typing.Callable[[], T_Result],
- tt: typing.Callable[[], T_Result],
- tn: typing.Callable[[], T_Result],
- tr: typing.Callable[[], T_Result],
- tm: typing.Callable[[], T_Result],
- tc: typing.Callable[[], T_Result],
- tv: typing.Callable[[], T_Result],
- ug: typing.Callable[[], T_Result],
- ua: typing.Callable[[], T_Result],
- ae: typing.Callable[[], T_Result],
- gb: typing.Callable[[], T_Result],
- um: typing.Callable[[], T_Result],
- us: typing.Callable[[], T_Result],
- uy: typing.Callable[[], T_Result],
- uz: typing.Callable[[], T_Result],
- vu: typing.Callable[[], T_Result],
- ve: typing.Callable[[], T_Result],
- vn: typing.Callable[[], T_Result],
- vg: typing.Callable[[], T_Result],
- vi: typing.Callable[[], T_Result],
- wf: typing.Callable[[], T_Result],
- eh: typing.Callable[[], T_Result],
- ye: typing.Callable[[], T_Result],
- zm: typing.Callable[[], T_Result],
- zw: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CountryEnum.AF:
- return af()
- if self is CountryEnum.AX:
- return ax()
- if self is CountryEnum.AL:
- return al()
- if self is CountryEnum.DZ:
- return dz()
- if self is CountryEnum.AS:
- return as_()
- if self is CountryEnum.AD:
- return ad()
- if self is CountryEnum.AO:
- return ao()
- if self is CountryEnum.AI:
- return ai()
- if self is CountryEnum.AQ:
- return aq()
- if self is CountryEnum.AG:
- return ag()
- if self is CountryEnum.AR:
- return ar()
- if self is CountryEnum.AM:
- return am()
- if self is CountryEnum.AW:
- return aw()
- if self is CountryEnum.AU:
- return au()
- if self is CountryEnum.AT:
- return at()
- if self is CountryEnum.AZ:
- return az()
- if self is CountryEnum.BS:
- return bs()
- if self is CountryEnum.BH:
- return bh()
- if self is CountryEnum.BD:
- return bd()
- if self is CountryEnum.BB:
- return bb()
- if self is CountryEnum.BY:
- return by()
- if self is CountryEnum.BE:
- return be()
- if self is CountryEnum.BZ:
- return bz()
- if self is CountryEnum.BJ:
- return bj()
- if self is CountryEnum.BM:
- return bm()
- if self is CountryEnum.BT:
- return bt()
- if self is CountryEnum.BO:
- return bo()
- if self is CountryEnum.BQ:
- return bq()
- if self is CountryEnum.BA:
- return ba()
- if self is CountryEnum.BW:
- return bw()
- if self is CountryEnum.BV:
- return bv()
- if self is CountryEnum.BR:
- return br()
- if self is CountryEnum.IO:
- return io()
- if self is CountryEnum.BN:
- return bn()
- if self is CountryEnum.BG:
- return bg()
- if self is CountryEnum.BF:
- return bf()
- if self is CountryEnum.BI:
- return bi()
- if self is CountryEnum.CV:
- return cv()
- if self is CountryEnum.KH:
- return kh()
- if self is CountryEnum.CM:
- return cm()
- if self is CountryEnum.CA:
- return ca()
- if self is CountryEnum.KY:
- return ky()
- if self is CountryEnum.CF:
- return cf()
- if self is CountryEnum.TD:
- return td()
- if self is CountryEnum.CL:
- return cl()
- if self is CountryEnum.CN:
- return cn()
- if self is CountryEnum.CX:
- return cx()
- if self is CountryEnum.CC:
- return cc()
- if self is CountryEnum.CO:
- return co()
- if self is CountryEnum.KM:
- return km()
- if self is CountryEnum.CG:
- return cg()
- if self is CountryEnum.CD:
- return cd()
- if self is CountryEnum.CK:
- return ck()
- if self is CountryEnum.CR:
- return cr()
- if self is CountryEnum.CI:
- return ci()
- if self is CountryEnum.HR:
- return hr()
- if self is CountryEnum.CU:
- return cu()
- if self is CountryEnum.CW:
- return cw()
- if self is CountryEnum.CY:
- return cy()
- if self is CountryEnum.CZ:
- return cz()
- if self is CountryEnum.DK:
- return dk()
- if self is CountryEnum.DJ:
- return dj()
- if self is CountryEnum.DM:
- return dm()
- if self is CountryEnum.DO:
- return do()
- if self is CountryEnum.EC:
- return ec()
- if self is CountryEnum.EG:
- return eg()
- if self is CountryEnum.SV:
- return sv()
- if self is CountryEnum.GQ:
- return gq()
- if self is CountryEnum.ER:
- return er()
- if self is CountryEnum.EE:
- return ee()
- if self is CountryEnum.SZ:
- return sz()
- if self is CountryEnum.ET:
- return et()
- if self is CountryEnum.FK:
- return fk()
- if self is CountryEnum.FO:
- return fo()
- if self is CountryEnum.FJ:
- return fj()
- if self is CountryEnum.FI:
- return fi()
- if self is CountryEnum.FR:
- return fr()
- if self is CountryEnum.GF:
- return gf()
- if self is CountryEnum.PF:
- return pf()
- if self is CountryEnum.TF:
- return tf()
- if self is CountryEnum.GA:
- return ga()
- if self is CountryEnum.GM:
- return gm()
- if self is CountryEnum.GE:
- return ge()
- if self is CountryEnum.DE:
- return de()
- if self is CountryEnum.GH:
- return gh()
- if self is CountryEnum.GI:
- return gi()
- if self is CountryEnum.GR:
- return gr()
- if self is CountryEnum.GL:
- return gl()
- if self is CountryEnum.GD:
- return gd()
- if self is CountryEnum.GP:
- return gp()
- if self is CountryEnum.GU:
- return gu()
- if self is CountryEnum.GT:
- return gt()
- if self is CountryEnum.GG:
- return gg()
- if self is CountryEnum.GN:
- return gn()
- if self is CountryEnum.GW:
- return gw()
- if self is CountryEnum.GY:
- return gy()
- if self is CountryEnum.HT:
- return ht()
- if self is CountryEnum.HM:
- return hm()
- if self is CountryEnum.VA:
- return va()
- if self is CountryEnum.HN:
- return hn()
- if self is CountryEnum.HK:
- return hk()
- if self is CountryEnum.HU:
- return hu()
- if self is CountryEnum.IS:
- return is_()
- if self is CountryEnum.IN:
- return in_()
- if self is CountryEnum.ID:
- return id()
- if self is CountryEnum.IR:
- return ir()
- if self is CountryEnum.IQ:
- return iq()
- if self is CountryEnum.IE:
- return ie()
- if self is CountryEnum.IM:
- return im()
- if self is CountryEnum.IL:
- return il()
- if self is CountryEnum.IT:
- return it()
- if self is CountryEnum.JM:
- return jm()
- if self is CountryEnum.JP:
- return jp()
- if self is CountryEnum.JE:
- return je()
- if self is CountryEnum.JO:
- return jo()
- if self is CountryEnum.KZ:
- return kz()
- if self is CountryEnum.KE:
- return ke()
- if self is CountryEnum.KI:
- return ki()
- if self is CountryEnum.KW:
- return kw()
- if self is CountryEnum.KG:
- return kg()
- if self is CountryEnum.LA:
- return la()
- if self is CountryEnum.LV:
- return lv()
- if self is CountryEnum.LB:
- return lb()
- if self is CountryEnum.LS:
- return ls()
- if self is CountryEnum.LR:
- return lr()
- if self is CountryEnum.LY:
- return ly()
- if self is CountryEnum.LI:
- return li()
- if self is CountryEnum.LT:
- return lt()
- if self is CountryEnum.LU:
- return lu()
- if self is CountryEnum.MO:
- return mo()
- if self is CountryEnum.MG:
- return mg()
- if self is CountryEnum.MW:
- return mw()
- if self is CountryEnum.MY:
- return my()
- if self is CountryEnum.MV:
- return mv()
- if self is CountryEnum.ML:
- return ml()
- if self is CountryEnum.MT:
- return mt()
- if self is CountryEnum.MH:
- return mh()
- if self is CountryEnum.MQ:
- return mq()
- if self is CountryEnum.MR:
- return mr()
- if self is CountryEnum.MU:
- return mu()
- if self is CountryEnum.YT:
- return yt()
- if self is CountryEnum.MX:
- return mx()
- if self is CountryEnum.FM:
- return fm()
- if self is CountryEnum.MD:
- return md()
- if self is CountryEnum.MC:
- return mc()
- if self is CountryEnum.MN:
- return mn()
- if self is CountryEnum.ME:
- return me()
- if self is CountryEnum.MS:
- return ms()
- if self is CountryEnum.MA:
- return ma()
- if self is CountryEnum.MZ:
- return mz()
- if self is CountryEnum.MM:
- return mm()
- if self is CountryEnum.NA:
- return na()
- if self is CountryEnum.NR:
- return nr()
- if self is CountryEnum.NP:
- return np()
- if self is CountryEnum.NL:
- return nl()
- if self is CountryEnum.NC:
- return nc()
- if self is CountryEnum.NZ:
- return nz()
- if self is CountryEnum.NI:
- return ni()
- if self is CountryEnum.NE:
- return ne()
- if self is CountryEnum.NG:
- return ng()
- if self is CountryEnum.NU:
- return nu()
- if self is CountryEnum.NF:
- return nf()
- if self is CountryEnum.KP:
- return kp()
- if self is CountryEnum.MK:
- return mk()
- if self is CountryEnum.MP:
- return mp()
- if self is CountryEnum.NO:
- return no()
- if self is CountryEnum.OM:
- return om()
- if self is CountryEnum.PK:
- return pk()
- if self is CountryEnum.PW:
- return pw()
- if self is CountryEnum.PS:
- return ps()
- if self is CountryEnum.PA:
- return pa()
- if self is CountryEnum.PG:
- return pg()
- if self is CountryEnum.PY:
- return py()
- if self is CountryEnum.PE:
- return pe()
- if self is CountryEnum.PH:
- return ph()
- if self is CountryEnum.PN:
- return pn()
- if self is CountryEnum.PL:
- return pl()
- if self is CountryEnum.PT:
- return pt()
- if self is CountryEnum.PR:
- return pr()
- if self is CountryEnum.QA:
- return qa()
- if self is CountryEnum.RE:
- return re()
- if self is CountryEnum.RO:
- return ro()
- if self is CountryEnum.RU:
- return ru()
- if self is CountryEnum.RW:
- return rw()
- if self is CountryEnum.BL:
- return bl()
- if self is CountryEnum.SH:
- return sh()
- if self is CountryEnum.KN:
- return kn()
- if self is CountryEnum.LC:
- return lc()
- if self is CountryEnum.MF:
- return mf()
- if self is CountryEnum.PM:
- return pm()
- if self is CountryEnum.VC:
- return vc()
- if self is CountryEnum.WS:
- return ws()
- if self is CountryEnum.SM:
- return sm()
- if self is CountryEnum.ST:
- return st()
- if self is CountryEnum.SA:
- return sa()
- if self is CountryEnum.SN:
- return sn()
- if self is CountryEnum.RS:
- return rs()
- if self is CountryEnum.SC:
- return sc()
- if self is CountryEnum.SL:
- return sl()
- if self is CountryEnum.SG:
- return sg()
- if self is CountryEnum.SX:
- return sx()
- if self is CountryEnum.SK:
- return sk()
- if self is CountryEnum.SI:
- return si()
- if self is CountryEnum.SB:
- return sb()
- if self is CountryEnum.SO:
- return so()
- if self is CountryEnum.ZA:
- return za()
- if self is CountryEnum.GS:
- return gs()
- if self is CountryEnum.KR:
- return kr()
- if self is CountryEnum.SS:
- return ss()
- if self is CountryEnum.ES:
- return es()
- if self is CountryEnum.LK:
- return lk()
- if self is CountryEnum.SD:
- return sd()
- if self is CountryEnum.SR:
- return sr()
- if self is CountryEnum.SJ:
- return sj()
- if self is CountryEnum.SE:
- return se()
- if self is CountryEnum.CH:
- return ch()
- if self is CountryEnum.SY:
- return sy()
- if self is CountryEnum.TW:
- return tw()
- if self is CountryEnum.TJ:
- return tj()
- if self is CountryEnum.TZ:
- return tz()
- if self is CountryEnum.TH:
- return th()
- if self is CountryEnum.TL:
- return tl()
- if self is CountryEnum.TG:
- return tg()
- if self is CountryEnum.TK:
- return tk()
- if self is CountryEnum.TO:
- return to()
- if self is CountryEnum.TT:
- return tt()
- if self is CountryEnum.TN:
- return tn()
- if self is CountryEnum.TR:
- return tr()
- if self is CountryEnum.TM:
- return tm()
- if self is CountryEnum.TC:
- return tc()
- if self is CountryEnum.TV:
- return tv()
- if self is CountryEnum.UG:
- return ug()
- if self is CountryEnum.UA:
- return ua()
- if self is CountryEnum.AE:
- return ae()
- if self is CountryEnum.GB:
- return gb()
- if self is CountryEnum.UM:
- return um()
- if self is CountryEnum.US:
- return us()
- if self is CountryEnum.UY:
- return uy()
- if self is CountryEnum.UZ:
- return uz()
- if self is CountryEnum.VU:
- return vu()
- if self is CountryEnum.VE:
- return ve()
- if self is CountryEnum.VN:
- return vn()
- if self is CountryEnum.VG:
- return vg()
- if self is CountryEnum.VI:
- return vi()
- if self is CountryEnum.WF:
- return wf()
- if self is CountryEnum.EH:
- return eh()
- if self is CountryEnum.YE:
- return ye()
- if self is CountryEnum.ZM:
- return zm()
- if self is CountryEnum.ZW:
- return zw()
+CountryEnum = typing.Union[
+ typing.Literal[
+ "AF",
+ "AX",
+ "AL",
+ "DZ",
+ "AS",
+ "AD",
+ "AO",
+ "AI",
+ "AQ",
+ "AG",
+ "AR",
+ "AM",
+ "AW",
+ "AU",
+ "AT",
+ "AZ",
+ "BS",
+ "BH",
+ "BD",
+ "BB",
+ "BY",
+ "BE",
+ "BZ",
+ "BJ",
+ "BM",
+ "BT",
+ "BO",
+ "BQ",
+ "BA",
+ "BW",
+ "BV",
+ "BR",
+ "IO",
+ "BN",
+ "BG",
+ "BF",
+ "BI",
+ "CV",
+ "KH",
+ "CM",
+ "CA",
+ "KY",
+ "CF",
+ "TD",
+ "CL",
+ "CN",
+ "CX",
+ "CC",
+ "CO",
+ "KM",
+ "CG",
+ "CD",
+ "CK",
+ "CR",
+ "CI",
+ "HR",
+ "CU",
+ "CW",
+ "CY",
+ "CZ",
+ "DK",
+ "DJ",
+ "DM",
+ "DO",
+ "EC",
+ "EG",
+ "SV",
+ "GQ",
+ "ER",
+ "EE",
+ "SZ",
+ "ET",
+ "FK",
+ "FO",
+ "FJ",
+ "FI",
+ "FR",
+ "GF",
+ "PF",
+ "TF",
+ "GA",
+ "GM",
+ "GE",
+ "DE",
+ "GH",
+ "GI",
+ "GR",
+ "GL",
+ "GD",
+ "GP",
+ "GU",
+ "GT",
+ "GG",
+ "GN",
+ "GW",
+ "GY",
+ "HT",
+ "HM",
+ "VA",
+ "HN",
+ "HK",
+ "HU",
+ "IS",
+ "IN",
+ "ID",
+ "IR",
+ "IQ",
+ "IE",
+ "IM",
+ "IL",
+ "IT",
+ "JM",
+ "JP",
+ "JE",
+ "JO",
+ "KZ",
+ "KE",
+ "KI",
+ "KW",
+ "KG",
+ "LA",
+ "LV",
+ "LB",
+ "LS",
+ "LR",
+ "LY",
+ "LI",
+ "LT",
+ "LU",
+ "MO",
+ "MG",
+ "MW",
+ "MY",
+ "MV",
+ "ML",
+ "MT",
+ "MH",
+ "MQ",
+ "MR",
+ "MU",
+ "YT",
+ "MX",
+ "FM",
+ "MD",
+ "MC",
+ "MN",
+ "ME",
+ "MS",
+ "MA",
+ "MZ",
+ "MM",
+ "NA",
+ "NR",
+ "NP",
+ "NL",
+ "NC",
+ "NZ",
+ "NI",
+ "NE",
+ "NG",
+ "NU",
+ "NF",
+ "KP",
+ "MK",
+ "MP",
+ "NO",
+ "OM",
+ "PK",
+ "PW",
+ "PS",
+ "PA",
+ "PG",
+ "PY",
+ "PE",
+ "PH",
+ "PN",
+ "PL",
+ "PT",
+ "PR",
+ "QA",
+ "RE",
+ "RO",
+ "RU",
+ "RW",
+ "BL",
+ "SH",
+ "KN",
+ "LC",
+ "MF",
+ "PM",
+ "VC",
+ "WS",
+ "SM",
+ "ST",
+ "SA",
+ "SN",
+ "RS",
+ "SC",
+ "SL",
+ "SG",
+ "SX",
+ "SK",
+ "SI",
+ "SB",
+ "SO",
+ "ZA",
+ "GS",
+ "KR",
+ "SS",
+ "ES",
+ "LK",
+ "SD",
+ "SR",
+ "SJ",
+ "SE",
+ "CH",
+ "SY",
+ "TW",
+ "TJ",
+ "TZ",
+ "TH",
+ "TL",
+ "TG",
+ "TK",
+ "TO",
+ "TT",
+ "TN",
+ "TR",
+ "TM",
+ "TC",
+ "TV",
+ "UG",
+ "UA",
+ "AE",
+ "GB",
+ "UM",
+ "US",
+ "UY",
+ "UZ",
+ "VU",
+ "VE",
+ "VN",
+ "VG",
+ "VI",
+ "WF",
+ "EH",
+ "YE",
+ "ZM",
+ "ZW",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/types/data_passthrough_request.py b/src/merge/resources/hris/types/data_passthrough_request.py
index fdf9b18c..f2718105 100644
--- a/src/merge/resources/hris/types/data_passthrough_request.py
+++ b/src/merge/resources/hris/types/data_passthrough_request.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .method_enum import MethodEnum
+import pydantic
+import typing
from .multipart_form_field_request import MultipartFormFieldRequest
from .request_format_enum import RequestFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class DataPassthroughRequest(pydantic_v1.BaseModel):
+class DataPassthroughRequest(UniversalBaseModel):
"""
# The DataPassthrough Object
@@ -24,51 +23,42 @@ class DataPassthroughRequest(pydantic_v1.BaseModel):
"""
method: MethodEnum
- path: str = pydantic_v1.Field()
+ path: str = pydantic.Field()
"""
The path of the request in the third party's platform.
"""
- base_url_override: typing.Optional[str] = pydantic_v1.Field()
+ base_url_override: typing.Optional[str] = pydantic.Field()
"""
An optional override of the third party's base url for the request.
"""
- data: typing.Optional[str] = pydantic_v1.Field()
+ data: typing.Optional[str] = pydantic.Field()
"""
The data with the request. You must include a `request_format` parameter matching the data's format
"""
- multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic_v1.Field()
+ multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field()
"""
Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`.
"""
- headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server.
"""
request_format: typing.Optional[RequestFormatEnum]
- normalize_response: typing.Optional[bool] = pydantic_v1.Field()
+ normalize_response: typing.Optional[bool] = pydantic.Field()
"""
Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/debug_mode_log.py b/src/merge/resources/hris/types/debug_mode_log.py
index 321c9090..2b02c1b9 100644
--- a/src/merge/resources/hris/types/debug_mode_log.py
+++ b/src/merge/resources/hris/types/debug_mode_log.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .debug_model_log_summary import DebugModelLogSummary
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class DebugModeLog(pydantic_v1.BaseModel):
+class DebugModeLog(UniversalBaseModel):
log_id: str
dashboard_view: str
log_summary: DebugModelLogSummary
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/debug_model_log_summary.py b/src/merge/resources/hris/types/debug_model_log_summary.py
index 06bb154b..b4f48752 100644
--- a/src/merge/resources/hris/types/debug_model_log_summary.py
+++ b/src/merge/resources/hris/types/debug_model_log_summary.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class DebugModelLogSummary(pydantic_v1.BaseModel):
+class DebugModelLogSummary(UniversalBaseModel):
url: str
method: str
status_code: int
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/deduction.py b/src/merge/resources/hris/types/deduction.py
index 35b50490..8a5fd904 100644
--- a/src/merge/resources/hris/types/deduction.py
+++ b/src/merge/resources/hris/types/deduction.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Deduction(pydantic_v1.BaseModel):
+class Deduction(UniversalBaseModel):
"""
# The Deduction Object
@@ -22,59 +22,50 @@ class Deduction(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
employee_payroll_run: typing.Optional[str]
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The deduction's name.
"""
- employee_deduction: typing.Optional[float] = pydantic_v1.Field()
+ employee_deduction: typing.Optional[float] = pydantic.Field()
"""
The amount of money that is withheld from an employee's gross pay by the employee.
"""
- company_deduction: typing.Optional[float] = pydantic_v1.Field()
+ company_deduction: typing.Optional[float] = pydantic.Field()
"""
The amount of money that is withheld on behalf of an employee by the company.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/dependent.py b/src/merge/resources/hris/types/dependent.py
index 29e5ff2f..28ecc937 100644
--- a/src/merge/resources/hris/types/dependent.py
+++ b/src/merge/resources/hris/types/dependent.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .dependent_gender import DependentGender
+import pydantic
+import datetime as dt
from .dependent_relationship import DependentRelationship
+from .dependent_gender import DependentGender
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Dependent(pydantic_v1.BaseModel):
+class Dependent(UniversalBaseModel):
"""
# The Dependent Object
@@ -24,37 +24,37 @@ class Dependent(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The dependents's first name.
"""
- middle_name: typing.Optional[str] = pydantic_v1.Field()
+ middle_name: typing.Optional[str] = pydantic.Field()
"""
The dependents's middle name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The dependents's last name.
"""
- relationship: typing.Optional[DependentRelationship] = pydantic_v1.Field()
+ relationship: typing.Optional[DependentRelationship] = pydantic.Field()
"""
The dependent's relationship to the employee.
@@ -63,17 +63,17 @@ class Dependent(pydantic_v1.BaseModel):
- `DOMESTIC_PARTNER` - DOMESTIC_PARTNER
"""
- employee: typing.Optional[str] = pydantic_v1.Field()
+ employee: typing.Optional[str] = pydantic.Field()
"""
The employee this person is a dependent of.
"""
- date_of_birth: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ date_of_birth: typing.Optional[dt.datetime] = pydantic.Field()
"""
The dependent's date of birth.
"""
- gender: typing.Optional[DependentGender] = pydantic_v1.Field()
+ gender: typing.Optional[DependentGender] = pydantic.Field()
"""
The dependent's gender.
@@ -84,48 +84,39 @@ class Dependent(pydantic_v1.BaseModel):
- `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE
"""
- phone_number: typing.Optional[str] = pydantic_v1.Field()
+ phone_number: typing.Optional[str] = pydantic.Field()
"""
The dependent's phone number.
"""
- home_location: typing.Optional[str] = pydantic_v1.Field()
+ home_location: typing.Optional[str] = pydantic.Field()
"""
The dependents's home address.
"""
- is_student: typing.Optional[bool] = pydantic_v1.Field()
+ is_student: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the dependent is a student
"""
- ssn: typing.Optional[str] = pydantic_v1.Field()
+ ssn: typing.Optional[str] = pydantic.Field()
"""
The dependents's social security number.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/dependent_gender.py b/src/merge/resources/hris/types/dependent_gender.py
index 66eddd90..33599e78 100644
--- a/src/merge/resources/hris/types/dependent_gender.py
+++ b/src/merge/resources/hris/types/dependent_gender.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .gender_enum import GenderEnum
DependentGender = typing.Union[GenderEnum, str]
diff --git a/src/merge/resources/hris/types/dependent_relationship.py b/src/merge/resources/hris/types/dependent_relationship.py
index 7fcbcf3b..f8c69152 100644
--- a/src/merge/resources/hris/types/dependent_relationship.py
+++ b/src/merge/resources/hris/types/dependent_relationship.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .relationship_enum import RelationshipEnum
DependentRelationship = typing.Union[RelationshipEnum, str]
diff --git a/src/merge/resources/hris/types/earning.py b/src/merge/resources/hris/types/earning.py
index 238eba58..e14b9a48 100644
--- a/src/merge/resources/hris/types/earning.py
+++ b/src/merge/resources/hris/types/earning.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .earning_type import EarningType
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Earning(pydantic_v1.BaseModel):
+class Earning(UniversalBaseModel):
"""
# The Earning Object
@@ -23,28 +23,28 @@ class Earning(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
employee_payroll_run: typing.Optional[str]
- amount: typing.Optional[float] = pydantic_v1.Field()
+ amount: typing.Optional[float] = pydantic.Field()
"""
The amount earned.
"""
- type: typing.Optional[EarningType] = pydantic_v1.Field()
+ type: typing.Optional[EarningType] = pydantic.Field()
"""
The type of earning.
@@ -54,28 +54,19 @@ class Earning(pydantic_v1.BaseModel):
- `BONUS` - BONUS
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/earning_type.py b/src/merge/resources/hris/types/earning_type.py
index e6bdef05..45b7e816 100644
--- a/src/merge/resources/hris/types/earning_type.py
+++ b/src/merge/resources/hris/types/earning_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .earning_type_enum import EarningTypeEnum
EarningType = typing.Union[EarningTypeEnum, str]
diff --git a/src/merge/resources/hris/types/earning_type_enum.py b/src/merge/resources/hris/types/earning_type_enum.py
index d6c8b519..9142b06c 100644
--- a/src/merge/resources/hris/types/earning_type_enum.py
+++ b/src/merge/resources/hris/types/earning_type_enum.py
@@ -1,36 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EarningTypeEnum(str, enum.Enum):
- """
- - `SALARY` - SALARY
- - `REIMBURSEMENT` - REIMBURSEMENT
- - `OVERTIME` - OVERTIME
- - `BONUS` - BONUS
- """
-
- SALARY = "SALARY"
- REIMBURSEMENT = "REIMBURSEMENT"
- OVERTIME = "OVERTIME"
- BONUS = "BONUS"
-
- def visit(
- self,
- salary: typing.Callable[[], T_Result],
- reimbursement: typing.Callable[[], T_Result],
- overtime: typing.Callable[[], T_Result],
- bonus: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EarningTypeEnum.SALARY:
- return salary()
- if self is EarningTypeEnum.REIMBURSEMENT:
- return reimbursement()
- if self is EarningTypeEnum.OVERTIME:
- return overtime()
- if self is EarningTypeEnum.BONUS:
- return bonus()
+EarningTypeEnum = typing.Union[typing.Literal["SALARY", "REIMBURSEMENT", "OVERTIME", "BONUS"], typing.Any]
diff --git a/src/merge/resources/hris/types/employee.py b/src/merge/resources/hris/types/employee.py
index 482742b2..9a5ddf60 100644
--- a/src/merge/resources/hris/types/employee.py
+++ b/src/merge/resources/hris/types/employee.py
@@ -1,26 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .employee_company import EmployeeCompany
-from .employee_employment_status import EmployeeEmploymentStatus
-from .employee_ethnicity import EmployeeEthnicity
-from .employee_gender import EmployeeGender
from .employee_groups_item import EmployeeGroupsItem
from .employee_home_location import EmployeeHomeLocation
-from .employee_marital_status import EmployeeMaritalStatus
-from .employee_pay_group import EmployeePayGroup
-from .employee_team import EmployeeTeam
from .employee_work_location import EmployeeWorkLocation
+from .employee_team import EmployeeTeam
+from .employee_pay_group import EmployeePayGroup
+from .employee_gender import EmployeeGender
+from .employee_ethnicity import EmployeeEthnicity
+from .employee_marital_status import EmployeeMaritalStatus
+from .employee_employment_status import EmployeeEmploymentStatus
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Employee(pydantic_v1.BaseModel):
+class Employee(UniversalBaseModel):
"""
# The Employee Object
@@ -34,108 +35,108 @@ class Employee(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- employee_number: typing.Optional[str] = pydantic_v1.Field()
+ employee_number: typing.Optional[str] = pydantic.Field()
"""
The employee's number that appears in the third-party integration's UI.
"""
- company: typing.Optional[EmployeeCompany] = pydantic_v1.Field()
+ company: typing.Optional[EmployeeCompany] = pydantic.Field()
"""
The ID of the employee's company.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The employee's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The employee's last name.
"""
- preferred_name: typing.Optional[str] = pydantic_v1.Field()
+ preferred_name: typing.Optional[str] = pydantic.Field()
"""
The employee's preferred first name.
"""
- display_full_name: typing.Optional[str] = pydantic_v1.Field()
+ display_full_name: typing.Optional[str] = pydantic.Field()
"""
The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name.
"""
- username: typing.Optional[str] = pydantic_v1.Field()
+ username: typing.Optional[str] = pydantic.Field()
"""
The employee's username that appears in the remote UI.
"""
groups: typing.Optional[typing.List[typing.Optional[EmployeeGroupsItem]]]
- work_email: typing.Optional[str] = pydantic_v1.Field()
+ work_email: typing.Optional[str] = pydantic.Field()
"""
The employee's work email.
"""
- personal_email: typing.Optional[str] = pydantic_v1.Field()
+ personal_email: typing.Optional[str] = pydantic.Field()
"""
The employee's personal email.
"""
- mobile_phone_number: typing.Optional[str] = pydantic_v1.Field()
+ mobile_phone_number: typing.Optional[str] = pydantic.Field()
"""
The employee's mobile phone number.
"""
- employments: typing.Optional[typing.List[typing.Optional[EmployeeEmploymentsItem]]] = pydantic_v1.Field()
+ employments: typing.Optional[typing.List[typing.Optional["EmployeeEmploymentsItem"]]] = pydantic.Field()
"""
Array of `Employment` IDs for this Employee.
"""
- home_location: typing.Optional[EmployeeHomeLocation] = pydantic_v1.Field()
+ home_location: typing.Optional[EmployeeHomeLocation] = pydantic.Field()
"""
The employee's home address.
"""
- work_location: typing.Optional[EmployeeWorkLocation] = pydantic_v1.Field()
+ work_location: typing.Optional[EmployeeWorkLocation] = pydantic.Field()
"""
The employee's work address.
"""
- manager: typing.Optional[EmployeeManager] = pydantic_v1.Field()
+ manager: typing.Optional["EmployeeManager"] = pydantic.Field()
"""
The employee ID of the employee's manager.
"""
- team: typing.Optional[EmployeeTeam] = pydantic_v1.Field()
+ team: typing.Optional[EmployeeTeam] = pydantic.Field()
"""
The employee's team.
"""
- pay_group: typing.Optional[EmployeePayGroup] = pydantic_v1.Field()
+ pay_group: typing.Optional[EmployeePayGroup] = pydantic.Field()
"""
The employee's pay group
"""
- ssn: typing.Optional[str] = pydantic_v1.Field()
+ ssn: typing.Optional[str] = pydantic.Field()
"""
The employee's social security number.
"""
- gender: typing.Optional[EmployeeGender] = pydantic_v1.Field()
+ gender: typing.Optional[EmployeeGender] = pydantic.Field()
"""
The employee's gender.
@@ -146,7 +147,7 @@ class Employee(pydantic_v1.BaseModel):
- `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE
"""
- ethnicity: typing.Optional[EmployeeEthnicity] = pydantic_v1.Field()
+ ethnicity: typing.Optional[EmployeeEthnicity] = pydantic.Field()
"""
The employee's ethnicity.
@@ -160,7 +161,7 @@ class Employee(pydantic_v1.BaseModel):
- `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE
"""
- marital_status: typing.Optional[EmployeeMaritalStatus] = pydantic_v1.Field()
+ marital_status: typing.Optional[EmployeeMaritalStatus] = pydantic.Field()
"""
The employee's filing status as related to marital status.
@@ -171,27 +172,27 @@ class Employee(pydantic_v1.BaseModel):
- `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD
"""
- date_of_birth: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ date_of_birth: typing.Optional[dt.datetime] = pydantic.Field()
"""
The employee's date of birth.
"""
- hire_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ hire_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you're looking for the employee's start date, refer to the start_date field.
"""
- start_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The date that the employee started working. If an employee was rehired, the most recent start date will be returned.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's employee was created.
"""
- employment_status: typing.Optional[EmployeeEmploymentStatus] = pydantic_v1.Field()
+ employment_status: typing.Optional[EmployeeEmploymentStatus] = pydantic.Field()
"""
The employment status of the employee.
@@ -200,45 +201,39 @@ class Employee(pydantic_v1.BaseModel):
- `INACTIVE` - INACTIVE
"""
- termination_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ termination_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The employee's termination date.
"""
- avatar: typing.Optional[str] = pydantic_v1.Field()
+ avatar: typing.Optional[str] = pydantic.Field()
"""
The URL of the employee's avatar image.
"""
- custom_fields: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ custom_fields: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
Custom fields configured for a given model.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+from .employment import Employment # noqa: E402
from .employee_employments_item import EmployeeEmploymentsItem # noqa: E402
from .employee_manager import EmployeeManager # noqa: E402
-Employee.update_forward_refs()
+update_forward_refs(Employment, Employee=Employee)
+update_forward_refs(Team, Employee=Employee)
+update_forward_refs(Employee)
diff --git a/src/merge/resources/hris/types/employee_company.py b/src/merge/resources/hris/types/employee_company.py
index ff02a5e3..4143b131 100644
--- a/src/merge/resources/hris/types/employee_company.py
+++ b/src/merge/resources/hris/types/employee_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company import Company
EmployeeCompany = typing.Union[str, Company]
diff --git a/src/merge/resources/hris/types/employee_employment_status.py b/src/merge/resources/hris/types/employee_employment_status.py
index a501c497..cabf35ed 100644
--- a/src/merge/resources/hris/types/employee_employment_status.py
+++ b/src/merge/resources/hris/types/employee_employment_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employment_status_enum import EmploymentStatusEnum
EmployeeEmploymentStatus = typing.Union[EmploymentStatusEnum, str]
diff --git a/src/merge/resources/hris/types/employee_employments_item.py b/src/merge/resources/hris/types/employee_employments_item.py
index 3648173b..a383abf1 100644
--- a/src/merge/resources/hris/types/employee_employments_item.py
+++ b/src/merge/resources/hris/types/employee_employments_item.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .employment import Employment
-
-EmployeeEmploymentsItem = typing.Union[str, Employment]
+if typing.TYPE_CHECKING:
+ from .employment import Employment
+EmployeeEmploymentsItem = typing.Union[str, "Employment"]
diff --git a/src/merge/resources/hris/types/employee_ethnicity.py b/src/merge/resources/hris/types/employee_ethnicity.py
index 1542c26b..d88ccd5d 100644
--- a/src/merge/resources/hris/types/employee_ethnicity.py
+++ b/src/merge/resources/hris/types/employee_ethnicity.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ethnicity_enum import EthnicityEnum
EmployeeEthnicity = typing.Union[EthnicityEnum, str]
diff --git a/src/merge/resources/hris/types/employee_gender.py b/src/merge/resources/hris/types/employee_gender.py
index e952a266..b30306c5 100644
--- a/src/merge/resources/hris/types/employee_gender.py
+++ b/src/merge/resources/hris/types/employee_gender.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .gender_enum import GenderEnum
EmployeeGender = typing.Union[GenderEnum, str]
diff --git a/src/merge/resources/hris/types/employee_groups_item.py b/src/merge/resources/hris/types/employee_groups_item.py
index c593a390..0e535588 100644
--- a/src/merge/resources/hris/types/employee_groups_item.py
+++ b/src/merge/resources/hris/types/employee_groups_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .group import Group
EmployeeGroupsItem = typing.Union[str, Group]
diff --git a/src/merge/resources/hris/types/employee_home_location.py b/src/merge/resources/hris/types/employee_home_location.py
index 47c456b9..7093f9ad 100644
--- a/src/merge/resources/hris/types/employee_home_location.py
+++ b/src/merge/resources/hris/types/employee_home_location.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .location import Location
EmployeeHomeLocation = typing.Union[str, Location]
diff --git a/src/merge/resources/hris/types/employee_manager.py b/src/merge/resources/hris/types/employee_manager.py
index 1c30831f..581173b6 100644
--- a/src/merge/resources/hris/types/employee_manager.py
+++ b/src/merge/resources/hris/types/employee_manager.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .employee import Employee
-
-EmployeeManager = typing.Union[str, Employee]
+if typing.TYPE_CHECKING:
+ from .employee import Employee
+EmployeeManager = typing.Union[str, "Employee"]
diff --git a/src/merge/resources/hris/types/employee_marital_status.py b/src/merge/resources/hris/types/employee_marital_status.py
index 4224f2f8..9c59eecb 100644
--- a/src/merge/resources/hris/types/employee_marital_status.py
+++ b/src/merge/resources/hris/types/employee_marital_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .marital_status_enum import MaritalStatusEnum
EmployeeMaritalStatus = typing.Union[MaritalStatusEnum, str]
diff --git a/src/merge/resources/hris/types/employee_pay_group.py b/src/merge/resources/hris/types/employee_pay_group.py
index bbd48716..3ebdac7a 100644
--- a/src/merge/resources/hris/types/employee_pay_group.py
+++ b/src/merge/resources/hris/types/employee_pay_group.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .pay_group import PayGroup
EmployeePayGroup = typing.Union[str, PayGroup]
diff --git a/src/merge/resources/hris/types/employee_payroll_run.py b/src/merge/resources/hris/types/employee_payroll_run.py
index a070cd9b..3a7e199d 100644
--- a/src/merge/resources/hris/types/employee_payroll_run.py
+++ b/src/merge/resources/hris/types/employee_payroll_run.py
@@ -1,19 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .deduction import Deduction
-from .earning import Earning
+import pydantic
+import datetime as dt
from .employee_payroll_run_employee import EmployeePayrollRunEmployee
from .employee_payroll_run_payroll_run import EmployeePayrollRunPayrollRun
-from .remote_data import RemoteData
+from .earning import Earning
+from .deduction import Deduction
from .tax import Tax
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class EmployeePayrollRun(pydantic_v1.BaseModel):
+class EmployeePayrollRun(UniversalBaseModel):
"""
# The EmployeePayrollRun Object
@@ -27,52 +32,52 @@ class EmployeePayrollRun(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- employee: typing.Optional[EmployeePayrollRunEmployee] = pydantic_v1.Field()
+ employee: typing.Optional[EmployeePayrollRunEmployee] = pydantic.Field()
"""
The employee whose payroll is being run.
"""
- payroll_run: typing.Optional[EmployeePayrollRunPayrollRun] = pydantic_v1.Field()
+ payroll_run: typing.Optional[EmployeePayrollRunPayrollRun] = pydantic.Field()
"""
The payroll being run.
"""
- gross_pay: typing.Optional[float] = pydantic_v1.Field()
+ gross_pay: typing.Optional[float] = pydantic.Field()
"""
The total earnings throughout a given period for an employee before any deductions are made.
"""
- net_pay: typing.Optional[float] = pydantic_v1.Field()
+ net_pay: typing.Optional[float] = pydantic.Field()
"""
The take-home pay throughout a given period for an employee after deductions are made.
"""
- start_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time the payroll run started.
"""
- end_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time the payroll run ended.
"""
- check_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ check_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time the payroll run was checked.
"""
@@ -80,28 +85,24 @@ class EmployeePayrollRun(pydantic_v1.BaseModel):
earnings: typing.Optional[typing.List[Earning]]
deductions: typing.Optional[typing.List[Deduction]]
taxes: typing.Optional[typing.List[Tax]]
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, EmployeePayrollRun=EmployeePayrollRun)
+update_forward_refs(Employment, EmployeePayrollRun=EmployeePayrollRun)
+update_forward_refs(Team, EmployeePayrollRun=EmployeePayrollRun)
diff --git a/src/merge/resources/hris/types/employee_payroll_run_employee.py b/src/merge/resources/hris/types/employee_payroll_run_employee.py
index 81b936f7..c0d50ebb 100644
--- a/src/merge/resources/hris/types/employee_payroll_run_employee.py
+++ b/src/merge/resources/hris/types/employee_payroll_run_employee.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
EmployeePayrollRunEmployee = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/employee_payroll_run_payroll_run.py b/src/merge/resources/hris/types/employee_payroll_run_payroll_run.py
index df420988..5fcdf8ce 100644
--- a/src/merge/resources/hris/types/employee_payroll_run_payroll_run.py
+++ b/src/merge/resources/hris/types/employee_payroll_run_payroll_run.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .payroll_run import PayrollRun
EmployeePayrollRunPayrollRun = typing.Union[str, PayrollRun]
diff --git a/src/merge/resources/hris/types/employee_request.py b/src/merge/resources/hris/types/employee_request.py
index fa08ade2..97cf559c 100644
--- a/src/merge/resources/hris/types/employee_request.py
+++ b/src/merge/resources/hris/types/employee_request.py
@@ -1,25 +1,30 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .employee_request_company import EmployeeRequestCompany
-from .employee_request_employment_status import EmployeeRequestEmploymentStatus
-from .employee_request_employments_item import EmployeeRequestEmploymentsItem
-from .employee_request_ethnicity import EmployeeRequestEthnicity
-from .employee_request_gender import EmployeeRequestGender
from .employee_request_groups_item import EmployeeRequestGroupsItem
+from .employee_request_employments_item import EmployeeRequestEmploymentsItem
from .employee_request_home_location import EmployeeRequestHomeLocation
+from .employee_request_work_location import EmployeeRequestWorkLocation
from .employee_request_manager import EmployeeRequestManager
-from .employee_request_marital_status import EmployeeRequestMaritalStatus
-from .employee_request_pay_group import EmployeeRequestPayGroup
from .employee_request_team import EmployeeRequestTeam
-from .employee_request_work_location import EmployeeRequestWorkLocation
+from .employee_request_pay_group import EmployeeRequestPayGroup
+from .employee_request_gender import EmployeeRequestGender
+from .employee_request_ethnicity import EmployeeRequestEthnicity
+from .employee_request_marital_status import EmployeeRequestMaritalStatus
+import datetime as dt
+from .employee_request_employment_status import EmployeeRequestEmploymentStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class EmployeeRequest(pydantic_v1.BaseModel):
+class EmployeeRequest(UniversalBaseModel):
"""
# The Employee Object
@@ -32,93 +37,93 @@ class EmployeeRequest(pydantic_v1.BaseModel):
Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees.
"""
- employee_number: typing.Optional[str] = pydantic_v1.Field()
+ employee_number: typing.Optional[str] = pydantic.Field()
"""
The employee's number that appears in the third-party integration's UI.
"""
- company: typing.Optional[EmployeeRequestCompany] = pydantic_v1.Field()
+ company: typing.Optional[EmployeeRequestCompany] = pydantic.Field()
"""
The ID of the employee's company.
"""
- first_name: typing.Optional[str] = pydantic_v1.Field()
+ first_name: typing.Optional[str] = pydantic.Field()
"""
The employee's first name.
"""
- last_name: typing.Optional[str] = pydantic_v1.Field()
+ last_name: typing.Optional[str] = pydantic.Field()
"""
The employee's last name.
"""
- preferred_name: typing.Optional[str] = pydantic_v1.Field()
+ preferred_name: typing.Optional[str] = pydantic.Field()
"""
The employee's preferred first name.
"""
- display_full_name: typing.Optional[str] = pydantic_v1.Field()
+ display_full_name: typing.Optional[str] = pydantic.Field()
"""
The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name.
"""
- username: typing.Optional[str] = pydantic_v1.Field()
+ username: typing.Optional[str] = pydantic.Field()
"""
The employee's username that appears in the remote UI.
"""
groups: typing.Optional[typing.List[typing.Optional[EmployeeRequestGroupsItem]]]
- work_email: typing.Optional[str] = pydantic_v1.Field()
+ work_email: typing.Optional[str] = pydantic.Field()
"""
The employee's work email.
"""
- personal_email: typing.Optional[str] = pydantic_v1.Field()
+ personal_email: typing.Optional[str] = pydantic.Field()
"""
The employee's personal email.
"""
- mobile_phone_number: typing.Optional[str] = pydantic_v1.Field()
+ mobile_phone_number: typing.Optional[str] = pydantic.Field()
"""
The employee's mobile phone number.
"""
- employments: typing.Optional[typing.List[typing.Optional[EmployeeRequestEmploymentsItem]]] = pydantic_v1.Field()
+ employments: typing.Optional[typing.List[typing.Optional[EmployeeRequestEmploymentsItem]]] = pydantic.Field()
"""
Array of `Employment` IDs for this Employee.
"""
- home_location: typing.Optional[EmployeeRequestHomeLocation] = pydantic_v1.Field()
+ home_location: typing.Optional[EmployeeRequestHomeLocation] = pydantic.Field()
"""
The employee's home address.
"""
- work_location: typing.Optional[EmployeeRequestWorkLocation] = pydantic_v1.Field()
+ work_location: typing.Optional[EmployeeRequestWorkLocation] = pydantic.Field()
"""
The employee's work address.
"""
- manager: typing.Optional[EmployeeRequestManager] = pydantic_v1.Field()
+ manager: typing.Optional[EmployeeRequestManager] = pydantic.Field()
"""
The employee ID of the employee's manager.
"""
- team: typing.Optional[EmployeeRequestTeam] = pydantic_v1.Field()
+ team: typing.Optional[EmployeeRequestTeam] = pydantic.Field()
"""
The employee's team.
"""
- pay_group: typing.Optional[EmployeeRequestPayGroup] = pydantic_v1.Field()
+ pay_group: typing.Optional[EmployeeRequestPayGroup] = pydantic.Field()
"""
The employee's pay group
"""
- ssn: typing.Optional[str] = pydantic_v1.Field()
+ ssn: typing.Optional[str] = pydantic.Field()
"""
The employee's social security number.
"""
- gender: typing.Optional[EmployeeRequestGender] = pydantic_v1.Field()
+ gender: typing.Optional[EmployeeRequestGender] = pydantic.Field()
"""
The employee's gender.
@@ -129,7 +134,7 @@ class EmployeeRequest(pydantic_v1.BaseModel):
- `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE
"""
- ethnicity: typing.Optional[EmployeeRequestEthnicity] = pydantic_v1.Field()
+ ethnicity: typing.Optional[EmployeeRequestEthnicity] = pydantic.Field()
"""
The employee's ethnicity.
@@ -143,7 +148,7 @@ class EmployeeRequest(pydantic_v1.BaseModel):
- `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE
"""
- marital_status: typing.Optional[EmployeeRequestMaritalStatus] = pydantic_v1.Field()
+ marital_status: typing.Optional[EmployeeRequestMaritalStatus] = pydantic.Field()
"""
The employee's filing status as related to marital status.
@@ -154,22 +159,22 @@ class EmployeeRequest(pydantic_v1.BaseModel):
- `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD
"""
- date_of_birth: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ date_of_birth: typing.Optional[dt.datetime] = pydantic.Field()
"""
The employee's date of birth.
"""
- hire_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ hire_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you're looking for the employee's start date, refer to the start_date field.
"""
- start_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The date that the employee started working. If an employee was rehired, the most recent start date will be returned.
"""
- employment_status: typing.Optional[EmployeeRequestEmploymentStatus] = pydantic_v1.Field()
+ employment_status: typing.Optional[EmployeeRequestEmploymentStatus] = pydantic.Field()
"""
The employment status of the employee.
@@ -178,33 +183,29 @@ class EmployeeRequest(pydantic_v1.BaseModel):
- `INACTIVE` - INACTIVE
"""
- termination_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ termination_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The employee's termination date.
"""
- avatar: typing.Optional[str] = pydantic_v1.Field()
+ avatar: typing.Optional[str] = pydantic.Field()
"""
The URL of the employee's avatar image.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, EmployeeRequest=EmployeeRequest)
+update_forward_refs(Employment, EmployeeRequest=EmployeeRequest)
+update_forward_refs(Team, EmployeeRequest=EmployeeRequest)
diff --git a/src/merge/resources/hris/types/employee_request_company.py b/src/merge/resources/hris/types/employee_request_company.py
index e17c35a2..1239be14 100644
--- a/src/merge/resources/hris/types/employee_request_company.py
+++ b/src/merge/resources/hris/types/employee_request_company.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .company import Company
EmployeeRequestCompany = typing.Union[str, Company]
diff --git a/src/merge/resources/hris/types/employee_request_employment_status.py b/src/merge/resources/hris/types/employee_request_employment_status.py
index f4c180c5..a4b01832 100644
--- a/src/merge/resources/hris/types/employee_request_employment_status.py
+++ b/src/merge/resources/hris/types/employee_request_employment_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employment_status_enum import EmploymentStatusEnum
EmployeeRequestEmploymentStatus = typing.Union[EmploymentStatusEnum, str]
diff --git a/src/merge/resources/hris/types/employee_request_employments_item.py b/src/merge/resources/hris/types/employee_request_employments_item.py
index cc4eee8a..40921da3 100644
--- a/src/merge/resources/hris/types/employee_request_employments_item.py
+++ b/src/merge/resources/hris/types/employee_request_employments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employment import Employment
EmployeeRequestEmploymentsItem = typing.Union[str, Employment]
diff --git a/src/merge/resources/hris/types/employee_request_ethnicity.py b/src/merge/resources/hris/types/employee_request_ethnicity.py
index 8816900a..8b32c44e 100644
--- a/src/merge/resources/hris/types/employee_request_ethnicity.py
+++ b/src/merge/resources/hris/types/employee_request_ethnicity.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ethnicity_enum import EthnicityEnum
EmployeeRequestEthnicity = typing.Union[EthnicityEnum, str]
diff --git a/src/merge/resources/hris/types/employee_request_gender.py b/src/merge/resources/hris/types/employee_request_gender.py
index b6199f45..e083b406 100644
--- a/src/merge/resources/hris/types/employee_request_gender.py
+++ b/src/merge/resources/hris/types/employee_request_gender.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .gender_enum import GenderEnum
EmployeeRequestGender = typing.Union[GenderEnum, str]
diff --git a/src/merge/resources/hris/types/employee_request_groups_item.py b/src/merge/resources/hris/types/employee_request_groups_item.py
index 6507e912..fb12b2e7 100644
--- a/src/merge/resources/hris/types/employee_request_groups_item.py
+++ b/src/merge/resources/hris/types/employee_request_groups_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .group import Group
EmployeeRequestGroupsItem = typing.Union[str, Group]
diff --git a/src/merge/resources/hris/types/employee_request_home_location.py b/src/merge/resources/hris/types/employee_request_home_location.py
index ac679a4e..584855d4 100644
--- a/src/merge/resources/hris/types/employee_request_home_location.py
+++ b/src/merge/resources/hris/types/employee_request_home_location.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .location import Location
EmployeeRequestHomeLocation = typing.Union[str, Location]
diff --git a/src/merge/resources/hris/types/employee_request_manager.py b/src/merge/resources/hris/types/employee_request_manager.py
index 7951bebb..1280ad33 100644
--- a/src/merge/resources/hris/types/employee_request_manager.py
+++ b/src/merge/resources/hris/types/employee_request_manager.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
EmployeeRequestManager = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/employee_request_marital_status.py b/src/merge/resources/hris/types/employee_request_marital_status.py
index 726b8287..60dffaeb 100644
--- a/src/merge/resources/hris/types/employee_request_marital_status.py
+++ b/src/merge/resources/hris/types/employee_request_marital_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .marital_status_enum import MaritalStatusEnum
EmployeeRequestMaritalStatus = typing.Union[MaritalStatusEnum, str]
diff --git a/src/merge/resources/hris/types/employee_request_pay_group.py b/src/merge/resources/hris/types/employee_request_pay_group.py
index 383335c7..cb9a2a25 100644
--- a/src/merge/resources/hris/types/employee_request_pay_group.py
+++ b/src/merge/resources/hris/types/employee_request_pay_group.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .pay_group import PayGroup
EmployeeRequestPayGroup = typing.Union[str, PayGroup]
diff --git a/src/merge/resources/hris/types/employee_request_team.py b/src/merge/resources/hris/types/employee_request_team.py
index a08d6d41..d3bfd5a3 100644
--- a/src/merge/resources/hris/types/employee_request_team.py
+++ b/src/merge/resources/hris/types/employee_request_team.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .team import Team
EmployeeRequestTeam = typing.Union[str, Team]
diff --git a/src/merge/resources/hris/types/employee_request_work_location.py b/src/merge/resources/hris/types/employee_request_work_location.py
index 118c99b5..8580ad11 100644
--- a/src/merge/resources/hris/types/employee_request_work_location.py
+++ b/src/merge/resources/hris/types/employee_request_work_location.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .location import Location
EmployeeRequestWorkLocation = typing.Union[str, Location]
diff --git a/src/merge/resources/hris/types/employee_response.py b/src/merge/resources/hris/types/employee_response.py
index 7a01fca3..e236db18 100644
--- a/src/merge/resources/hris/types/employee_response.py
+++ b/src/merge/resources/hris/types/employee_response.py
@@ -1,36 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .employee import Employee
-from .error_validation_problem import ErrorValidationProblem
+from .employment import Employment
+from .team import Team
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class EmployeeResponse(pydantic_v1.BaseModel):
+class EmployeeResponse(UniversalBaseModel):
model: Employee
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, EmployeeResponse=EmployeeResponse)
+update_forward_refs(Employment, EmployeeResponse=EmployeeResponse)
+update_forward_refs(Team, EmployeeResponse=EmployeeResponse)
diff --git a/src/merge/resources/hris/types/employee_team.py b/src/merge/resources/hris/types/employee_team.py
index 5e623a95..49f5e252 100644
--- a/src/merge/resources/hris/types/employee_team.py
+++ b/src/merge/resources/hris/types/employee_team.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .team import Team
EmployeeTeam = typing.Union[str, Team]
diff --git a/src/merge/resources/hris/types/employee_work_location.py b/src/merge/resources/hris/types/employee_work_location.py
index 9a38a1d8..46a89c37 100644
--- a/src/merge/resources/hris/types/employee_work_location.py
+++ b/src/merge/resources/hris/types/employee_work_location.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .location import Location
EmployeeWorkLocation = typing.Union[str, Location]
diff --git a/src/merge/resources/hris/types/employer_benefit.py b/src/merge/resources/hris/types/employer_benefit.py
index 5806a90a..a00410ac 100644
--- a/src/merge/resources/hris/types/employer_benefit.py
+++ b/src/merge/resources/hris/types/employer_benefit.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .employer_benefit_benefit_plan_type import EmployerBenefitBenefitPlanType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class EmployerBenefit(pydantic_v1.BaseModel):
+class EmployerBenefit(UniversalBaseModel):
"""
# The EmployerBenefit Object
@@ -22,22 +22,22 @@ class EmployerBenefit(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- benefit_plan_type: typing.Optional[EmployerBenefitBenefitPlanType] = pydantic_v1.Field()
+ benefit_plan_type: typing.Optional[EmployerBenefitBenefitPlanType] = pydantic.Field()
"""
The type of benefit plan.
@@ -48,43 +48,34 @@ class EmployerBenefit(pydantic_v1.BaseModel):
- `OTHER` - OTHER
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The employer benefit's name - typically the carrier or network name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The employer benefit's description.
"""
- deduction_code: typing.Optional[str] = pydantic_v1.Field()
+ deduction_code: typing.Optional[str] = pydantic.Field()
"""
The employer benefit's deduction code.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/employer_benefit_benefit_plan_type.py b/src/merge/resources/hris/types/employer_benefit_benefit_plan_type.py
index c2eae35a..bc0bd245 100644
--- a/src/merge/resources/hris/types/employer_benefit_benefit_plan_type.py
+++ b/src/merge/resources/hris/types/employer_benefit_benefit_plan_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .benefit_plan_type_enum import BenefitPlanTypeEnum
EmployerBenefitBenefitPlanType = typing.Union[BenefitPlanTypeEnum, str]
diff --git a/src/merge/resources/hris/types/employment.py b/src/merge/resources/hris/types/employment.py
index 40e9b99b..12db0072 100644
--- a/src/merge/resources/hris/types/employment.py
+++ b/src/merge/resources/hris/types/employment.py
@@ -1,22 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .employment_employment_type import EmploymentEmploymentType
-from .employment_flsa_status import EmploymentFlsaStatus
-from .employment_pay_currency import EmploymentPayCurrency
+import pydantic
+import datetime as dt
+from .employment_pay_period import EmploymentPayPeriod
from .employment_pay_frequency import EmploymentPayFrequency
+from .employment_pay_currency import EmploymentPayCurrency
from .employment_pay_group import EmploymentPayGroup
-from .employment_pay_period import EmploymentPayPeriod
+from .employment_flsa_status import EmploymentFlsaStatus
+from .employment_employment_type import EmploymentEmploymentType
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Employment(pydantic_v1.BaseModel):
+class Employment(UniversalBaseModel):
"""
# The Employment Object
@@ -32,37 +33,37 @@ class Employment(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- employee: typing.Optional[EmploymentEmployee] = pydantic_v1.Field()
+ employee: typing.Optional["EmploymentEmployee"] = pydantic.Field()
"""
The employee holding this position.
"""
- job_title: typing.Optional[str] = pydantic_v1.Field()
+ job_title: typing.Optional[str] = pydantic.Field()
"""
The position's title.
"""
- pay_rate: typing.Optional[float] = pydantic_v1.Field()
+ pay_rate: typing.Optional[float] = pydantic.Field()
"""
The position's pay rate in dollars.
"""
- pay_period: typing.Optional[EmploymentPayPeriod] = pydantic_v1.Field()
+ pay_period: typing.Optional[EmploymentPayPeriod] = pydantic.Field()
"""
The time period this pay rate encompasses.
@@ -77,7 +78,7 @@ class Employment(pydantic_v1.BaseModel):
- `YEAR` - YEAR
"""
- pay_frequency: typing.Optional[EmploymentPayFrequency] = pydantic_v1.Field()
+ pay_frequency: typing.Optional[EmploymentPayFrequency] = pydantic.Field()
"""
The position's pay frequency.
@@ -92,7 +93,7 @@ class Employment(pydantic_v1.BaseModel):
- `SEMIMONTHLY` - SEMIMONTHLY
"""
- pay_currency: typing.Optional[EmploymentPayCurrency] = pydantic_v1.Field()
+ pay_currency: typing.Optional[EmploymentPayCurrency] = pydantic.Field()
"""
The position's currency code.
@@ -404,12 +405,12 @@ class Employment(pydantic_v1.BaseModel):
- `ZWL` - Zimbabwean Dollar (2009)
"""
- pay_group: typing.Optional[EmploymentPayGroup] = pydantic_v1.Field()
+ pay_group: typing.Optional[EmploymentPayGroup] = pydantic.Field()
"""
The employment's pay group
"""
- flsa_status: typing.Optional[EmploymentFlsaStatus] = pydantic_v1.Field()
+ flsa_status: typing.Optional[EmploymentFlsaStatus] = pydantic.Field()
"""
The position's FLSA status.
@@ -419,12 +420,12 @@ class Employment(pydantic_v1.BaseModel):
- `OWNER` - OWNER
"""
- effective_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ effective_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The position's effective date.
"""
- employment_type: typing.Optional[EmploymentEmploymentType] = pydantic_v1.Field()
+ employment_type: typing.Optional[EmploymentEmploymentType] = pydantic.Field()
"""
The position's type of employment.
@@ -435,33 +436,27 @@ class Employment(pydantic_v1.BaseModel):
- `FREELANCE` - FREELANCE
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+from .employee import Employee # noqa: E402
from .employment_employee import EmploymentEmployee # noqa: E402
-Employment.update_forward_refs()
+update_forward_refs(Employee, Employment=Employment)
+update_forward_refs(Team, Employment=Employment)
+update_forward_refs(Employment)
diff --git a/src/merge/resources/hris/types/employment_employee.py b/src/merge/resources/hris/types/employment_employee.py
index 60394f2e..3ad5d50f 100644
--- a/src/merge/resources/hris/types/employment_employee.py
+++ b/src/merge/resources/hris/types/employment_employee.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .employee import Employee
-
-EmploymentEmployee = typing.Union[str, Employee]
+if typing.TYPE_CHECKING:
+ from .employee import Employee
+EmploymentEmployee = typing.Union[str, "Employee"]
diff --git a/src/merge/resources/hris/types/employment_employment_type.py b/src/merge/resources/hris/types/employment_employment_type.py
index da342b88..758c5e93 100644
--- a/src/merge/resources/hris/types/employment_employment_type.py
+++ b/src/merge/resources/hris/types/employment_employment_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employment_type_enum import EmploymentTypeEnum
EmploymentEmploymentType = typing.Union[EmploymentTypeEnum, str]
diff --git a/src/merge/resources/hris/types/employment_flsa_status.py b/src/merge/resources/hris/types/employment_flsa_status.py
index 8a06740b..ede105f0 100644
--- a/src/merge/resources/hris/types/employment_flsa_status.py
+++ b/src/merge/resources/hris/types/employment_flsa_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .flsa_status_enum import FlsaStatusEnum
EmploymentFlsaStatus = typing.Union[FlsaStatusEnum, str]
diff --git a/src/merge/resources/hris/types/employment_pay_currency.py b/src/merge/resources/hris/types/employment_pay_currency.py
index 83fa04b0..d941d0d3 100644
--- a/src/merge/resources/hris/types/employment_pay_currency.py
+++ b/src/merge/resources/hris/types/employment_pay_currency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .pay_currency_enum import PayCurrencyEnum
EmploymentPayCurrency = typing.Union[PayCurrencyEnum, str]
diff --git a/src/merge/resources/hris/types/employment_pay_frequency.py b/src/merge/resources/hris/types/employment_pay_frequency.py
index 93d7d2a5..bde6467d 100644
--- a/src/merge/resources/hris/types/employment_pay_frequency.py
+++ b/src/merge/resources/hris/types/employment_pay_frequency.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .pay_frequency_enum import PayFrequencyEnum
EmploymentPayFrequency = typing.Union[PayFrequencyEnum, str]
diff --git a/src/merge/resources/hris/types/employment_pay_group.py b/src/merge/resources/hris/types/employment_pay_group.py
index d2259900..34d4aee3 100644
--- a/src/merge/resources/hris/types/employment_pay_group.py
+++ b/src/merge/resources/hris/types/employment_pay_group.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .pay_group import PayGroup
EmploymentPayGroup = typing.Union[str, PayGroup]
diff --git a/src/merge/resources/hris/types/employment_pay_period.py b/src/merge/resources/hris/types/employment_pay_period.py
index 96945814..642590fd 100644
--- a/src/merge/resources/hris/types/employment_pay_period.py
+++ b/src/merge/resources/hris/types/employment_pay_period.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .pay_period_enum import PayPeriodEnum
EmploymentPayPeriod = typing.Union[PayPeriodEnum, str]
diff --git a/src/merge/resources/hris/types/employment_status_enum.py b/src/merge/resources/hris/types/employment_status_enum.py
index 7ca59ca8..605948e4 100644
--- a/src/merge/resources/hris/types/employment_status_enum.py
+++ b/src/merge/resources/hris/types/employment_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentStatusEnum(str, enum.Enum):
- """
- - `ACTIVE` - ACTIVE
- - `PENDING` - PENDING
- - `INACTIVE` - INACTIVE
- """
-
- ACTIVE = "ACTIVE"
- PENDING = "PENDING"
- INACTIVE = "INACTIVE"
-
- def visit(
- self,
- active: typing.Callable[[], T_Result],
- pending: typing.Callable[[], T_Result],
- inactive: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentStatusEnum.ACTIVE:
- return active()
- if self is EmploymentStatusEnum.PENDING:
- return pending()
- if self is EmploymentStatusEnum.INACTIVE:
- return inactive()
+EmploymentStatusEnum = typing.Union[typing.Literal["ACTIVE", "PENDING", "INACTIVE"], typing.Any]
diff --git a/src/merge/resources/hris/types/employment_type_enum.py b/src/merge/resources/hris/types/employment_type_enum.py
index 6e514efb..25e009b1 100644
--- a/src/merge/resources/hris/types/employment_type_enum.py
+++ b/src/merge/resources/hris/types/employment_type_enum.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EmploymentTypeEnum(str, enum.Enum):
- """
- - `FULL_TIME` - FULL_TIME
- - `PART_TIME` - PART_TIME
- - `INTERN` - INTERN
- - `CONTRACTOR` - CONTRACTOR
- - `FREELANCE` - FREELANCE
- """
-
- FULL_TIME = "FULL_TIME"
- PART_TIME = "PART_TIME"
- INTERN = "INTERN"
- CONTRACTOR = "CONTRACTOR"
- FREELANCE = "FREELANCE"
-
- def visit(
- self,
- full_time: typing.Callable[[], T_Result],
- part_time: typing.Callable[[], T_Result],
- intern: typing.Callable[[], T_Result],
- contractor: typing.Callable[[], T_Result],
- freelance: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EmploymentTypeEnum.FULL_TIME:
- return full_time()
- if self is EmploymentTypeEnum.PART_TIME:
- return part_time()
- if self is EmploymentTypeEnum.INTERN:
- return intern()
- if self is EmploymentTypeEnum.CONTRACTOR:
- return contractor()
- if self is EmploymentTypeEnum.FREELANCE:
- return freelance()
+EmploymentTypeEnum = typing.Union[
+ typing.Literal["FULL_TIME", "PART_TIME", "INTERN", "CONTRACTOR", "FREELANCE"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/enabled_actions_enum.py b/src/merge/resources/hris/types/enabled_actions_enum.py
index 949d69dc..fa6c674e 100644
--- a/src/merge/resources/hris/types/enabled_actions_enum.py
+++ b/src/merge/resources/hris/types/enabled_actions_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EnabledActionsEnum(str, enum.Enum):
- """
- - `READ` - READ
- - `WRITE` - WRITE
- """
-
- READ = "READ"
- WRITE = "WRITE"
-
- def visit(self, read: typing.Callable[[], T_Result], write: typing.Callable[[], T_Result]) -> T_Result:
- if self is EnabledActionsEnum.READ:
- return read()
- if self is EnabledActionsEnum.WRITE:
- return write()
+EnabledActionsEnum = typing.Union[typing.Literal["READ", "WRITE"], typing.Any]
diff --git a/src/merge/resources/hris/types/encoding_enum.py b/src/merge/resources/hris/types/encoding_enum.py
index fed12372..4c4997b2 100644
--- a/src/merge/resources/hris/types/encoding_enum.py
+++ b/src/merge/resources/hris/types/encoding_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EncodingEnum(str, enum.Enum):
- """
- - `RAW` - RAW
- - `BASE64` - BASE64
- - `GZIP_BASE64` - GZIP_BASE64
- """
-
- RAW = "RAW"
- BASE_64 = "BASE64"
- GZIP_BASE_64 = "GZIP_BASE64"
-
- def visit(
- self,
- raw: typing.Callable[[], T_Result],
- base_64: typing.Callable[[], T_Result],
- gzip_base_64: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EncodingEnum.RAW:
- return raw()
- if self is EncodingEnum.BASE_64:
- return base_64()
- if self is EncodingEnum.GZIP_BASE_64:
- return gzip_base_64()
+EncodingEnum = typing.Union[typing.Literal["RAW", "BASE64", "GZIP_BASE64"], typing.Any]
diff --git a/src/merge/resources/hris/types/error_validation_problem.py b/src/merge/resources/hris/types/error_validation_problem.py
index 425af45c..58ea87e6 100644
--- a/src/merge/resources/hris/types/error_validation_problem.py
+++ b/src/merge/resources/hris/types/error_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ErrorValidationProblem(pydantic_v1.BaseModel):
+class ErrorValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/ethnicity_enum.py b/src/merge/resources/hris/types/ethnicity_enum.py
index 67d6b0ea..d443445f 100644
--- a/src/merge/resources/hris/types/ethnicity_enum.py
+++ b/src/merge/resources/hris/types/ethnicity_enum.py
@@ -1,56 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EthnicityEnum(str, enum.Enum):
- """
- - `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE
- - `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT
- - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN
- - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO
- - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER
- - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES
- - `WHITE` - WHITE
- - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE
- """
-
- AMERICAN_INDIAN_OR_ALASKA_NATIVE = "AMERICAN_INDIAN_OR_ALASKA_NATIVE"
- ASIAN_OR_INDIAN_SUBCONTINENT = "ASIAN_OR_INDIAN_SUBCONTINENT"
- BLACK_OR_AFRICAN_AMERICAN = "BLACK_OR_AFRICAN_AMERICAN"
- HISPANIC_OR_LATINO = "HISPANIC_OR_LATINO"
- NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER = "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER"
- TWO_OR_MORE_RACES = "TWO_OR_MORE_RACES"
- WHITE = "WHITE"
- PREFER_NOT_TO_DISCLOSE = "PREFER_NOT_TO_DISCLOSE"
-
- def visit(
- self,
- american_indian_or_alaska_native: typing.Callable[[], T_Result],
- asian_or_indian_subcontinent: typing.Callable[[], T_Result],
- black_or_african_american: typing.Callable[[], T_Result],
- hispanic_or_latino: typing.Callable[[], T_Result],
- native_hawaiian_or_other_pacific_islander: typing.Callable[[], T_Result],
- two_or_more_races: typing.Callable[[], T_Result],
- white: typing.Callable[[], T_Result],
- prefer_not_to_disclose: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EthnicityEnum.AMERICAN_INDIAN_OR_ALASKA_NATIVE:
- return american_indian_or_alaska_native()
- if self is EthnicityEnum.ASIAN_OR_INDIAN_SUBCONTINENT:
- return asian_or_indian_subcontinent()
- if self is EthnicityEnum.BLACK_OR_AFRICAN_AMERICAN:
- return black_or_african_american()
- if self is EthnicityEnum.HISPANIC_OR_LATINO:
- return hispanic_or_latino()
- if self is EthnicityEnum.NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER:
- return native_hawaiian_or_other_pacific_islander()
- if self is EthnicityEnum.TWO_OR_MORE_RACES:
- return two_or_more_races()
- if self is EthnicityEnum.WHITE:
- return white()
- if self is EthnicityEnum.PREFER_NOT_TO_DISCLOSE:
- return prefer_not_to_disclose()
+EthnicityEnum = typing.Union[
+ typing.Literal[
+ "AMERICAN_INDIAN_OR_ALASKA_NATIVE",
+ "ASIAN_OR_INDIAN_SUBCONTINENT",
+ "BLACK_OR_AFRICAN_AMERICAN",
+ "HISPANIC_OR_LATINO",
+ "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER",
+ "TWO_OR_MORE_RACES",
+ "WHITE",
+ "PREFER_NOT_TO_DISCLOSE",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/types/event_type_enum.py b/src/merge/resources/hris/types/event_type_enum.py
index c10cd701..2693c646 100644
--- a/src/merge/resources/hris/types/event_type_enum.py
+++ b/src/merge/resources/hris/types/event_type_enum.py
@@ -1,206 +1,47 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EventTypeEnum(str, enum.Enum):
- """
- - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY
- - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY
- - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY
- - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY
- - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY
- - `INVITED_USER` - INVITED_USER
- - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED
- - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED
- - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT
- - `CREATED_DESTINATION` - CREATED_DESTINATION
- - `DELETED_DESTINATION` - DELETED_DESTINATION
- - `CHANGED_DESTINATION` - CHANGED_DESTINATION
- - `CHANGED_SCOPES` - CHANGED_SCOPES
- - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION
- - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS
- - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION
- - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION
- - `ENABLED_CATEGORY` - ENABLED_CATEGORY
- - `DISABLED_CATEGORY` - DISABLED_CATEGORY
- - `CHANGED_PASSWORD` - CHANGED_PASSWORD
- - `RESET_PASSWORD` - RESET_PASSWORD
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING
- - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING
- - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING
- - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING
- - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC
- - `MUTED_ISSUE` - MUTED_ISSUE
- - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK
- - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
- - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
- - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
- - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
- """
-
- CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY"
- DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY"
- CREATED_TEST_API_KEY = "CREATED_TEST_API_KEY"
- DELETED_TEST_API_KEY = "DELETED_TEST_API_KEY"
- REGENERATED_PRODUCTION_API_KEY = "REGENERATED_PRODUCTION_API_KEY"
- INVITED_USER = "INVITED_USER"
- TWO_FACTOR_AUTH_ENABLED = "TWO_FACTOR_AUTH_ENABLED"
- TWO_FACTOR_AUTH_DISABLED = "TWO_FACTOR_AUTH_DISABLED"
- DELETED_LINKED_ACCOUNT = "DELETED_LINKED_ACCOUNT"
- CREATED_DESTINATION = "CREATED_DESTINATION"
- DELETED_DESTINATION = "DELETED_DESTINATION"
- CHANGED_DESTINATION = "CHANGED_DESTINATION"
- CHANGED_SCOPES = "CHANGED_SCOPES"
- CHANGED_PERSONAL_INFORMATION = "CHANGED_PERSONAL_INFORMATION"
- CHANGED_ORGANIZATION_SETTINGS = "CHANGED_ORGANIZATION_SETTINGS"
- ENABLED_INTEGRATION = "ENABLED_INTEGRATION"
- DISABLED_INTEGRATION = "DISABLED_INTEGRATION"
- ENABLED_CATEGORY = "ENABLED_CATEGORY"
- DISABLED_CATEGORY = "DISABLED_CATEGORY"
- CHANGED_PASSWORD = "CHANGED_PASSWORD"
- RESET_PASSWORD = "RESET_PASSWORD"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- CREATED_INTEGRATION_WIDE_FIELD_MAPPING = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING"
- CREATED_LINKED_ACCOUNT_FIELD_MAPPING = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING"
- CHANGED_INTEGRATION_WIDE_FIELD_MAPPING = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING"
- CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING"
- DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING"
- DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING"
- FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC"
- MUTED_ISSUE = "MUTED_ISSUE"
- GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK"
- ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK"
- DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK"
- MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED"
- END_USER_CREDENTIALS_ACCESSED = "END_USER_CREDENTIALS_ACCESSED"
-
- def visit(
- self,
- created_remote_production_api_key: typing.Callable[[], T_Result],
- deleted_remote_production_api_key: typing.Callable[[], T_Result],
- created_test_api_key: typing.Callable[[], T_Result],
- deleted_test_api_key: typing.Callable[[], T_Result],
- regenerated_production_api_key: typing.Callable[[], T_Result],
- invited_user: typing.Callable[[], T_Result],
- two_factor_auth_enabled: typing.Callable[[], T_Result],
- two_factor_auth_disabled: typing.Callable[[], T_Result],
- deleted_linked_account: typing.Callable[[], T_Result],
- created_destination: typing.Callable[[], T_Result],
- deleted_destination: typing.Callable[[], T_Result],
- changed_destination: typing.Callable[[], T_Result],
- changed_scopes: typing.Callable[[], T_Result],
- changed_personal_information: typing.Callable[[], T_Result],
- changed_organization_settings: typing.Callable[[], T_Result],
- enabled_integration: typing.Callable[[], T_Result],
- disabled_integration: typing.Callable[[], T_Result],
- enabled_category: typing.Callable[[], T_Result],
- disabled_category: typing.Callable[[], T_Result],
- changed_password: typing.Callable[[], T_Result],
- reset_password: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- created_integration_wide_field_mapping: typing.Callable[[], T_Result],
- created_linked_account_field_mapping: typing.Callable[[], T_Result],
- changed_integration_wide_field_mapping: typing.Callable[[], T_Result],
- changed_linked_account_field_mapping: typing.Callable[[], T_Result],
- deleted_integration_wide_field_mapping: typing.Callable[[], T_Result],
- deleted_linked_account_field_mapping: typing.Callable[[], T_Result],
- forced_linked_account_resync: typing.Callable[[], T_Result],
- muted_issue: typing.Callable[[], T_Result],
- generated_magic_link: typing.Callable[[], T_Result],
- enabled_merge_webhook: typing.Callable[[], T_Result],
- disabled_merge_webhook: typing.Callable[[], T_Result],
- merge_webhook_target_changed: typing.Callable[[], T_Result],
- end_user_credentials_accessed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY:
- return created_remote_production_api_key()
- if self is EventTypeEnum.DELETED_REMOTE_PRODUCTION_API_KEY:
- return deleted_remote_production_api_key()
- if self is EventTypeEnum.CREATED_TEST_API_KEY:
- return created_test_api_key()
- if self is EventTypeEnum.DELETED_TEST_API_KEY:
- return deleted_test_api_key()
- if self is EventTypeEnum.REGENERATED_PRODUCTION_API_KEY:
- return regenerated_production_api_key()
- if self is EventTypeEnum.INVITED_USER:
- return invited_user()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_ENABLED:
- return two_factor_auth_enabled()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_DISABLED:
- return two_factor_auth_disabled()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT:
- return deleted_linked_account()
- if self is EventTypeEnum.CREATED_DESTINATION:
- return created_destination()
- if self is EventTypeEnum.DELETED_DESTINATION:
- return deleted_destination()
- if self is EventTypeEnum.CHANGED_DESTINATION:
- return changed_destination()
- if self is EventTypeEnum.CHANGED_SCOPES:
- return changed_scopes()
- if self is EventTypeEnum.CHANGED_PERSONAL_INFORMATION:
- return changed_personal_information()
- if self is EventTypeEnum.CHANGED_ORGANIZATION_SETTINGS:
- return changed_organization_settings()
- if self is EventTypeEnum.ENABLED_INTEGRATION:
- return enabled_integration()
- if self is EventTypeEnum.DISABLED_INTEGRATION:
- return disabled_integration()
- if self is EventTypeEnum.ENABLED_CATEGORY:
- return enabled_category()
- if self is EventTypeEnum.DISABLED_CATEGORY:
- return disabled_category()
- if self is EventTypeEnum.CHANGED_PASSWORD:
- return changed_password()
- if self is EventTypeEnum.RESET_PASSWORD:
- return reset_password()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return enabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return enabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return disabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return disabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.CREATED_INTEGRATION_WIDE_FIELD_MAPPING:
- return created_integration_wide_field_mapping()
- if self is EventTypeEnum.CREATED_LINKED_ACCOUNT_FIELD_MAPPING:
- return created_linked_account_field_mapping()
- if self is EventTypeEnum.CHANGED_INTEGRATION_WIDE_FIELD_MAPPING:
- return changed_integration_wide_field_mapping()
- if self is EventTypeEnum.CHANGED_LINKED_ACCOUNT_FIELD_MAPPING:
- return changed_linked_account_field_mapping()
- if self is EventTypeEnum.DELETED_INTEGRATION_WIDE_FIELD_MAPPING:
- return deleted_integration_wide_field_mapping()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING:
- return deleted_linked_account_field_mapping()
- if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC:
- return forced_linked_account_resync()
- if self is EventTypeEnum.MUTED_ISSUE:
- return muted_issue()
- if self is EventTypeEnum.GENERATED_MAGIC_LINK:
- return generated_magic_link()
- if self is EventTypeEnum.ENABLED_MERGE_WEBHOOK:
- return enabled_merge_webhook()
- if self is EventTypeEnum.DISABLED_MERGE_WEBHOOK:
- return disabled_merge_webhook()
- if self is EventTypeEnum.MERGE_WEBHOOK_TARGET_CHANGED:
- return merge_webhook_target_changed()
- if self is EventTypeEnum.END_USER_CREDENTIALS_ACCESSED:
- return end_user_credentials_accessed()
+EventTypeEnum = typing.Union[
+ typing.Literal[
+ "CREATED_REMOTE_PRODUCTION_API_KEY",
+ "DELETED_REMOTE_PRODUCTION_API_KEY",
+ "CREATED_TEST_API_KEY",
+ "DELETED_TEST_API_KEY",
+ "REGENERATED_PRODUCTION_API_KEY",
+ "INVITED_USER",
+ "TWO_FACTOR_AUTH_ENABLED",
+ "TWO_FACTOR_AUTH_DISABLED",
+ "DELETED_LINKED_ACCOUNT",
+ "CREATED_DESTINATION",
+ "DELETED_DESTINATION",
+ "CHANGED_DESTINATION",
+ "CHANGED_SCOPES",
+ "CHANGED_PERSONAL_INFORMATION",
+ "CHANGED_ORGANIZATION_SETTINGS",
+ "ENABLED_INTEGRATION",
+ "DISABLED_INTEGRATION",
+ "ENABLED_CATEGORY",
+ "DISABLED_CATEGORY",
+ "CHANGED_PASSWORD",
+ "RESET_PASSWORD",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "CREATED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CREATED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "DELETED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "DELETED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "FORCED_LINKED_ACCOUNT_RESYNC",
+ "MUTED_ISSUE",
+ "GENERATED_MAGIC_LINK",
+ "ENABLED_MERGE_WEBHOOK",
+ "DISABLED_MERGE_WEBHOOK",
+ "MERGE_WEBHOOK_TARGET_CHANGED",
+ "END_USER_CREDENTIALS_ACCESSED",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/types/external_target_field_api.py b/src/merge/resources/hris/types/external_target_field_api.py
index a97d536a..18988d44 100644
--- a/src/merge/resources/hris/types/external_target_field_api.py
+++ b/src/merge/resources/hris/types/external_target_field_api.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ExternalTargetFieldApi(pydantic_v1.BaseModel):
+class ExternalTargetFieldApi(UniversalBaseModel):
name: typing.Optional[str]
description: typing.Optional[str]
is_mapped: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/external_target_field_api_response.py b/src/merge/resources/hris/types/external_target_field_api_response.py
index f85881d7..bb1b09a4 100644
--- a/src/merge/resources/hris/types/external_target_field_api_response.py
+++ b/src/merge/resources/hris/types/external_target_field_api_response.py
@@ -1,49 +1,37 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .external_target_field_api import ExternalTargetFieldApi
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ExternalTargetFieldApiResponse(pydantic_v1.BaseModel):
- benefit: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Benefit")
- employer_benefit: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="EmployerBenefit")
- company: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Company")
- employee_payroll_run: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(
+class ExternalTargetFieldApiResponse(UniversalBaseModel):
+ benefit: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Benefit")
+ employer_benefit: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="EmployerBenefit")
+ company: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Company")
+ employee_payroll_run: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(
alias="EmployeePayrollRun"
)
- employee: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Employee")
- employment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Employment")
- location: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Location")
- payroll_run: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="PayrollRun")
- team: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Team")
- time_off: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="TimeOff")
- time_off_balance: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="TimeOffBalance")
- bank_info: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="BankInfo")
- pay_group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="PayGroup")
- group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Group")
- dependent: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Dependent")
- timesheet_entry: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="TimesheetEntry")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ employee: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Employee")
+ employment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Employment")
+ location: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Location")
+ payroll_run: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="PayrollRun")
+ team: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Team")
+ time_off: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="TimeOff")
+ time_off_balance: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="TimeOffBalance")
+ bank_info: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="BankInfo")
+ pay_group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="PayGroup")
+ group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Group")
+ dependent: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Dependent")
+ timesheet_entry: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="TimesheetEntry")
+
+ 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/merge/resources/hris/types/field_mapping_api_instance.py b/src/merge/resources/hris/types/field_mapping_api_instance.py
index d9d7670d..ef4d9c48 100644
--- a/src/merge/resources/hris/types/field_mapping_api_instance.py
+++ b/src/merge/resources/hris/types/field_mapping_api_instance.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
from .field_mapping_api_instance_target_field import FieldMappingApiInstanceTargetField
+from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingApiInstance(pydantic_v1.BaseModel):
+class FieldMappingApiInstance(UniversalBaseModel):
id: typing.Optional[str]
is_integration_wide: typing.Optional[bool]
target_field: typing.Optional[FieldMappingApiInstanceTargetField]
remote_field: typing.Optional[FieldMappingApiInstanceRemoteField]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/field_mapping_api_instance_remote_field.py b/src/merge/resources/hris/types/field_mapping_api_instance_remote_field.py
index 9539d3dc..ddfff4da 100644
--- a/src/merge/resources/hris/types/field_mapping_api_instance_remote_field.py
+++ b/src/merge/resources/hris/types/field_mapping_api_instance_remote_field.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .field_mapping_api_instance_remote_field_remote_endpoint_info import (
FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo,
)
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceRemoteField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteField(UniversalBaseModel):
remote_key_name: str
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py b/src/merge/resources/hris/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
index d9fcc276..14c37c76 100644
--- a/src/merge/resources/hris/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
+++ b/src/merge/resources/hris/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(UniversalBaseModel):
method: typing.Optional[str]
url_path: typing.Optional[str]
field_traversal_path: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/field_mapping_api_instance_response.py b/src/merge/resources/hris/types/field_mapping_api_instance_response.py
index 05a8eefc..0a6a02d9 100644
--- a/src/merge/resources/hris/types/field_mapping_api_instance_response.py
+++ b/src/merge/resources/hris/types/field_mapping_api_instance_response.py
@@ -1,49 +1,37 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .field_mapping_api_instance import FieldMappingApiInstance
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceResponse(pydantic_v1.BaseModel):
- benefit: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Benefit")
- employer_benefit: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="EmployerBenefit")
- company: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Company")
- employee_payroll_run: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(
+class FieldMappingApiInstanceResponse(UniversalBaseModel):
+ benefit: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Benefit")
+ employer_benefit: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="EmployerBenefit")
+ company: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Company")
+ employee_payroll_run: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(
alias="EmployeePayrollRun"
)
- employee: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Employee")
- employment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Employment")
- location: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Location")
- payroll_run: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="PayrollRun")
- team: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Team")
- time_off: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="TimeOff")
- time_off_balance: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="TimeOffBalance")
- bank_info: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="BankInfo")
- pay_group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="PayGroup")
- group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Group")
- dependent: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Dependent")
- timesheet_entry: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="TimesheetEntry")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ employee: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Employee")
+ employment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Employment")
+ location: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Location")
+ payroll_run: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="PayrollRun")
+ team: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Team")
+ time_off: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="TimeOff")
+ time_off_balance: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="TimeOffBalance")
+ bank_info: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="BankInfo")
+ pay_group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="PayGroup")
+ group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Group")
+ dependent: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Dependent")
+ timesheet_entry: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="TimesheetEntry")
+
+ 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/merge/resources/hris/types/field_mapping_api_instance_target_field.py b/src/merge/resources/hris/types/field_mapping_api_instance_target_field.py
index 25a8dcff..a1b51052 100644
--- a/src/merge/resources/hris/types/field_mapping_api_instance_target_field.py
+++ b/src/merge/resources/hris/types/field_mapping_api_instance_target_field.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceTargetField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceTargetField(UniversalBaseModel):
name: str
description: str
is_organization_wide: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/field_mapping_instance_response.py b/src/merge/resources/hris/types/field_mapping_instance_response.py
index b55d2c40..a56aeb93 100644
--- a/src/merge/resources/hris/types/field_mapping_instance_response.py
+++ b/src/merge/resources/hris/types/field_mapping_instance_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .field_mapping_api_instance import FieldMappingApiInstance
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingInstanceResponse(pydantic_v1.BaseModel):
+class FieldMappingInstanceResponse(UniversalBaseModel):
model: FieldMappingApiInstance
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/field_permission_deserializer.py b/src/merge/resources/hris/types/field_permission_deserializer.py
index 124f3deb..9670537a 100644
--- a/src/merge/resources/hris/types/field_permission_deserializer.py
+++ b/src/merge/resources/hris/types/field_permission_deserializer.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializer(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializer(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/field_permission_deserializer_request.py b/src/merge/resources/hris/types/field_permission_deserializer_request.py
index 65e80e75..04e14608 100644
--- a/src/merge/resources/hris/types/field_permission_deserializer_request.py
+++ b/src/merge/resources/hris/types/field_permission_deserializer_request.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializerRequest(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializerRequest(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/flsa_status_enum.py b/src/merge/resources/hris/types/flsa_status_enum.py
index f461ccf8..e69730ae 100644
--- a/src/merge/resources/hris/types/flsa_status_enum.py
+++ b/src/merge/resources/hris/types/flsa_status_enum.py
@@ -1,36 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FlsaStatusEnum(str, enum.Enum):
- """
- - `EXEMPT` - EXEMPT
- - `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT
- - `NONEXEMPT` - NONEXEMPT
- - `OWNER` - OWNER
- """
-
- EXEMPT = "EXEMPT"
- SALARIED_NONEXEMPT = "SALARIED_NONEXEMPT"
- NONEXEMPT = "NONEXEMPT"
- OWNER = "OWNER"
-
- def visit(
- self,
- exempt: typing.Callable[[], T_Result],
- salaried_nonexempt: typing.Callable[[], T_Result],
- nonexempt: typing.Callable[[], T_Result],
- owner: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FlsaStatusEnum.EXEMPT:
- return exempt()
- if self is FlsaStatusEnum.SALARIED_NONEXEMPT:
- return salaried_nonexempt()
- if self is FlsaStatusEnum.NONEXEMPT:
- return nonexempt()
- if self is FlsaStatusEnum.OWNER:
- return owner()
+FlsaStatusEnum = typing.Union[typing.Literal["EXEMPT", "SALARIED_NONEXEMPT", "NONEXEMPT", "OWNER"], typing.Any]
diff --git a/src/merge/resources/hris/types/gender_enum.py b/src/merge/resources/hris/types/gender_enum.py
index 021900ea..38257123 100644
--- a/src/merge/resources/hris/types/gender_enum.py
+++ b/src/merge/resources/hris/types/gender_enum.py
@@ -1,41 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class GenderEnum(str, enum.Enum):
- """
- - `MALE` - MALE
- - `FEMALE` - FEMALE
- - `NON-BINARY` - NON-BINARY
- - `OTHER` - OTHER
- - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE
- """
-
- MALE = "MALE"
- FEMALE = "FEMALE"
- NON_BINARY = "NON-BINARY"
- OTHER = "OTHER"
- PREFER_NOT_TO_DISCLOSE = "PREFER_NOT_TO_DISCLOSE"
-
- def visit(
- self,
- male: typing.Callable[[], T_Result],
- female: typing.Callable[[], T_Result],
- non_binary: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- prefer_not_to_disclose: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is GenderEnum.MALE:
- return male()
- if self is GenderEnum.FEMALE:
- return female()
- if self is GenderEnum.NON_BINARY:
- return non_binary()
- if self is GenderEnum.OTHER:
- return other()
- if self is GenderEnum.PREFER_NOT_TO_DISCLOSE:
- return prefer_not_to_disclose()
+GenderEnum = typing.Union[typing.Literal["MALE", "FEMALE", "NON-BINARY", "OTHER", "PREFER_NOT_TO_DISCLOSE"], typing.Any]
diff --git a/src/merge/resources/hris/types/group.py b/src/merge/resources/hris/types/group.py
index 06fdfff1..180f9b6d 100644
--- a/src/merge/resources/hris/types/group.py
+++ b/src/merge/resources/hris/types/group.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .group_type import GroupType
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Group(pydantic_v1.BaseModel):
+class Group(UniversalBaseModel):
"""
# The Group Object
@@ -23,32 +23,32 @@ class Group(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- parent_group: typing.Optional[str] = pydantic_v1.Field()
+ parent_group: typing.Optional[str] = pydantic.Field()
"""
The parent group for this group.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The group name.
"""
- type: typing.Optional[GroupType] = pydantic_v1.Field()
+ type: typing.Optional[GroupType] = pydantic.Field()
"""
The Group type returned directly from the third-party.
@@ -59,33 +59,24 @@ class Group(pydantic_v1.BaseModel):
- `GROUP` - GROUP
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- is_commonly_used_as_team: typing.Optional[bool] = pydantic_v1.Field()
+ is_commonly_used_as_team: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether the Group refers to a team in the third party platform. Note that this is an opinionated view based on how Merge observes most organizations representing teams in each third party platform. If your customer uses a platform different from most, there is a chance this will not be correct.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/group_type.py b/src/merge/resources/hris/types/group_type.py
index e0172fc6..16e531d3 100644
--- a/src/merge/resources/hris/types/group_type.py
+++ b/src/merge/resources/hris/types/group_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .group_type_enum import GroupTypeEnum
GroupType = typing.Union[GroupTypeEnum, str]
diff --git a/src/merge/resources/hris/types/group_type_enum.py b/src/merge/resources/hris/types/group_type_enum.py
index 664c1f6d..5eca65b2 100644
--- a/src/merge/resources/hris/types/group_type_enum.py
+++ b/src/merge/resources/hris/types/group_type_enum.py
@@ -1,41 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class GroupTypeEnum(str, enum.Enum):
- """
- - `TEAM` - TEAM
- - `DEPARTMENT` - DEPARTMENT
- - `COST_CENTER` - COST_CENTER
- - `BUSINESS_UNIT` - BUSINESS_UNIT
- - `GROUP` - GROUP
- """
-
- TEAM = "TEAM"
- DEPARTMENT = "DEPARTMENT"
- COST_CENTER = "COST_CENTER"
- BUSINESS_UNIT = "BUSINESS_UNIT"
- GROUP = "GROUP"
-
- def visit(
- self,
- team: typing.Callable[[], T_Result],
- department: typing.Callable[[], T_Result],
- cost_center: typing.Callable[[], T_Result],
- business_unit: typing.Callable[[], T_Result],
- group: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is GroupTypeEnum.TEAM:
- return team()
- if self is GroupTypeEnum.DEPARTMENT:
- return department()
- if self is GroupTypeEnum.COST_CENTER:
- return cost_center()
- if self is GroupTypeEnum.BUSINESS_UNIT:
- return business_unit()
- if self is GroupTypeEnum.GROUP:
- return group()
+GroupTypeEnum = typing.Union[typing.Literal["TEAM", "DEPARTMENT", "COST_CENTER", "BUSINESS_UNIT", "GROUP"], typing.Any]
diff --git a/src/merge/resources/hris/types/individual_common_model_scope_deserializer.py b/src/merge/resources/hris/types/individual_common_model_scope_deserializer.py
index d80ca06e..122df11c 100644
--- a/src/merge/resources/hris/types/individual_common_model_scope_deserializer.py
+++ b/src/merge/resources/hris/types/individual_common_model_scope_deserializer.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer import FieldPermissionDeserializer
from .model_permission_deserializer import ModelPermissionDeserializer
+from .field_permission_deserializer import FieldPermissionDeserializer
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializer(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializer(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializer]]
field_permissions: typing.Optional[FieldPermissionDeserializer]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/individual_common_model_scope_deserializer_request.py b/src/merge/resources/hris/types/individual_common_model_scope_deserializer_request.py
index 8f2e7de5..a1a80902 100644
--- a/src/merge/resources/hris/types/individual_common_model_scope_deserializer_request.py
+++ b/src/merge/resources/hris/types/individual_common_model_scope_deserializer_request.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
from .model_permission_deserializer_request import ModelPermissionDeserializerRequest
+from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializerRequest(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializerRequest(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializerRequest]]
field_permissions: typing.Optional[FieldPermissionDeserializerRequest]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/issue.py b/src/merge/resources/hris/types/issue.py
index 086a0db2..5a584515 100644
--- a/src/merge/resources/hris/types/issue.py
+++ b/src/merge/resources/hris/types/issue.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue_status import IssueStatus
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Issue(pydantic_v1.BaseModel):
+class Issue(UniversalBaseModel):
id: typing.Optional[str]
- status: typing.Optional[IssueStatus] = pydantic_v1.Field()
+ status: typing.Optional[IssueStatus] = pydantic.Field()
"""
Status of the issue. Options: ('ONGOING', 'RESOLVED')
@@ -19,26 +19,17 @@ class Issue(pydantic_v1.BaseModel):
"""
error_description: str
- end_user: typing.Optional[typing.Dict[str, typing.Any]]
+ end_user: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
first_incident_time: typing.Optional[dt.datetime]
last_incident_time: typing.Optional[dt.datetime]
is_muted: typing.Optional[bool]
error_details: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/issue_status.py b/src/merge/resources/hris/types/issue_status.py
index 8e4d6516..59d004d8 100644
--- a/src/merge/resources/hris/types/issue_status.py
+++ b/src/merge/resources/hris/types/issue_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .issue_status_enum import IssueStatusEnum
IssueStatus = typing.Union[IssueStatusEnum, str]
diff --git a/src/merge/resources/hris/types/issue_status_enum.py b/src/merge/resources/hris/types/issue_status_enum.py
index fc2ef2b5..76eb5549 100644
--- a/src/merge/resources/hris/types/issue_status_enum.py
+++ b/src/merge/resources/hris/types/issue_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssueStatusEnum(str, enum.Enum):
- """
- - `ONGOING` - ONGOING
- - `RESOLVED` - RESOLVED
- """
-
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssueStatusEnum.ONGOING:
- return ongoing()
- if self is IssueStatusEnum.RESOLVED:
- return resolved()
+IssueStatusEnum = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/hris/types/link_token.py b/src/merge/resources/hris/types/link_token.py
index 1c82d1ac..1d25dddb 100644
--- a/src/merge/resources/hris/types/link_token.py
+++ b/src/merge/resources/hris/types/link_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkToken(pydantic_v1.BaseModel):
+class LinkToken(UniversalBaseModel):
link_token: str
integration_name: typing.Optional[str]
magic_link_url: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/linked_account_status.py b/src/merge/resources/hris/types/linked_account_status.py
index 60e21a98..2e27df33 100644
--- a/src/merge/resources/hris/types/linked_account_status.py
+++ b/src/merge/resources/hris/types/linked_account_status.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkedAccountStatus(pydantic_v1.BaseModel):
+class LinkedAccountStatus(UniversalBaseModel):
linked_account_status: str
can_make_request: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/location.py b/src/merge/resources/hris/types/location.py
index 4d0bf55a..a5688192 100644
--- a/src/merge/resources/hris/types/location.py
+++ b/src/merge/resources/hris/types/location.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .location_country import LocationCountry
from .location_location_type import LocationLocationType
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Location(pydantic_v1.BaseModel):
+class Location(UniversalBaseModel):
"""
# The Location Object
@@ -24,57 +24,57 @@ class Location(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The location's name.
"""
- phone_number: typing.Optional[str] = pydantic_v1.Field()
+ phone_number: typing.Optional[str] = pydantic.Field()
"""
The location's phone number.
"""
- street_1: typing.Optional[str] = pydantic_v1.Field()
+ street_1: typing.Optional[str] = pydantic.Field()
"""
Line 1 of the location's street address.
"""
- street_2: typing.Optional[str] = pydantic_v1.Field()
+ street_2: typing.Optional[str] = pydantic.Field()
"""
Line 2 of the location's street address.
"""
- city: typing.Optional[str] = pydantic_v1.Field()
+ city: typing.Optional[str] = pydantic.Field()
"""
The location's city.
"""
- state: typing.Optional[str] = pydantic_v1.Field()
+ state: typing.Optional[str] = pydantic.Field()
"""
The location's state. Represents a region if outside of the US.
"""
- zip_code: typing.Optional[str] = pydantic_v1.Field()
+ zip_code: typing.Optional[str] = pydantic.Field()
"""
The location's zip code or postal code.
"""
- country: typing.Optional[LocationCountry] = pydantic_v1.Field()
+ country: typing.Optional[LocationCountry] = pydantic.Field()
"""
The location's country.
@@ -329,7 +329,7 @@ class Location(pydantic_v1.BaseModel):
- `ZW` - Zimbabwe
"""
- location_type: typing.Optional[LocationLocationType] = pydantic_v1.Field()
+ location_type: typing.Optional[LocationLocationType] = pydantic.Field()
"""
The location's type. Can be either WORK or HOME
@@ -337,28 +337,19 @@ class Location(pydantic_v1.BaseModel):
- `WORK` - WORK
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/location_country.py b/src/merge/resources/hris/types/location_country.py
index 5fd5a9c1..66d7be3d 100644
--- a/src/merge/resources/hris/types/location_country.py
+++ b/src/merge/resources/hris/types/location_country.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .country_enum import CountryEnum
LocationCountry = typing.Union[CountryEnum, str]
diff --git a/src/merge/resources/hris/types/location_location_type.py b/src/merge/resources/hris/types/location_location_type.py
index 5b3e7213..b84cea27 100644
--- a/src/merge/resources/hris/types/location_location_type.py
+++ b/src/merge/resources/hris/types/location_location_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .location_type_enum import LocationTypeEnum
LocationLocationType = typing.Union[LocationTypeEnum, str]
diff --git a/src/merge/resources/hris/types/location_type_enum.py b/src/merge/resources/hris/types/location_type_enum.py
index c6d52b42..39bcf9d0 100644
--- a/src/merge/resources/hris/types/location_type_enum.py
+++ b/src/merge/resources/hris/types/location_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LocationTypeEnum(str, enum.Enum):
- """
- - `HOME` - HOME
- - `WORK` - WORK
- """
-
- HOME = "HOME"
- WORK = "WORK"
-
- def visit(self, home: typing.Callable[[], T_Result], work: typing.Callable[[], T_Result]) -> T_Result:
- if self is LocationTypeEnum.HOME:
- return home()
- if self is LocationTypeEnum.WORK:
- return work()
+LocationTypeEnum = typing.Union[typing.Literal["HOME", "WORK"], typing.Any]
diff --git a/src/merge/resources/hris/types/marital_status_enum.py b/src/merge/resources/hris/types/marital_status_enum.py
index d7499ba7..d3f14094 100644
--- a/src/merge/resources/hris/types/marital_status_enum.py
+++ b/src/merge/resources/hris/types/marital_status_enum.py
@@ -1,41 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MaritalStatusEnum(str, enum.Enum):
- """
- - `SINGLE` - SINGLE
- - `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY
- - `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY
- - `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD
- - `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD
- """
-
- SINGLE = "SINGLE"
- MARRIED_FILING_JOINTLY = "MARRIED_FILING_JOINTLY"
- MARRIED_FILING_SEPARATELY = "MARRIED_FILING_SEPARATELY"
- HEAD_OF_HOUSEHOLD = "HEAD_OF_HOUSEHOLD"
- QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD = "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD"
-
- def visit(
- self,
- single: typing.Callable[[], T_Result],
- married_filing_jointly: typing.Callable[[], T_Result],
- married_filing_separately: typing.Callable[[], T_Result],
- head_of_household: typing.Callable[[], T_Result],
- qualifying_widow_or_widower_with_dependent_child: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MaritalStatusEnum.SINGLE:
- return single()
- if self is MaritalStatusEnum.MARRIED_FILING_JOINTLY:
- return married_filing_jointly()
- if self is MaritalStatusEnum.MARRIED_FILING_SEPARATELY:
- return married_filing_separately()
- if self is MaritalStatusEnum.HEAD_OF_HOUSEHOLD:
- return head_of_household()
- if self is MaritalStatusEnum.QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD:
- return qualifying_widow_or_widower_with_dependent_child()
+MaritalStatusEnum = typing.Union[
+ typing.Literal[
+ "SINGLE",
+ "MARRIED_FILING_JOINTLY",
+ "MARRIED_FILING_SEPARATELY",
+ "HEAD_OF_HOUSEHOLD",
+ "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/types/meta_response.py b/src/merge/resources/hris/types/meta_response.py
index debaf4ef..44e57fde 100644
--- a/src/merge/resources/hris/types/meta_response.py
+++ b/src/merge/resources/hris/types/meta_response.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .linked_account_status import LinkedAccountStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class MetaResponse(pydantic_v1.BaseModel):
- request_schema: typing.Dict[str, typing.Any]
- remote_field_classes: typing.Optional[typing.Dict[str, typing.Any]]
+class MetaResponse(UniversalBaseModel):
+ request_schema: typing.Dict[str, typing.Optional[typing.Any]]
+ remote_field_classes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
status: typing.Optional[LinkedAccountStatus]
has_conditional_params: bool
has_required_linked_account_params: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/method_enum.py b/src/merge/resources/hris/types/method_enum.py
index c2418a83..e782e49c 100644
--- a/src/merge/resources/hris/types/method_enum.py
+++ b/src/merge/resources/hris/types/method_enum.py
@@ -1,51 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MethodEnum(str, enum.Enum):
- """
- - `GET` - GET
- - `OPTIONS` - OPTIONS
- - `HEAD` - HEAD
- - `POST` - POST
- - `PUT` - PUT
- - `PATCH` - PATCH
- - `DELETE` - DELETE
- """
-
- GET = "GET"
- OPTIONS = "OPTIONS"
- HEAD = "HEAD"
- POST = "POST"
- PUT = "PUT"
- PATCH = "PATCH"
- DELETE = "DELETE"
-
- def visit(
- self,
- get: typing.Callable[[], T_Result],
- options: typing.Callable[[], T_Result],
- head: typing.Callable[[], T_Result],
- post: typing.Callable[[], T_Result],
- put: typing.Callable[[], T_Result],
- patch: typing.Callable[[], T_Result],
- delete: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MethodEnum.GET:
- return get()
- if self is MethodEnum.OPTIONS:
- return options()
- if self is MethodEnum.HEAD:
- return head()
- if self is MethodEnum.POST:
- return post()
- if self is MethodEnum.PUT:
- return put()
- if self is MethodEnum.PATCH:
- return patch()
- if self is MethodEnum.DELETE:
- return delete()
+MethodEnum = typing.Union[typing.Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"], typing.Any]
diff --git a/src/merge/resources/hris/types/model_operation.py b/src/merge/resources/hris/types/model_operation.py
index 0f4429ec..2a12b6d5 100644
--- a/src/merge/resources/hris/types/model_operation.py
+++ b/src/merge/resources/hris/types/model_operation.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelOperation(pydantic_v1.BaseModel):
+class ModelOperation(UniversalBaseModel):
"""
# The ModelOperation Object
@@ -25,20 +24,11 @@ class ModelOperation(pydantic_v1.BaseModel):
required_post_parameters: typing.List[str]
supported_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/model_permission_deserializer.py b/src/merge/resources/hris/types/model_permission_deserializer.py
index 5a6adf20..b6d813e4 100644
--- a/src/merge/resources/hris/types/model_permission_deserializer.py
+++ b/src/merge/resources/hris/types/model_permission_deserializer.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializer(pydantic_v1.BaseModel):
+class ModelPermissionDeserializer(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/model_permission_deserializer_request.py b/src/merge/resources/hris/types/model_permission_deserializer_request.py
index 3f72b9ac..5885627b 100644
--- a/src/merge/resources/hris/types/model_permission_deserializer_request.py
+++ b/src/merge/resources/hris/types/model_permission_deserializer_request.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializerRequest(pydantic_v1.BaseModel):
+class ModelPermissionDeserializerRequest(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/multipart_form_field_request.py b/src/merge/resources/hris/types/multipart_form_field_request.py
index 9c8ffb21..80099016 100644
--- a/src/merge/resources/hris/types/multipart_form_field_request.py
+++ b/src/merge/resources/hris/types/multipart_form_field_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class MultipartFormFieldRequest(pydantic_v1.BaseModel):
+class MultipartFormFieldRequest(UniversalBaseModel):
"""
# The MultipartFormField Object
@@ -21,17 +20,17 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
Create a `MultipartFormField` to define a multipart form entry.
"""
- name: str = pydantic_v1.Field()
+ name: str = pydantic.Field()
"""
The name of the form field
"""
- data: str = pydantic_v1.Field()
+ data: str = pydantic.Field()
"""
The data for the form field.
"""
- encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic_v1.Field()
+ encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic.Field()
"""
The encoding of the value of `data`. Defaults to `RAW` if not defined.
@@ -40,30 +39,21 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
- `GZIP_BASE64` - GZIP_BASE64
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The file name of the form field, if the field is for a file.
"""
- content_type: typing.Optional[str] = pydantic_v1.Field()
+ content_type: typing.Optional[str] = pydantic.Field()
"""
The MIME type of the file, if the field is for a file.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/multipart_form_field_request_encoding.py b/src/merge/resources/hris/types/multipart_form_field_request_encoding.py
index c6513b6b..2b1db5ad 100644
--- a/src/merge/resources/hris/types/multipart_form_field_request_encoding.py
+++ b/src/merge/resources/hris/types/multipart_form_field_request_encoding.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .encoding_enum import EncodingEnum
MultipartFormFieldRequestEncoding = typing.Union[EncodingEnum, str]
diff --git a/src/merge/resources/hris/types/paginated_account_details_and_actions_list.py b/src/merge/resources/hris/types/paginated_account_details_and_actions_list.py
index 280100c4..a9128c76 100644
--- a/src/merge/resources/hris/types/paginated_account_details_and_actions_list.py
+++ b/src/merge/resources/hris/types/paginated_account_details_and_actions_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account_details_and_actions import AccountDetailsAndActions
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountDetailsAndActionsList(pydantic_v1.BaseModel):
+class PaginatedAccountDetailsAndActionsList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AccountDetailsAndActions]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_audit_log_event_list.py b/src/merge/resources/hris/types/paginated_audit_log_event_list.py
index 1d4154d2..a50b7c75 100644
--- a/src/merge/resources/hris/types/paginated_audit_log_event_list.py
+++ b/src/merge/resources/hris/types/paginated_audit_log_event_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .audit_log_event import AuditLogEvent
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAuditLogEventList(pydantic_v1.BaseModel):
+class PaginatedAuditLogEventList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AuditLogEvent]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_bank_info_list.py b/src/merge/resources/hris/types/paginated_bank_info_list.py
index cda1f698..fa3f1b55 100644
--- a/src/merge/resources/hris/types/paginated_bank_info_list.py
+++ b/src/merge/resources/hris/types/paginated_bank_info_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .bank_info import BankInfo
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedBankInfoList(pydantic_v1.BaseModel):
+class PaginatedBankInfoList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[BankInfo]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, PaginatedBankInfoList=PaginatedBankInfoList)
+update_forward_refs(Employment, PaginatedBankInfoList=PaginatedBankInfoList)
+update_forward_refs(Team, PaginatedBankInfoList=PaginatedBankInfoList)
diff --git a/src/merge/resources/hris/types/paginated_benefit_list.py b/src/merge/resources/hris/types/paginated_benefit_list.py
index a137531e..870f427f 100644
--- a/src/merge/resources/hris/types/paginated_benefit_list.py
+++ b/src/merge/resources/hris/types/paginated_benefit_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .benefit import Benefit
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedBenefitList(pydantic_v1.BaseModel):
+class PaginatedBenefitList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Benefit]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, PaginatedBenefitList=PaginatedBenefitList)
+update_forward_refs(Employment, PaginatedBenefitList=PaginatedBenefitList)
+update_forward_refs(Team, PaginatedBenefitList=PaginatedBenefitList)
diff --git a/src/merge/resources/hris/types/paginated_company_list.py b/src/merge/resources/hris/types/paginated_company_list.py
index d48ead65..50d74736 100644
--- a/src/merge/resources/hris/types/paginated_company_list.py
+++ b/src/merge/resources/hris/types/paginated_company_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .company import Company
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedCompanyList(pydantic_v1.BaseModel):
+class PaginatedCompanyList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Company]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_dependent_list.py b/src/merge/resources/hris/types/paginated_dependent_list.py
index a4c05c69..a94519fd 100644
--- a/src/merge/resources/hris/types/paginated_dependent_list.py
+++ b/src/merge/resources/hris/types/paginated_dependent_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .dependent import Dependent
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedDependentList(pydantic_v1.BaseModel):
+class PaginatedDependentList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Dependent]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_employee_list.py b/src/merge/resources/hris/types/paginated_employee_list.py
index 92eb0281..4a0ffcc7 100644
--- a/src/merge/resources/hris/types/paginated_employee_list.py
+++ b/src/merge/resources/hris/types/paginated_employee_list.py
@@ -1,32 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .employee import Employee
+from .employment import Employment
+from .team import Team
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedEmployeeList(pydantic_v1.BaseModel):
+class PaginatedEmployeeList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Employee]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, PaginatedEmployeeList=PaginatedEmployeeList)
+update_forward_refs(Employment, PaginatedEmployeeList=PaginatedEmployeeList)
+update_forward_refs(Team, PaginatedEmployeeList=PaginatedEmployeeList)
diff --git a/src/merge/resources/hris/types/paginated_employee_payroll_run_list.py b/src/merge/resources/hris/types/paginated_employee_payroll_run_list.py
index dcabd04e..8bc6e867 100644
--- a/src/merge/resources/hris/types/paginated_employee_payroll_run_list.py
+++ b/src/merge/resources/hris/types/paginated_employee_payroll_run_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .employee_payroll_run import EmployeePayrollRun
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedEmployeePayrollRunList(pydantic_v1.BaseModel):
+class PaginatedEmployeePayrollRunList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[EmployeePayrollRun]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, PaginatedEmployeePayrollRunList=PaginatedEmployeePayrollRunList)
+update_forward_refs(Employment, PaginatedEmployeePayrollRunList=PaginatedEmployeePayrollRunList)
+update_forward_refs(Team, PaginatedEmployeePayrollRunList=PaginatedEmployeePayrollRunList)
diff --git a/src/merge/resources/hris/types/paginated_employer_benefit_list.py b/src/merge/resources/hris/types/paginated_employer_benefit_list.py
index 58a8447d..5c256281 100644
--- a/src/merge/resources/hris/types/paginated_employer_benefit_list.py
+++ b/src/merge/resources/hris/types/paginated_employer_benefit_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .employer_benefit import EmployerBenefit
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedEmployerBenefitList(pydantic_v1.BaseModel):
+class PaginatedEmployerBenefitList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[EmployerBenefit]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_employment_list.py b/src/merge/resources/hris/types/paginated_employment_list.py
index 53722dce..ce1fbc5f 100644
--- a/src/merge/resources/hris/types/paginated_employment_list.py
+++ b/src/merge/resources/hris/types/paginated_employment_list.py
@@ -1,32 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
from .employment import Employment
+from .team import Team
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedEmploymentList(pydantic_v1.BaseModel):
+class PaginatedEmploymentList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Employment]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, PaginatedEmploymentList=PaginatedEmploymentList)
+update_forward_refs(Employment, PaginatedEmploymentList=PaginatedEmploymentList)
+update_forward_refs(Team, PaginatedEmploymentList=PaginatedEmploymentList)
diff --git a/src/merge/resources/hris/types/paginated_group_list.py b/src/merge/resources/hris/types/paginated_group_list.py
index 723ff3ca..72413a02 100644
--- a/src/merge/resources/hris/types/paginated_group_list.py
+++ b/src/merge/resources/hris/types/paginated_group_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .group import Group
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedGroupList(pydantic_v1.BaseModel):
+class PaginatedGroupList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Group]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_issue_list.py b/src/merge/resources/hris/types/paginated_issue_list.py
index 1016e29a..12b866d9 100644
--- a/src/merge/resources/hris/types/paginated_issue_list.py
+++ b/src/merge/resources/hris/types/paginated_issue_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue import Issue
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedIssueList(pydantic_v1.BaseModel):
+class PaginatedIssueList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Issue]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_location_list.py b/src/merge/resources/hris/types/paginated_location_list.py
index 2b8a7794..b18f4377 100644
--- a/src/merge/resources/hris/types/paginated_location_list.py
+++ b/src/merge/resources/hris/types/paginated_location_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .location import Location
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedLocationList(pydantic_v1.BaseModel):
+class PaginatedLocationList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Location]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_pay_group_list.py b/src/merge/resources/hris/types/paginated_pay_group_list.py
index 714f10c3..d3bd0428 100644
--- a/src/merge/resources/hris/types/paginated_pay_group_list.py
+++ b/src/merge/resources/hris/types/paginated_pay_group_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .pay_group import PayGroup
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedPayGroupList(pydantic_v1.BaseModel):
+class PaginatedPayGroupList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[PayGroup]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_payroll_run_list.py b/src/merge/resources/hris/types/paginated_payroll_run_list.py
index fb4e7389..53813ecb 100644
--- a/src/merge/resources/hris/types/paginated_payroll_run_list.py
+++ b/src/merge/resources/hris/types/paginated_payroll_run_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .payroll_run import PayrollRun
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedPayrollRunList(pydantic_v1.BaseModel):
+class PaginatedPayrollRunList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[PayrollRun]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_sync_status_list.py b/src/merge/resources/hris/types/paginated_sync_status_list.py
index 6c88197e..f59f2c9a 100644
--- a/src/merge/resources/hris/types/paginated_sync_status_list.py
+++ b/src/merge/resources/hris/types/paginated_sync_status_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .sync_status import SyncStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedSyncStatusList(pydantic_v1.BaseModel):
+class PaginatedSyncStatusList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[SyncStatus]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/paginated_team_list.py b/src/merge/resources/hris/types/paginated_team_list.py
index fdb9e669..45435d16 100644
--- a/src/merge/resources/hris/types/paginated_team_list.py
+++ b/src/merge/resources/hris/types/paginated_team_list.py
@@ -1,32 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .team import Team
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedTeamList(pydantic_v1.BaseModel):
+class PaginatedTeamList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Team]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Team, PaginatedTeamList=PaginatedTeamList)
diff --git a/src/merge/resources/hris/types/paginated_time_off_balance_list.py b/src/merge/resources/hris/types/paginated_time_off_balance_list.py
index 3bf9d969..d14fb360 100644
--- a/src/merge/resources/hris/types/paginated_time_off_balance_list.py
+++ b/src/merge/resources/hris/types/paginated_time_off_balance_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .time_off_balance import TimeOffBalance
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedTimeOffBalanceList(pydantic_v1.BaseModel):
+class PaginatedTimeOffBalanceList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[TimeOffBalance]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, PaginatedTimeOffBalanceList=PaginatedTimeOffBalanceList)
+update_forward_refs(Employment, PaginatedTimeOffBalanceList=PaginatedTimeOffBalanceList)
+update_forward_refs(Team, PaginatedTimeOffBalanceList=PaginatedTimeOffBalanceList)
diff --git a/src/merge/resources/hris/types/paginated_time_off_list.py b/src/merge/resources/hris/types/paginated_time_off_list.py
index 4d3fbae2..227265ac 100644
--- a/src/merge/resources/hris/types/paginated_time_off_list.py
+++ b/src/merge/resources/hris/types/paginated_time_off_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .time_off import TimeOff
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedTimeOffList(pydantic_v1.BaseModel):
+class PaginatedTimeOffList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[TimeOff]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, PaginatedTimeOffList=PaginatedTimeOffList)
+update_forward_refs(Employment, PaginatedTimeOffList=PaginatedTimeOffList)
+update_forward_refs(Team, PaginatedTimeOffList=PaginatedTimeOffList)
diff --git a/src/merge/resources/hris/types/paginated_timesheet_entry_list.py b/src/merge/resources/hris/types/paginated_timesheet_entry_list.py
index 51039538..df50bc37 100644
--- a/src/merge/resources/hris/types/paginated_timesheet_entry_list.py
+++ b/src/merge/resources/hris/types/paginated_timesheet_entry_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .timesheet_entry import TimesheetEntry
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedTimesheetEntryList(pydantic_v1.BaseModel):
+class PaginatedTimesheetEntryList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[TimesheetEntry]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/pay_currency_enum.py b/src/merge/resources/hris/types/pay_currency_enum.py
index e52cd2f0..efef1cb4 100644
--- a/src/merge/resources/hris/types/pay_currency_enum.py
+++ b/src/merge/resources/hris/types/pay_currency_enum.py
@@ -1,1546 +1,315 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PayCurrencyEnum(str, enum.Enum):
- """
- - `XUA` - ADB Unit of Account
- - `AFN` - Afghan Afghani
- - `AFA` - Afghan Afghani (1927β2002)
- - `ALL` - Albanian Lek
- - `ALK` - Albanian Lek (1946β1965)
- - `DZD` - Algerian Dinar
- - `ADP` - Andorran Peseta
- - `AOA` - Angolan Kwanza
- - `AOK` - Angolan Kwanza (1977β1991)
- - `AON` - Angolan New Kwanza (1990β2000)
- - `AOR` - Angolan Readjusted Kwanza (1995β1999)
- - `ARA` - Argentine Austral
- - `ARS` - Argentine Peso
- - `ARM` - Argentine Peso (1881β1970)
- - `ARP` - Argentine Peso (1983β1985)
- - `ARL` - Argentine Peso Ley (1970β1983)
- - `AMD` - Armenian Dram
- - `AWG` - Aruban Florin
- - `AUD` - Australian Dollar
- - `ATS` - Austrian Schilling
- - `AZN` - Azerbaijani Manat
- - `AZM` - Azerbaijani Manat (1993β2006)
- - `BSD` - Bahamian Dollar
- - `BHD` - Bahraini Dinar
- - `BDT` - Bangladeshi Taka
- - `BBD` - Barbadian Dollar
- - `BYN` - Belarusian Ruble
- - `BYB` - Belarusian Ruble (1994β1999)
- - `BYR` - Belarusian Ruble (2000β2016)
- - `BEF` - Belgian Franc
- - `BEC` - Belgian Franc (convertible)
- - `BEL` - Belgian Franc (financial)
- - `BZD` - Belize Dollar
- - `BMD` - Bermudan Dollar
- - `BTN` - Bhutanese Ngultrum
- - `BOB` - Bolivian Boliviano
- - `BOL` - Bolivian Boliviano (1863β1963)
- - `BOV` - Bolivian Mvdol
- - `BOP` - Bolivian Peso
- - `BAM` - Bosnia-Herzegovina Convertible Mark
- - `BAD` - Bosnia-Herzegovina Dinar (1992β1994)
- - `BAN` - Bosnia-Herzegovina New Dinar (1994β1997)
- - `BWP` - Botswanan Pula
- - `BRC` - Brazilian Cruzado (1986β1989)
- - `BRZ` - Brazilian Cruzeiro (1942β1967)
- - `BRE` - Brazilian Cruzeiro (1990β1993)
- - `BRR` - Brazilian Cruzeiro (1993β1994)
- - `BRN` - Brazilian New Cruzado (1989β1990)
- - `BRB` - Brazilian New Cruzeiro (1967β1986)
- - `BRL` - Brazilian Real
- - `GBP` - British Pound
- - `BND` - Brunei Dollar
- - `BGL` - Bulgarian Hard Lev
- - `BGN` - Bulgarian Lev
- - `BGO` - Bulgarian Lev (1879β1952)
- - `BGM` - Bulgarian Socialist Lev
- - `BUK` - Burmese Kyat
- - `BIF` - Burundian Franc
- - `XPF` - CFP Franc
- - `KHR` - Cambodian Riel
- - `CAD` - Canadian Dollar
- - `CVE` - Cape Verdean Escudo
- - `KYD` - Cayman Islands Dollar
- - `XAF` - Central African CFA Franc
- - `CLE` - Chilean Escudo
- - `CLP` - Chilean Peso
- - `CLF` - Chilean Unit of Account (UF)
- - `CNX` - Chinese Peopleβs Bank Dollar
- - `CNY` - Chinese Yuan
- - `CNH` - Chinese Yuan (offshore)
- - `COP` - Colombian Peso
- - `COU` - Colombian Real Value Unit
- - `KMF` - Comorian Franc
- - `CDF` - Congolese Franc
- - `CRC` - Costa Rican ColΓ³n
- - `HRD` - Croatian Dinar
- - `HRK` - Croatian Kuna
- - `CUC` - Cuban Convertible Peso
- - `CUP` - Cuban Peso
- - `CYP` - Cypriot Pound
- - `CZK` - Czech Koruna
- - `CSK` - Czechoslovak Hard Koruna
- - `DKK` - Danish Krone
- - `DJF` - Djiboutian Franc
- - `DOP` - Dominican Peso
- - `NLG` - Dutch Guilder
- - `XCD` - East Caribbean Dollar
- - `DDM` - East German Mark
- - `ECS` - Ecuadorian Sucre
- - `ECV` - Ecuadorian Unit of Constant Value
- - `EGP` - Egyptian Pound
- - `GQE` - Equatorial Guinean Ekwele
- - `ERN` - Eritrean Nakfa
- - `EEK` - Estonian Kroon
- - `ETB` - Ethiopian Birr
- - `EUR` - Euro
- - `XBA` - European Composite Unit
- - `XEU` - European Currency Unit
- - `XBB` - European Monetary Unit
- - `XBC` - European Unit of Account (XBC)
- - `XBD` - European Unit of Account (XBD)
- - `FKP` - Falkland Islands Pound
- - `FJD` - Fijian Dollar
- - `FIM` - Finnish Markka
- - `FRF` - French Franc
- - `XFO` - French Gold Franc
- - `XFU` - French UIC-Franc
- - `GMD` - Gambian Dalasi
- - `GEK` - Georgian Kupon Larit
- - `GEL` - Georgian Lari
- - `DEM` - German Mark
- - `GHS` - Ghanaian Cedi
- - `GHC` - Ghanaian Cedi (1979β2007)
- - `GIP` - Gibraltar Pound
- - `XAU` - Gold
- - `GRD` - Greek Drachma
- - `GTQ` - Guatemalan Quetzal
- - `GWP` - Guinea-Bissau Peso
- - `GNF` - Guinean Franc
- - `GNS` - Guinean Syli
- - `GYD` - Guyanaese Dollar
- - `HTG` - Haitian Gourde
- - `HNL` - Honduran Lempira
- - `HKD` - Hong Kong Dollar
- - `HUF` - Hungarian Forint
- - `IMP` - IMP
- - `ISK` - Icelandic KrΓ³na
- - `ISJ` - Icelandic KrΓ³na (1918β1981)
- - `INR` - Indian Rupee
- - `IDR` - Indonesian Rupiah
- - `IRR` - Iranian Rial
- - `IQD` - Iraqi Dinar
- - `IEP` - Irish Pound
- - `ILS` - Israeli New Shekel
- - `ILP` - Israeli Pound
- - `ILR` - Israeli Shekel (1980β1985)
- - `ITL` - Italian Lira
- - `JMD` - Jamaican Dollar
- - `JPY` - Japanese Yen
- - `JOD` - Jordanian Dinar
- - `KZT` - Kazakhstani Tenge
- - `KES` - Kenyan Shilling
- - `KWD` - Kuwaiti Dinar
- - `KGS` - Kyrgystani Som
- - `LAK` - Laotian Kip
- - `LVL` - Latvian Lats
- - `LVR` - Latvian Ruble
- - `LBP` - Lebanese Pound
- - `LSL` - Lesotho Loti
- - `LRD` - Liberian Dollar
- - `LYD` - Libyan Dinar
- - `LTL` - Lithuanian Litas
- - `LTT` - Lithuanian Talonas
- - `LUL` - Luxembourg Financial Franc
- - `LUC` - Luxembourgian Convertible Franc
- - `LUF` - Luxembourgian Franc
- - `MOP` - Macanese Pataca
- - `MKD` - Macedonian Denar
- - `MKN` - Macedonian Denar (1992β1993)
- - `MGA` - Malagasy Ariary
- - `MGF` - Malagasy Franc
- - `MWK` - Malawian Kwacha
- - `MYR` - Malaysian Ringgit
- - `MVR` - Maldivian Rufiyaa
- - `MVP` - Maldivian Rupee (1947β1981)
- - `MLF` - Malian Franc
- - `MTL` - Maltese Lira
- - `MTP` - Maltese Pound
- - `MRU` - Mauritanian Ouguiya
- - `MRO` - Mauritanian Ouguiya (1973β2017)
- - `MUR` - Mauritian Rupee
- - `MXV` - Mexican Investment Unit
- - `MXN` - Mexican Peso
- - `MXP` - Mexican Silver Peso (1861β1992)
- - `MDC` - Moldovan Cupon
- - `MDL` - Moldovan Leu
- - `MCF` - Monegasque Franc
- - `MNT` - Mongolian Tugrik
- - `MAD` - Moroccan Dirham
- - `MAF` - Moroccan Franc
- - `MZE` - Mozambican Escudo
- - `MZN` - Mozambican Metical
- - `MZM` - Mozambican Metical (1980β2006)
- - `MMK` - Myanmar Kyat
- - `NAD` - Namibian Dollar
- - `NPR` - Nepalese Rupee
- - `ANG` - Netherlands Antillean Guilder
- - `TWD` - New Taiwan Dollar
- - `NZD` - New Zealand Dollar
- - `NIO` - Nicaraguan CΓ³rdoba
- - `NIC` - Nicaraguan CΓ³rdoba (1988β1991)
- - `NGN` - Nigerian Naira
- - `KPW` - North Korean Won
- - `NOK` - Norwegian Krone
- - `OMR` - Omani Rial
- - `PKR` - Pakistani Rupee
- - `XPD` - Palladium
- - `PAB` - Panamanian Balboa
- - `PGK` - Papua New Guinean Kina
- - `PYG` - Paraguayan Guarani
- - `PEI` - Peruvian Inti
- - `PEN` - Peruvian Sol
- - `PES` - Peruvian Sol (1863β1965)
- - `PHP` - Philippine Peso
- - `XPT` - Platinum
- - `PLN` - Polish Zloty
- - `PLZ` - Polish Zloty (1950β1995)
- - `PTE` - Portuguese Escudo
- - `GWE` - Portuguese Guinea Escudo
- - `QAR` - Qatari Rial
- - `XRE` - RINET Funds
- - `RHD` - Rhodesian Dollar
- - `RON` - Romanian Leu
- - `ROL` - Romanian Leu (1952β2006)
- - `RUB` - Russian Ruble
- - `RUR` - Russian Ruble (1991β1998)
- - `RWF` - Rwandan Franc
- - `SVC` - Salvadoran ColΓ³n
- - `WST` - Samoan Tala
- - `SAR` - Saudi Riyal
- - `RSD` - Serbian Dinar
- - `CSD` - Serbian Dinar (2002β2006)
- - `SCR` - Seychellois Rupee
- - `SLL` - Sierra Leonean Leone
- - `XAG` - Silver
- - `SGD` - Singapore Dollar
- - `SKK` - Slovak Koruna
- - `SIT` - Slovenian Tolar
- - `SBD` - Solomon Islands Dollar
- - `SOS` - Somali Shilling
- - `ZAR` - South African Rand
- - `ZAL` - South African Rand (financial)
- - `KRH` - South Korean Hwan (1953β1962)
- - `KRW` - South Korean Won
- - `KRO` - South Korean Won (1945β1953)
- - `SSP` - South Sudanese Pound
- - `SUR` - Soviet Rouble
- - `ESP` - Spanish Peseta
- - `ESA` - Spanish Peseta (A account)
- - `ESB` - Spanish Peseta (convertible account)
- - `XDR` - Special Drawing Rights
- - `LKR` - Sri Lankan Rupee
- - `SHP` - St. Helena Pound
- - `XSU` - Sucre
- - `SDD` - Sudanese Dinar (1992β2007)
- - `SDG` - Sudanese Pound
- - `SDP` - Sudanese Pound (1957β1998)
- - `SRD` - Surinamese Dollar
- - `SRG` - Surinamese Guilder
- - `SZL` - Swazi Lilangeni
- - `SEK` - Swedish Krona
- - `CHF` - Swiss Franc
- - `SYP` - Syrian Pound
- - `STN` - SΓ£o TomΓ© & PrΓncipe Dobra
- - `STD` - SΓ£o TomΓ© & PrΓncipe Dobra (1977β2017)
- - `TVD` - TVD
- - `TJR` - Tajikistani Ruble
- - `TJS` - Tajikistani Somoni
- - `TZS` - Tanzanian Shilling
- - `XTS` - Testing Currency Code
- - `THB` - Thai Baht
- - `XXX` - The codes assigned for transactions where no currency is involved
- - `TPE` - Timorese Escudo
- - `TOP` - Tongan PaΚ»anga
- - `TTD` - Trinidad & Tobago Dollar
- - `TND` - Tunisian Dinar
- - `TRY` - Turkish Lira
- - `TRL` - Turkish Lira (1922β2005)
- - `TMT` - Turkmenistani Manat
- - `TMM` - Turkmenistani Manat (1993β2009)
- - `USD` - US Dollar
- - `USN` - US Dollar (Next day)
- - `USS` - US Dollar (Same day)
- - `UGX` - Ugandan Shilling
- - `UGS` - Ugandan Shilling (1966β1987)
- - `UAH` - Ukrainian Hryvnia
- - `UAK` - Ukrainian Karbovanets
- - `AED` - United Arab Emirates Dirham
- - `UYW` - Uruguayan Nominal Wage Index Unit
- - `UYU` - Uruguayan Peso
- - `UYP` - Uruguayan Peso (1975β1993)
- - `UYI` - Uruguayan Peso (Indexed Units)
- - `UZS` - Uzbekistani Som
- - `VUV` - Vanuatu Vatu
- - `VES` - Venezuelan BolΓvar
- - `VEB` - Venezuelan BolΓvar (1871β2008)
- - `VEF` - Venezuelan BolΓvar (2008β2018)
- - `VND` - Vietnamese Dong
- - `VNN` - Vietnamese Dong (1978β1985)
- - `CHE` - WIR Euro
- - `CHW` - WIR Franc
- - `XOF` - West African CFA Franc
- - `YDD` - Yemeni Dinar
- - `YER` - Yemeni Rial
- - `YUN` - Yugoslavian Convertible Dinar (1990β1992)
- - `YUD` - Yugoslavian Hard Dinar (1966β1990)
- - `YUM` - Yugoslavian New Dinar (1994β2002)
- - `YUR` - Yugoslavian Reformed Dinar (1992β1993)
- - `ZWN` - ZWN
- - `ZRN` - Zairean New Zaire (1993β1998)
- - `ZRZ` - Zairean Zaire (1971β1993)
- - `ZMW` - Zambian Kwacha
- - `ZMK` - Zambian Kwacha (1968β2012)
- - `ZWD` - Zimbabwean Dollar (1980β2008)
- - `ZWR` - Zimbabwean Dollar (2008)
- - `ZWL` - Zimbabwean Dollar (2009)
- """
-
- XUA = "XUA"
- AFN = "AFN"
- AFA = "AFA"
- ALL = "ALL"
- ALK = "ALK"
- DZD = "DZD"
- ADP = "ADP"
- AOA = "AOA"
- AOK = "AOK"
- AON = "AON"
- AOR = "AOR"
- ARA = "ARA"
- ARS = "ARS"
- ARM = "ARM"
- ARP = "ARP"
- ARL = "ARL"
- AMD = "AMD"
- AWG = "AWG"
- AUD = "AUD"
- ATS = "ATS"
- AZN = "AZN"
- AZM = "AZM"
- BSD = "BSD"
- BHD = "BHD"
- BDT = "BDT"
- BBD = "BBD"
- BYN = "BYN"
- BYB = "BYB"
- BYR = "BYR"
- BEF = "BEF"
- BEC = "BEC"
- BEL = "BEL"
- BZD = "BZD"
- BMD = "BMD"
- BTN = "BTN"
- BOB = "BOB"
- BOL = "BOL"
- BOV = "BOV"
- BOP = "BOP"
- BAM = "BAM"
- BAD = "BAD"
- BAN = "BAN"
- BWP = "BWP"
- BRC = "BRC"
- BRZ = "BRZ"
- BRE = "BRE"
- BRR = "BRR"
- BRN = "BRN"
- BRB = "BRB"
- BRL = "BRL"
- GBP = "GBP"
- BND = "BND"
- BGL = "BGL"
- BGN = "BGN"
- BGO = "BGO"
- BGM = "BGM"
- BUK = "BUK"
- BIF = "BIF"
- XPF = "XPF"
- KHR = "KHR"
- CAD = "CAD"
- CVE = "CVE"
- KYD = "KYD"
- XAF = "XAF"
- CLE = "CLE"
- CLP = "CLP"
- CLF = "CLF"
- CNX = "CNX"
- CNY = "CNY"
- CNH = "CNH"
- COP = "COP"
- COU = "COU"
- KMF = "KMF"
- CDF = "CDF"
- CRC = "CRC"
- HRD = "HRD"
- HRK = "HRK"
- CUC = "CUC"
- CUP = "CUP"
- CYP = "CYP"
- CZK = "CZK"
- CSK = "CSK"
- DKK = "DKK"
- DJF = "DJF"
- DOP = "DOP"
- NLG = "NLG"
- XCD = "XCD"
- DDM = "DDM"
- ECS = "ECS"
- ECV = "ECV"
- EGP = "EGP"
- GQE = "GQE"
- ERN = "ERN"
- EEK = "EEK"
- ETB = "ETB"
- EUR = "EUR"
- XBA = "XBA"
- XEU = "XEU"
- XBB = "XBB"
- XBC = "XBC"
- XBD = "XBD"
- FKP = "FKP"
- FJD = "FJD"
- FIM = "FIM"
- FRF = "FRF"
- XFO = "XFO"
- XFU = "XFU"
- GMD = "GMD"
- GEK = "GEK"
- GEL = "GEL"
- DEM = "DEM"
- GHS = "GHS"
- GHC = "GHC"
- GIP = "GIP"
- XAU = "XAU"
- GRD = "GRD"
- GTQ = "GTQ"
- GWP = "GWP"
- GNF = "GNF"
- GNS = "GNS"
- GYD = "GYD"
- HTG = "HTG"
- HNL = "HNL"
- HKD = "HKD"
- HUF = "HUF"
- IMP = "IMP"
- ISK = "ISK"
- ISJ = "ISJ"
- INR = "INR"
- IDR = "IDR"
- IRR = "IRR"
- IQD = "IQD"
- IEP = "IEP"
- ILS = "ILS"
- ILP = "ILP"
- ILR = "ILR"
- ITL = "ITL"
- JMD = "JMD"
- JPY = "JPY"
- JOD = "JOD"
- KZT = "KZT"
- KES = "KES"
- KWD = "KWD"
- KGS = "KGS"
- LAK = "LAK"
- LVL = "LVL"
- LVR = "LVR"
- LBP = "LBP"
- LSL = "LSL"
- LRD = "LRD"
- LYD = "LYD"
- LTL = "LTL"
- LTT = "LTT"
- LUL = "LUL"
- LUC = "LUC"
- LUF = "LUF"
- MOP = "MOP"
- MKD = "MKD"
- MKN = "MKN"
- MGA = "MGA"
- MGF = "MGF"
- MWK = "MWK"
- MYR = "MYR"
- MVR = "MVR"
- MVP = "MVP"
- MLF = "MLF"
- MTL = "MTL"
- MTP = "MTP"
- MRU = "MRU"
- MRO = "MRO"
- MUR = "MUR"
- MXV = "MXV"
- MXN = "MXN"
- MXP = "MXP"
- MDC = "MDC"
- MDL = "MDL"
- MCF = "MCF"
- MNT = "MNT"
- MAD = "MAD"
- MAF = "MAF"
- MZE = "MZE"
- MZN = "MZN"
- MZM = "MZM"
- MMK = "MMK"
- NAD = "NAD"
- NPR = "NPR"
- ANG = "ANG"
- TWD = "TWD"
- NZD = "NZD"
- NIO = "NIO"
- NIC = "NIC"
- NGN = "NGN"
- KPW = "KPW"
- NOK = "NOK"
- OMR = "OMR"
- PKR = "PKR"
- XPD = "XPD"
- PAB = "PAB"
- PGK = "PGK"
- PYG = "PYG"
- PEI = "PEI"
- PEN = "PEN"
- PES = "PES"
- PHP = "PHP"
- XPT = "XPT"
- PLN = "PLN"
- PLZ = "PLZ"
- PTE = "PTE"
- GWE = "GWE"
- QAR = "QAR"
- XRE = "XRE"
- RHD = "RHD"
- RON = "RON"
- ROL = "ROL"
- RUB = "RUB"
- RUR = "RUR"
- RWF = "RWF"
- SVC = "SVC"
- WST = "WST"
- SAR = "SAR"
- RSD = "RSD"
- CSD = "CSD"
- SCR = "SCR"
- SLL = "SLL"
- XAG = "XAG"
- SGD = "SGD"
- SKK = "SKK"
- SIT = "SIT"
- SBD = "SBD"
- SOS = "SOS"
- ZAR = "ZAR"
- ZAL = "ZAL"
- KRH = "KRH"
- KRW = "KRW"
- KRO = "KRO"
- SSP = "SSP"
- SUR = "SUR"
- ESP = "ESP"
- ESA = "ESA"
- ESB = "ESB"
- XDR = "XDR"
- LKR = "LKR"
- SHP = "SHP"
- XSU = "XSU"
- SDD = "SDD"
- SDG = "SDG"
- SDP = "SDP"
- SRD = "SRD"
- SRG = "SRG"
- SZL = "SZL"
- SEK = "SEK"
- CHF = "CHF"
- SYP = "SYP"
- STN = "STN"
- STD = "STD"
- TVD = "TVD"
- TJR = "TJR"
- TJS = "TJS"
- TZS = "TZS"
- XTS = "XTS"
- THB = "THB"
- XXX = "XXX"
- TPE = "TPE"
- TOP = "TOP"
- TTD = "TTD"
- TND = "TND"
- TRY = "TRY"
- TRL = "TRL"
- TMT = "TMT"
- TMM = "TMM"
- USD = "USD"
- USN = "USN"
- USS = "USS"
- UGX = "UGX"
- UGS = "UGS"
- UAH = "UAH"
- UAK = "UAK"
- AED = "AED"
- UYW = "UYW"
- UYU = "UYU"
- UYP = "UYP"
- UYI = "UYI"
- UZS = "UZS"
- VUV = "VUV"
- VES = "VES"
- VEB = "VEB"
- VEF = "VEF"
- VND = "VND"
- VNN = "VNN"
- CHE = "CHE"
- CHW = "CHW"
- XOF = "XOF"
- YDD = "YDD"
- YER = "YER"
- YUN = "YUN"
- YUD = "YUD"
- YUM = "YUM"
- YUR = "YUR"
- ZWN = "ZWN"
- ZRN = "ZRN"
- ZRZ = "ZRZ"
- ZMW = "ZMW"
- ZMK = "ZMK"
- ZWD = "ZWD"
- ZWR = "ZWR"
- ZWL = "ZWL"
-
- def visit(
- self,
- xua: typing.Callable[[], T_Result],
- afn: typing.Callable[[], T_Result],
- afa: typing.Callable[[], T_Result],
- all_: typing.Callable[[], T_Result],
- alk: typing.Callable[[], T_Result],
- dzd: typing.Callable[[], T_Result],
- adp: typing.Callable[[], T_Result],
- aoa: typing.Callable[[], T_Result],
- aok: typing.Callable[[], T_Result],
- aon: typing.Callable[[], T_Result],
- aor: typing.Callable[[], T_Result],
- ara: typing.Callable[[], T_Result],
- ars: typing.Callable[[], T_Result],
- arm: typing.Callable[[], T_Result],
- arp: typing.Callable[[], T_Result],
- arl: typing.Callable[[], T_Result],
- amd: typing.Callable[[], T_Result],
- awg: typing.Callable[[], T_Result],
- aud: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- azn: typing.Callable[[], T_Result],
- azm: typing.Callable[[], T_Result],
- bsd: typing.Callable[[], T_Result],
- bhd: typing.Callable[[], T_Result],
- bdt: typing.Callable[[], T_Result],
- bbd: typing.Callable[[], T_Result],
- byn: typing.Callable[[], T_Result],
- byb: typing.Callable[[], T_Result],
- byr: typing.Callable[[], T_Result],
- bef: typing.Callable[[], T_Result],
- bec: typing.Callable[[], T_Result],
- bel: typing.Callable[[], T_Result],
- bzd: typing.Callable[[], T_Result],
- bmd: typing.Callable[[], T_Result],
- btn: typing.Callable[[], T_Result],
- bob: typing.Callable[[], T_Result],
- bol: typing.Callable[[], T_Result],
- bov: typing.Callable[[], T_Result],
- bop: typing.Callable[[], T_Result],
- bam: typing.Callable[[], T_Result],
- bad: typing.Callable[[], T_Result],
- ban: typing.Callable[[], T_Result],
- bwp: typing.Callable[[], T_Result],
- brc: typing.Callable[[], T_Result],
- brz: typing.Callable[[], T_Result],
- bre: typing.Callable[[], T_Result],
- brr: typing.Callable[[], T_Result],
- brn: typing.Callable[[], T_Result],
- brb: typing.Callable[[], T_Result],
- brl: typing.Callable[[], T_Result],
- gbp: typing.Callable[[], T_Result],
- bnd: typing.Callable[[], T_Result],
- bgl: typing.Callable[[], T_Result],
- bgn: typing.Callable[[], T_Result],
- bgo: typing.Callable[[], T_Result],
- bgm: typing.Callable[[], T_Result],
- buk: typing.Callable[[], T_Result],
- bif: typing.Callable[[], T_Result],
- xpf: typing.Callable[[], T_Result],
- khr: typing.Callable[[], T_Result],
- cad: typing.Callable[[], T_Result],
- cve: typing.Callable[[], T_Result],
- kyd: typing.Callable[[], T_Result],
- xaf: typing.Callable[[], T_Result],
- cle: typing.Callable[[], T_Result],
- clp: typing.Callable[[], T_Result],
- clf: typing.Callable[[], T_Result],
- cnx: typing.Callable[[], T_Result],
- cny: typing.Callable[[], T_Result],
- cnh: typing.Callable[[], T_Result],
- cop: typing.Callable[[], T_Result],
- cou: typing.Callable[[], T_Result],
- kmf: typing.Callable[[], T_Result],
- cdf: typing.Callable[[], T_Result],
- crc: typing.Callable[[], T_Result],
- hrd: typing.Callable[[], T_Result],
- hrk: typing.Callable[[], T_Result],
- cuc: typing.Callable[[], T_Result],
- cup: typing.Callable[[], T_Result],
- cyp: typing.Callable[[], T_Result],
- czk: typing.Callable[[], T_Result],
- csk: typing.Callable[[], T_Result],
- dkk: typing.Callable[[], T_Result],
- djf: typing.Callable[[], T_Result],
- dop: typing.Callable[[], T_Result],
- nlg: typing.Callable[[], T_Result],
- xcd: typing.Callable[[], T_Result],
- ddm: typing.Callable[[], T_Result],
- ecs: typing.Callable[[], T_Result],
- ecv: typing.Callable[[], T_Result],
- egp: typing.Callable[[], T_Result],
- gqe: typing.Callable[[], T_Result],
- ern: typing.Callable[[], T_Result],
- eek: typing.Callable[[], T_Result],
- etb: typing.Callable[[], T_Result],
- eur: typing.Callable[[], T_Result],
- xba: typing.Callable[[], T_Result],
- xeu: typing.Callable[[], T_Result],
- xbb: typing.Callable[[], T_Result],
- xbc: typing.Callable[[], T_Result],
- xbd: typing.Callable[[], T_Result],
- fkp: typing.Callable[[], T_Result],
- fjd: typing.Callable[[], T_Result],
- fim: typing.Callable[[], T_Result],
- frf: typing.Callable[[], T_Result],
- xfo: typing.Callable[[], T_Result],
- xfu: typing.Callable[[], T_Result],
- gmd: typing.Callable[[], T_Result],
- gek: typing.Callable[[], T_Result],
- gel: typing.Callable[[], T_Result],
- dem: typing.Callable[[], T_Result],
- ghs: typing.Callable[[], T_Result],
- ghc: typing.Callable[[], T_Result],
- gip: typing.Callable[[], T_Result],
- xau: typing.Callable[[], T_Result],
- grd: typing.Callable[[], T_Result],
- gtq: typing.Callable[[], T_Result],
- gwp: typing.Callable[[], T_Result],
- gnf: typing.Callable[[], T_Result],
- gns: typing.Callable[[], T_Result],
- gyd: typing.Callable[[], T_Result],
- htg: typing.Callable[[], T_Result],
- hnl: typing.Callable[[], T_Result],
- hkd: typing.Callable[[], T_Result],
- huf: typing.Callable[[], T_Result],
- imp: typing.Callable[[], T_Result],
- isk: typing.Callable[[], T_Result],
- isj: typing.Callable[[], T_Result],
- inr: typing.Callable[[], T_Result],
- idr: typing.Callable[[], T_Result],
- irr: typing.Callable[[], T_Result],
- iqd: typing.Callable[[], T_Result],
- iep: typing.Callable[[], T_Result],
- ils: typing.Callable[[], T_Result],
- ilp: typing.Callable[[], T_Result],
- ilr: typing.Callable[[], T_Result],
- itl: typing.Callable[[], T_Result],
- jmd: typing.Callable[[], T_Result],
- jpy: typing.Callable[[], T_Result],
- jod: typing.Callable[[], T_Result],
- kzt: typing.Callable[[], T_Result],
- kes: typing.Callable[[], T_Result],
- kwd: typing.Callable[[], T_Result],
- kgs: typing.Callable[[], T_Result],
- lak: typing.Callable[[], T_Result],
- lvl: typing.Callable[[], T_Result],
- lvr: typing.Callable[[], T_Result],
- lbp: typing.Callable[[], T_Result],
- lsl: typing.Callable[[], T_Result],
- lrd: typing.Callable[[], T_Result],
- lyd: typing.Callable[[], T_Result],
- ltl: typing.Callable[[], T_Result],
- ltt: typing.Callable[[], T_Result],
- lul: typing.Callable[[], T_Result],
- luc: typing.Callable[[], T_Result],
- luf: typing.Callable[[], T_Result],
- mop: typing.Callable[[], T_Result],
- mkd: typing.Callable[[], T_Result],
- mkn: typing.Callable[[], T_Result],
- mga: typing.Callable[[], T_Result],
- mgf: typing.Callable[[], T_Result],
- mwk: typing.Callable[[], T_Result],
- myr: typing.Callable[[], T_Result],
- mvr: typing.Callable[[], T_Result],
- mvp: typing.Callable[[], T_Result],
- mlf: typing.Callable[[], T_Result],
- mtl: typing.Callable[[], T_Result],
- mtp: typing.Callable[[], T_Result],
- mru: typing.Callable[[], T_Result],
- mro: typing.Callable[[], T_Result],
- mur: typing.Callable[[], T_Result],
- mxv: typing.Callable[[], T_Result],
- mxn: typing.Callable[[], T_Result],
- mxp: typing.Callable[[], T_Result],
- mdc: typing.Callable[[], T_Result],
- mdl: typing.Callable[[], T_Result],
- mcf: typing.Callable[[], T_Result],
- mnt: typing.Callable[[], T_Result],
- mad: typing.Callable[[], T_Result],
- maf: typing.Callable[[], T_Result],
- mze: typing.Callable[[], T_Result],
- mzn: typing.Callable[[], T_Result],
- mzm: typing.Callable[[], T_Result],
- mmk: typing.Callable[[], T_Result],
- nad: typing.Callable[[], T_Result],
- npr: typing.Callable[[], T_Result],
- ang: typing.Callable[[], T_Result],
- twd: typing.Callable[[], T_Result],
- nzd: typing.Callable[[], T_Result],
- nio: typing.Callable[[], T_Result],
- nic: typing.Callable[[], T_Result],
- ngn: typing.Callable[[], T_Result],
- kpw: typing.Callable[[], T_Result],
- nok: typing.Callable[[], T_Result],
- omr: typing.Callable[[], T_Result],
- pkr: typing.Callable[[], T_Result],
- xpd: typing.Callable[[], T_Result],
- pab: typing.Callable[[], T_Result],
- pgk: typing.Callable[[], T_Result],
- pyg: typing.Callable[[], T_Result],
- pei: typing.Callable[[], T_Result],
- pen: typing.Callable[[], T_Result],
- pes: typing.Callable[[], T_Result],
- php: typing.Callable[[], T_Result],
- xpt: typing.Callable[[], T_Result],
- pln: typing.Callable[[], T_Result],
- plz: typing.Callable[[], T_Result],
- pte: typing.Callable[[], T_Result],
- gwe: typing.Callable[[], T_Result],
- qar: typing.Callable[[], T_Result],
- xre: typing.Callable[[], T_Result],
- rhd: typing.Callable[[], T_Result],
- ron: typing.Callable[[], T_Result],
- rol: typing.Callable[[], T_Result],
- rub: typing.Callable[[], T_Result],
- rur: typing.Callable[[], T_Result],
- rwf: typing.Callable[[], T_Result],
- svc: typing.Callable[[], T_Result],
- wst: typing.Callable[[], T_Result],
- sar: typing.Callable[[], T_Result],
- rsd: typing.Callable[[], T_Result],
- csd: typing.Callable[[], T_Result],
- scr: typing.Callable[[], T_Result],
- sll: typing.Callable[[], T_Result],
- xag: typing.Callable[[], T_Result],
- sgd: typing.Callable[[], T_Result],
- skk: typing.Callable[[], T_Result],
- sit: typing.Callable[[], T_Result],
- sbd: typing.Callable[[], T_Result],
- sos: typing.Callable[[], T_Result],
- zar: typing.Callable[[], T_Result],
- zal: typing.Callable[[], T_Result],
- krh: typing.Callable[[], T_Result],
- krw: typing.Callable[[], T_Result],
- kro: typing.Callable[[], T_Result],
- ssp: typing.Callable[[], T_Result],
- sur: typing.Callable[[], T_Result],
- esp: typing.Callable[[], T_Result],
- esa: typing.Callable[[], T_Result],
- esb: typing.Callable[[], T_Result],
- xdr: typing.Callable[[], T_Result],
- lkr: typing.Callable[[], T_Result],
- shp: typing.Callable[[], T_Result],
- xsu: typing.Callable[[], T_Result],
- sdd: typing.Callable[[], T_Result],
- sdg: typing.Callable[[], T_Result],
- sdp: typing.Callable[[], T_Result],
- srd: typing.Callable[[], T_Result],
- srg: typing.Callable[[], T_Result],
- szl: typing.Callable[[], T_Result],
- sek: typing.Callable[[], T_Result],
- chf: typing.Callable[[], T_Result],
- syp: typing.Callable[[], T_Result],
- stn: typing.Callable[[], T_Result],
- std: typing.Callable[[], T_Result],
- tvd: typing.Callable[[], T_Result],
- tjr: typing.Callable[[], T_Result],
- tjs: typing.Callable[[], T_Result],
- tzs: typing.Callable[[], T_Result],
- xts: typing.Callable[[], T_Result],
- thb: typing.Callable[[], T_Result],
- xxx: typing.Callable[[], T_Result],
- tpe: typing.Callable[[], T_Result],
- top: typing.Callable[[], T_Result],
- ttd: typing.Callable[[], T_Result],
- tnd: typing.Callable[[], T_Result],
- try_: typing.Callable[[], T_Result],
- trl: typing.Callable[[], T_Result],
- tmt: typing.Callable[[], T_Result],
- tmm: typing.Callable[[], T_Result],
- usd: typing.Callable[[], T_Result],
- usn: typing.Callable[[], T_Result],
- uss: typing.Callable[[], T_Result],
- ugx: typing.Callable[[], T_Result],
- ugs: typing.Callable[[], T_Result],
- uah: typing.Callable[[], T_Result],
- uak: typing.Callable[[], T_Result],
- aed: typing.Callable[[], T_Result],
- uyw: typing.Callable[[], T_Result],
- uyu: typing.Callable[[], T_Result],
- uyp: typing.Callable[[], T_Result],
- uyi: typing.Callable[[], T_Result],
- uzs: typing.Callable[[], T_Result],
- vuv: typing.Callable[[], T_Result],
- ves: typing.Callable[[], T_Result],
- veb: typing.Callable[[], T_Result],
- vef: typing.Callable[[], T_Result],
- vnd: typing.Callable[[], T_Result],
- vnn: typing.Callable[[], T_Result],
- che: typing.Callable[[], T_Result],
- chw: typing.Callable[[], T_Result],
- xof: typing.Callable[[], T_Result],
- ydd: typing.Callable[[], T_Result],
- yer: typing.Callable[[], T_Result],
- yun: typing.Callable[[], T_Result],
- yud: typing.Callable[[], T_Result],
- yum: typing.Callable[[], T_Result],
- yur: typing.Callable[[], T_Result],
- zwn: typing.Callable[[], T_Result],
- zrn: typing.Callable[[], T_Result],
- zrz: typing.Callable[[], T_Result],
- zmw: typing.Callable[[], T_Result],
- zmk: typing.Callable[[], T_Result],
- zwd: typing.Callable[[], T_Result],
- zwr: typing.Callable[[], T_Result],
- zwl: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PayCurrencyEnum.XUA:
- return xua()
- if self is PayCurrencyEnum.AFN:
- return afn()
- if self is PayCurrencyEnum.AFA:
- return afa()
- if self is PayCurrencyEnum.ALL:
- return all_()
- if self is PayCurrencyEnum.ALK:
- return alk()
- if self is PayCurrencyEnum.DZD:
- return dzd()
- if self is PayCurrencyEnum.ADP:
- return adp()
- if self is PayCurrencyEnum.AOA:
- return aoa()
- if self is PayCurrencyEnum.AOK:
- return aok()
- if self is PayCurrencyEnum.AON:
- return aon()
- if self is PayCurrencyEnum.AOR:
- return aor()
- if self is PayCurrencyEnum.ARA:
- return ara()
- if self is PayCurrencyEnum.ARS:
- return ars()
- if self is PayCurrencyEnum.ARM:
- return arm()
- if self is PayCurrencyEnum.ARP:
- return arp()
- if self is PayCurrencyEnum.ARL:
- return arl()
- if self is PayCurrencyEnum.AMD:
- return amd()
- if self is PayCurrencyEnum.AWG:
- return awg()
- if self is PayCurrencyEnum.AUD:
- return aud()
- if self is PayCurrencyEnum.ATS:
- return ats()
- if self is PayCurrencyEnum.AZN:
- return azn()
- if self is PayCurrencyEnum.AZM:
- return azm()
- if self is PayCurrencyEnum.BSD:
- return bsd()
- if self is PayCurrencyEnum.BHD:
- return bhd()
- if self is PayCurrencyEnum.BDT:
- return bdt()
- if self is PayCurrencyEnum.BBD:
- return bbd()
- if self is PayCurrencyEnum.BYN:
- return byn()
- if self is PayCurrencyEnum.BYB:
- return byb()
- if self is PayCurrencyEnum.BYR:
- return byr()
- if self is PayCurrencyEnum.BEF:
- return bef()
- if self is PayCurrencyEnum.BEC:
- return bec()
- if self is PayCurrencyEnum.BEL:
- return bel()
- if self is PayCurrencyEnum.BZD:
- return bzd()
- if self is PayCurrencyEnum.BMD:
- return bmd()
- if self is PayCurrencyEnum.BTN:
- return btn()
- if self is PayCurrencyEnum.BOB:
- return bob()
- if self is PayCurrencyEnum.BOL:
- return bol()
- if self is PayCurrencyEnum.BOV:
- return bov()
- if self is PayCurrencyEnum.BOP:
- return bop()
- if self is PayCurrencyEnum.BAM:
- return bam()
- if self is PayCurrencyEnum.BAD:
- return bad()
- if self is PayCurrencyEnum.BAN:
- return ban()
- if self is PayCurrencyEnum.BWP:
- return bwp()
- if self is PayCurrencyEnum.BRC:
- return brc()
- if self is PayCurrencyEnum.BRZ:
- return brz()
- if self is PayCurrencyEnum.BRE:
- return bre()
- if self is PayCurrencyEnum.BRR:
- return brr()
- if self is PayCurrencyEnum.BRN:
- return brn()
- if self is PayCurrencyEnum.BRB:
- return brb()
- if self is PayCurrencyEnum.BRL:
- return brl()
- if self is PayCurrencyEnum.GBP:
- return gbp()
- if self is PayCurrencyEnum.BND:
- return bnd()
- if self is PayCurrencyEnum.BGL:
- return bgl()
- if self is PayCurrencyEnum.BGN:
- return bgn()
- if self is PayCurrencyEnum.BGO:
- return bgo()
- if self is PayCurrencyEnum.BGM:
- return bgm()
- if self is PayCurrencyEnum.BUK:
- return buk()
- if self is PayCurrencyEnum.BIF:
- return bif()
- if self is PayCurrencyEnum.XPF:
- return xpf()
- if self is PayCurrencyEnum.KHR:
- return khr()
- if self is PayCurrencyEnum.CAD:
- return cad()
- if self is PayCurrencyEnum.CVE:
- return cve()
- if self is PayCurrencyEnum.KYD:
- return kyd()
- if self is PayCurrencyEnum.XAF:
- return xaf()
- if self is PayCurrencyEnum.CLE:
- return cle()
- if self is PayCurrencyEnum.CLP:
- return clp()
- if self is PayCurrencyEnum.CLF:
- return clf()
- if self is PayCurrencyEnum.CNX:
- return cnx()
- if self is PayCurrencyEnum.CNY:
- return cny()
- if self is PayCurrencyEnum.CNH:
- return cnh()
- if self is PayCurrencyEnum.COP:
- return cop()
- if self is PayCurrencyEnum.COU:
- return cou()
- if self is PayCurrencyEnum.KMF:
- return kmf()
- if self is PayCurrencyEnum.CDF:
- return cdf()
- if self is PayCurrencyEnum.CRC:
- return crc()
- if self is PayCurrencyEnum.HRD:
- return hrd()
- if self is PayCurrencyEnum.HRK:
- return hrk()
- if self is PayCurrencyEnum.CUC:
- return cuc()
- if self is PayCurrencyEnum.CUP:
- return cup()
- if self is PayCurrencyEnum.CYP:
- return cyp()
- if self is PayCurrencyEnum.CZK:
- return czk()
- if self is PayCurrencyEnum.CSK:
- return csk()
- if self is PayCurrencyEnum.DKK:
- return dkk()
- if self is PayCurrencyEnum.DJF:
- return djf()
- if self is PayCurrencyEnum.DOP:
- return dop()
- if self is PayCurrencyEnum.NLG:
- return nlg()
- if self is PayCurrencyEnum.XCD:
- return xcd()
- if self is PayCurrencyEnum.DDM:
- return ddm()
- if self is PayCurrencyEnum.ECS:
- return ecs()
- if self is PayCurrencyEnum.ECV:
- return ecv()
- if self is PayCurrencyEnum.EGP:
- return egp()
- if self is PayCurrencyEnum.GQE:
- return gqe()
- if self is PayCurrencyEnum.ERN:
- return ern()
- if self is PayCurrencyEnum.EEK:
- return eek()
- if self is PayCurrencyEnum.ETB:
- return etb()
- if self is PayCurrencyEnum.EUR:
- return eur()
- if self is PayCurrencyEnum.XBA:
- return xba()
- if self is PayCurrencyEnum.XEU:
- return xeu()
- if self is PayCurrencyEnum.XBB:
- return xbb()
- if self is PayCurrencyEnum.XBC:
- return xbc()
- if self is PayCurrencyEnum.XBD:
- return xbd()
- if self is PayCurrencyEnum.FKP:
- return fkp()
- if self is PayCurrencyEnum.FJD:
- return fjd()
- if self is PayCurrencyEnum.FIM:
- return fim()
- if self is PayCurrencyEnum.FRF:
- return frf()
- if self is PayCurrencyEnum.XFO:
- return xfo()
- if self is PayCurrencyEnum.XFU:
- return xfu()
- if self is PayCurrencyEnum.GMD:
- return gmd()
- if self is PayCurrencyEnum.GEK:
- return gek()
- if self is PayCurrencyEnum.GEL:
- return gel()
- if self is PayCurrencyEnum.DEM:
- return dem()
- if self is PayCurrencyEnum.GHS:
- return ghs()
- if self is PayCurrencyEnum.GHC:
- return ghc()
- if self is PayCurrencyEnum.GIP:
- return gip()
- if self is PayCurrencyEnum.XAU:
- return xau()
- if self is PayCurrencyEnum.GRD:
- return grd()
- if self is PayCurrencyEnum.GTQ:
- return gtq()
- if self is PayCurrencyEnum.GWP:
- return gwp()
- if self is PayCurrencyEnum.GNF:
- return gnf()
- if self is PayCurrencyEnum.GNS:
- return gns()
- if self is PayCurrencyEnum.GYD:
- return gyd()
- if self is PayCurrencyEnum.HTG:
- return htg()
- if self is PayCurrencyEnum.HNL:
- return hnl()
- if self is PayCurrencyEnum.HKD:
- return hkd()
- if self is PayCurrencyEnum.HUF:
- return huf()
- if self is PayCurrencyEnum.IMP:
- return imp()
- if self is PayCurrencyEnum.ISK:
- return isk()
- if self is PayCurrencyEnum.ISJ:
- return isj()
- if self is PayCurrencyEnum.INR:
- return inr()
- if self is PayCurrencyEnum.IDR:
- return idr()
- if self is PayCurrencyEnum.IRR:
- return irr()
- if self is PayCurrencyEnum.IQD:
- return iqd()
- if self is PayCurrencyEnum.IEP:
- return iep()
- if self is PayCurrencyEnum.ILS:
- return ils()
- if self is PayCurrencyEnum.ILP:
- return ilp()
- if self is PayCurrencyEnum.ILR:
- return ilr()
- if self is PayCurrencyEnum.ITL:
- return itl()
- if self is PayCurrencyEnum.JMD:
- return jmd()
- if self is PayCurrencyEnum.JPY:
- return jpy()
- if self is PayCurrencyEnum.JOD:
- return jod()
- if self is PayCurrencyEnum.KZT:
- return kzt()
- if self is PayCurrencyEnum.KES:
- return kes()
- if self is PayCurrencyEnum.KWD:
- return kwd()
- if self is PayCurrencyEnum.KGS:
- return kgs()
- if self is PayCurrencyEnum.LAK:
- return lak()
- if self is PayCurrencyEnum.LVL:
- return lvl()
- if self is PayCurrencyEnum.LVR:
- return lvr()
- if self is PayCurrencyEnum.LBP:
- return lbp()
- if self is PayCurrencyEnum.LSL:
- return lsl()
- if self is PayCurrencyEnum.LRD:
- return lrd()
- if self is PayCurrencyEnum.LYD:
- return lyd()
- if self is PayCurrencyEnum.LTL:
- return ltl()
- if self is PayCurrencyEnum.LTT:
- return ltt()
- if self is PayCurrencyEnum.LUL:
- return lul()
- if self is PayCurrencyEnum.LUC:
- return luc()
- if self is PayCurrencyEnum.LUF:
- return luf()
- if self is PayCurrencyEnum.MOP:
- return mop()
- if self is PayCurrencyEnum.MKD:
- return mkd()
- if self is PayCurrencyEnum.MKN:
- return mkn()
- if self is PayCurrencyEnum.MGA:
- return mga()
- if self is PayCurrencyEnum.MGF:
- return mgf()
- if self is PayCurrencyEnum.MWK:
- return mwk()
- if self is PayCurrencyEnum.MYR:
- return myr()
- if self is PayCurrencyEnum.MVR:
- return mvr()
- if self is PayCurrencyEnum.MVP:
- return mvp()
- if self is PayCurrencyEnum.MLF:
- return mlf()
- if self is PayCurrencyEnum.MTL:
- return mtl()
- if self is PayCurrencyEnum.MTP:
- return mtp()
- if self is PayCurrencyEnum.MRU:
- return mru()
- if self is PayCurrencyEnum.MRO:
- return mro()
- if self is PayCurrencyEnum.MUR:
- return mur()
- if self is PayCurrencyEnum.MXV:
- return mxv()
- if self is PayCurrencyEnum.MXN:
- return mxn()
- if self is PayCurrencyEnum.MXP:
- return mxp()
- if self is PayCurrencyEnum.MDC:
- return mdc()
- if self is PayCurrencyEnum.MDL:
- return mdl()
- if self is PayCurrencyEnum.MCF:
- return mcf()
- if self is PayCurrencyEnum.MNT:
- return mnt()
- if self is PayCurrencyEnum.MAD:
- return mad()
- if self is PayCurrencyEnum.MAF:
- return maf()
- if self is PayCurrencyEnum.MZE:
- return mze()
- if self is PayCurrencyEnum.MZN:
- return mzn()
- if self is PayCurrencyEnum.MZM:
- return mzm()
- if self is PayCurrencyEnum.MMK:
- return mmk()
- if self is PayCurrencyEnum.NAD:
- return nad()
- if self is PayCurrencyEnum.NPR:
- return npr()
- if self is PayCurrencyEnum.ANG:
- return ang()
- if self is PayCurrencyEnum.TWD:
- return twd()
- if self is PayCurrencyEnum.NZD:
- return nzd()
- if self is PayCurrencyEnum.NIO:
- return nio()
- if self is PayCurrencyEnum.NIC:
- return nic()
- if self is PayCurrencyEnum.NGN:
- return ngn()
- if self is PayCurrencyEnum.KPW:
- return kpw()
- if self is PayCurrencyEnum.NOK:
- return nok()
- if self is PayCurrencyEnum.OMR:
- return omr()
- if self is PayCurrencyEnum.PKR:
- return pkr()
- if self is PayCurrencyEnum.XPD:
- return xpd()
- if self is PayCurrencyEnum.PAB:
- return pab()
- if self is PayCurrencyEnum.PGK:
- return pgk()
- if self is PayCurrencyEnum.PYG:
- return pyg()
- if self is PayCurrencyEnum.PEI:
- return pei()
- if self is PayCurrencyEnum.PEN:
- return pen()
- if self is PayCurrencyEnum.PES:
- return pes()
- if self is PayCurrencyEnum.PHP:
- return php()
- if self is PayCurrencyEnum.XPT:
- return xpt()
- if self is PayCurrencyEnum.PLN:
- return pln()
- if self is PayCurrencyEnum.PLZ:
- return plz()
- if self is PayCurrencyEnum.PTE:
- return pte()
- if self is PayCurrencyEnum.GWE:
- return gwe()
- if self is PayCurrencyEnum.QAR:
- return qar()
- if self is PayCurrencyEnum.XRE:
- return xre()
- if self is PayCurrencyEnum.RHD:
- return rhd()
- if self is PayCurrencyEnum.RON:
- return ron()
- if self is PayCurrencyEnum.ROL:
- return rol()
- if self is PayCurrencyEnum.RUB:
- return rub()
- if self is PayCurrencyEnum.RUR:
- return rur()
- if self is PayCurrencyEnum.RWF:
- return rwf()
- if self is PayCurrencyEnum.SVC:
- return svc()
- if self is PayCurrencyEnum.WST:
- return wst()
- if self is PayCurrencyEnum.SAR:
- return sar()
- if self is PayCurrencyEnum.RSD:
- return rsd()
- if self is PayCurrencyEnum.CSD:
- return csd()
- if self is PayCurrencyEnum.SCR:
- return scr()
- if self is PayCurrencyEnum.SLL:
- return sll()
- if self is PayCurrencyEnum.XAG:
- return xag()
- if self is PayCurrencyEnum.SGD:
- return sgd()
- if self is PayCurrencyEnum.SKK:
- return skk()
- if self is PayCurrencyEnum.SIT:
- return sit()
- if self is PayCurrencyEnum.SBD:
- return sbd()
- if self is PayCurrencyEnum.SOS:
- return sos()
- if self is PayCurrencyEnum.ZAR:
- return zar()
- if self is PayCurrencyEnum.ZAL:
- return zal()
- if self is PayCurrencyEnum.KRH:
- return krh()
- if self is PayCurrencyEnum.KRW:
- return krw()
- if self is PayCurrencyEnum.KRO:
- return kro()
- if self is PayCurrencyEnum.SSP:
- return ssp()
- if self is PayCurrencyEnum.SUR:
- return sur()
- if self is PayCurrencyEnum.ESP:
- return esp()
- if self is PayCurrencyEnum.ESA:
- return esa()
- if self is PayCurrencyEnum.ESB:
- return esb()
- if self is PayCurrencyEnum.XDR:
- return xdr()
- if self is PayCurrencyEnum.LKR:
- return lkr()
- if self is PayCurrencyEnum.SHP:
- return shp()
- if self is PayCurrencyEnum.XSU:
- return xsu()
- if self is PayCurrencyEnum.SDD:
- return sdd()
- if self is PayCurrencyEnum.SDG:
- return sdg()
- if self is PayCurrencyEnum.SDP:
- return sdp()
- if self is PayCurrencyEnum.SRD:
- return srd()
- if self is PayCurrencyEnum.SRG:
- return srg()
- if self is PayCurrencyEnum.SZL:
- return szl()
- if self is PayCurrencyEnum.SEK:
- return sek()
- if self is PayCurrencyEnum.CHF:
- return chf()
- if self is PayCurrencyEnum.SYP:
- return syp()
- if self is PayCurrencyEnum.STN:
- return stn()
- if self is PayCurrencyEnum.STD:
- return std()
- if self is PayCurrencyEnum.TVD:
- return tvd()
- if self is PayCurrencyEnum.TJR:
- return tjr()
- if self is PayCurrencyEnum.TJS:
- return tjs()
- if self is PayCurrencyEnum.TZS:
- return tzs()
- if self is PayCurrencyEnum.XTS:
- return xts()
- if self is PayCurrencyEnum.THB:
- return thb()
- if self is PayCurrencyEnum.XXX:
- return xxx()
- if self is PayCurrencyEnum.TPE:
- return tpe()
- if self is PayCurrencyEnum.TOP:
- return top()
- if self is PayCurrencyEnum.TTD:
- return ttd()
- if self is PayCurrencyEnum.TND:
- return tnd()
- if self is PayCurrencyEnum.TRY:
- return try_()
- if self is PayCurrencyEnum.TRL:
- return trl()
- if self is PayCurrencyEnum.TMT:
- return tmt()
- if self is PayCurrencyEnum.TMM:
- return tmm()
- if self is PayCurrencyEnum.USD:
- return usd()
- if self is PayCurrencyEnum.USN:
- return usn()
- if self is PayCurrencyEnum.USS:
- return uss()
- if self is PayCurrencyEnum.UGX:
- return ugx()
- if self is PayCurrencyEnum.UGS:
- return ugs()
- if self is PayCurrencyEnum.UAH:
- return uah()
- if self is PayCurrencyEnum.UAK:
- return uak()
- if self is PayCurrencyEnum.AED:
- return aed()
- if self is PayCurrencyEnum.UYW:
- return uyw()
- if self is PayCurrencyEnum.UYU:
- return uyu()
- if self is PayCurrencyEnum.UYP:
- return uyp()
- if self is PayCurrencyEnum.UYI:
- return uyi()
- if self is PayCurrencyEnum.UZS:
- return uzs()
- if self is PayCurrencyEnum.VUV:
- return vuv()
- if self is PayCurrencyEnum.VES:
- return ves()
- if self is PayCurrencyEnum.VEB:
- return veb()
- if self is PayCurrencyEnum.VEF:
- return vef()
- if self is PayCurrencyEnum.VND:
- return vnd()
- if self is PayCurrencyEnum.VNN:
- return vnn()
- if self is PayCurrencyEnum.CHE:
- return che()
- if self is PayCurrencyEnum.CHW:
- return chw()
- if self is PayCurrencyEnum.XOF:
- return xof()
- if self is PayCurrencyEnum.YDD:
- return ydd()
- if self is PayCurrencyEnum.YER:
- return yer()
- if self is PayCurrencyEnum.YUN:
- return yun()
- if self is PayCurrencyEnum.YUD:
- return yud()
- if self is PayCurrencyEnum.YUM:
- return yum()
- if self is PayCurrencyEnum.YUR:
- return yur()
- if self is PayCurrencyEnum.ZWN:
- return zwn()
- if self is PayCurrencyEnum.ZRN:
- return zrn()
- if self is PayCurrencyEnum.ZRZ:
- return zrz()
- if self is PayCurrencyEnum.ZMW:
- return zmw()
- if self is PayCurrencyEnum.ZMK:
- return zmk()
- if self is PayCurrencyEnum.ZWD:
- return zwd()
- if self is PayCurrencyEnum.ZWR:
- return zwr()
- if self is PayCurrencyEnum.ZWL:
- return zwl()
+PayCurrencyEnum = typing.Union[
+ typing.Literal[
+ "XUA",
+ "AFN",
+ "AFA",
+ "ALL",
+ "ALK",
+ "DZD",
+ "ADP",
+ "AOA",
+ "AOK",
+ "AON",
+ "AOR",
+ "ARA",
+ "ARS",
+ "ARM",
+ "ARP",
+ "ARL",
+ "AMD",
+ "AWG",
+ "AUD",
+ "ATS",
+ "AZN",
+ "AZM",
+ "BSD",
+ "BHD",
+ "BDT",
+ "BBD",
+ "BYN",
+ "BYB",
+ "BYR",
+ "BEF",
+ "BEC",
+ "BEL",
+ "BZD",
+ "BMD",
+ "BTN",
+ "BOB",
+ "BOL",
+ "BOV",
+ "BOP",
+ "BAM",
+ "BAD",
+ "BAN",
+ "BWP",
+ "BRC",
+ "BRZ",
+ "BRE",
+ "BRR",
+ "BRN",
+ "BRB",
+ "BRL",
+ "GBP",
+ "BND",
+ "BGL",
+ "BGN",
+ "BGO",
+ "BGM",
+ "BUK",
+ "BIF",
+ "XPF",
+ "KHR",
+ "CAD",
+ "CVE",
+ "KYD",
+ "XAF",
+ "CLE",
+ "CLP",
+ "CLF",
+ "CNX",
+ "CNY",
+ "CNH",
+ "COP",
+ "COU",
+ "KMF",
+ "CDF",
+ "CRC",
+ "HRD",
+ "HRK",
+ "CUC",
+ "CUP",
+ "CYP",
+ "CZK",
+ "CSK",
+ "DKK",
+ "DJF",
+ "DOP",
+ "NLG",
+ "XCD",
+ "DDM",
+ "ECS",
+ "ECV",
+ "EGP",
+ "GQE",
+ "ERN",
+ "EEK",
+ "ETB",
+ "EUR",
+ "XBA",
+ "XEU",
+ "XBB",
+ "XBC",
+ "XBD",
+ "FKP",
+ "FJD",
+ "FIM",
+ "FRF",
+ "XFO",
+ "XFU",
+ "GMD",
+ "GEK",
+ "GEL",
+ "DEM",
+ "GHS",
+ "GHC",
+ "GIP",
+ "XAU",
+ "GRD",
+ "GTQ",
+ "GWP",
+ "GNF",
+ "GNS",
+ "GYD",
+ "HTG",
+ "HNL",
+ "HKD",
+ "HUF",
+ "IMP",
+ "ISK",
+ "ISJ",
+ "INR",
+ "IDR",
+ "IRR",
+ "IQD",
+ "IEP",
+ "ILS",
+ "ILP",
+ "ILR",
+ "ITL",
+ "JMD",
+ "JPY",
+ "JOD",
+ "KZT",
+ "KES",
+ "KWD",
+ "KGS",
+ "LAK",
+ "LVL",
+ "LVR",
+ "LBP",
+ "LSL",
+ "LRD",
+ "LYD",
+ "LTL",
+ "LTT",
+ "LUL",
+ "LUC",
+ "LUF",
+ "MOP",
+ "MKD",
+ "MKN",
+ "MGA",
+ "MGF",
+ "MWK",
+ "MYR",
+ "MVR",
+ "MVP",
+ "MLF",
+ "MTL",
+ "MTP",
+ "MRU",
+ "MRO",
+ "MUR",
+ "MXV",
+ "MXN",
+ "MXP",
+ "MDC",
+ "MDL",
+ "MCF",
+ "MNT",
+ "MAD",
+ "MAF",
+ "MZE",
+ "MZN",
+ "MZM",
+ "MMK",
+ "NAD",
+ "NPR",
+ "ANG",
+ "TWD",
+ "NZD",
+ "NIO",
+ "NIC",
+ "NGN",
+ "KPW",
+ "NOK",
+ "OMR",
+ "PKR",
+ "XPD",
+ "PAB",
+ "PGK",
+ "PYG",
+ "PEI",
+ "PEN",
+ "PES",
+ "PHP",
+ "XPT",
+ "PLN",
+ "PLZ",
+ "PTE",
+ "GWE",
+ "QAR",
+ "XRE",
+ "RHD",
+ "RON",
+ "ROL",
+ "RUB",
+ "RUR",
+ "RWF",
+ "SVC",
+ "WST",
+ "SAR",
+ "RSD",
+ "CSD",
+ "SCR",
+ "SLL",
+ "XAG",
+ "SGD",
+ "SKK",
+ "SIT",
+ "SBD",
+ "SOS",
+ "ZAR",
+ "ZAL",
+ "KRH",
+ "KRW",
+ "KRO",
+ "SSP",
+ "SUR",
+ "ESP",
+ "ESA",
+ "ESB",
+ "XDR",
+ "LKR",
+ "SHP",
+ "XSU",
+ "SDD",
+ "SDG",
+ "SDP",
+ "SRD",
+ "SRG",
+ "SZL",
+ "SEK",
+ "CHF",
+ "SYP",
+ "STN",
+ "STD",
+ "TVD",
+ "TJR",
+ "TJS",
+ "TZS",
+ "XTS",
+ "THB",
+ "XXX",
+ "TPE",
+ "TOP",
+ "TTD",
+ "TND",
+ "TRY",
+ "TRL",
+ "TMT",
+ "TMM",
+ "USD",
+ "USN",
+ "USS",
+ "UGX",
+ "UGS",
+ "UAH",
+ "UAK",
+ "AED",
+ "UYW",
+ "UYU",
+ "UYP",
+ "UYI",
+ "UZS",
+ "VUV",
+ "VES",
+ "VEB",
+ "VEF",
+ "VND",
+ "VNN",
+ "CHE",
+ "CHW",
+ "XOF",
+ "YDD",
+ "YER",
+ "YUN",
+ "YUD",
+ "YUM",
+ "YUR",
+ "ZWN",
+ "ZRN",
+ "ZRZ",
+ "ZMW",
+ "ZMK",
+ "ZWD",
+ "ZWR",
+ "ZWL",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/types/pay_frequency_enum.py b/src/merge/resources/hris/types/pay_frequency_enum.py
index f422fcc5..ec9390be 100644
--- a/src/merge/resources/hris/types/pay_frequency_enum.py
+++ b/src/merge/resources/hris/types/pay_frequency_enum.py
@@ -1,61 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PayFrequencyEnum(str, enum.Enum):
- """
- - `WEEKLY` - WEEKLY
- - `BIWEEKLY` - BIWEEKLY
- - `MONTHLY` - MONTHLY
- - `QUARTERLY` - QUARTERLY
- - `SEMIANNUALLY` - SEMIANNUALLY
- - `ANNUALLY` - ANNUALLY
- - `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY
- - `PRO_RATA` - PRO_RATA
- - `SEMIMONTHLY` - SEMIMONTHLY
- """
-
- WEEKLY = "WEEKLY"
- BIWEEKLY = "BIWEEKLY"
- MONTHLY = "MONTHLY"
- QUARTERLY = "QUARTERLY"
- SEMIANNUALLY = "SEMIANNUALLY"
- ANNUALLY = "ANNUALLY"
- THIRTEEN_MONTHLY = "THIRTEEN-MONTHLY"
- PRO_RATA = "PRO_RATA"
- SEMIMONTHLY = "SEMIMONTHLY"
-
- def visit(
- self,
- weekly: typing.Callable[[], T_Result],
- biweekly: typing.Callable[[], T_Result],
- monthly: typing.Callable[[], T_Result],
- quarterly: typing.Callable[[], T_Result],
- semiannually: typing.Callable[[], T_Result],
- annually: typing.Callable[[], T_Result],
- thirteen_monthly: typing.Callable[[], T_Result],
- pro_rata: typing.Callable[[], T_Result],
- semimonthly: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PayFrequencyEnum.WEEKLY:
- return weekly()
- if self is PayFrequencyEnum.BIWEEKLY:
- return biweekly()
- if self is PayFrequencyEnum.MONTHLY:
- return monthly()
- if self is PayFrequencyEnum.QUARTERLY:
- return quarterly()
- if self is PayFrequencyEnum.SEMIANNUALLY:
- return semiannually()
- if self is PayFrequencyEnum.ANNUALLY:
- return annually()
- if self is PayFrequencyEnum.THIRTEEN_MONTHLY:
- return thirteen_monthly()
- if self is PayFrequencyEnum.PRO_RATA:
- return pro_rata()
- if self is PayFrequencyEnum.SEMIMONTHLY:
- return semimonthly()
+PayFrequencyEnum = typing.Union[
+ typing.Literal[
+ "WEEKLY",
+ "BIWEEKLY",
+ "MONTHLY",
+ "QUARTERLY",
+ "SEMIANNUALLY",
+ "ANNUALLY",
+ "THIRTEEN-MONTHLY",
+ "PRO_RATA",
+ "SEMIMONTHLY",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/types/pay_group.py b/src/merge/resources/hris/types/pay_group.py
index 7bfd5af9..91b9ad2d 100644
--- a/src/merge/resources/hris/types/pay_group.py
+++ b/src/merge/resources/hris/types/pay_group.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PayGroup(pydantic_v1.BaseModel):
+class PayGroup(UniversalBaseModel):
"""
# The PayGroup Object
@@ -22,48 +22,39 @@ class PayGroup(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- pay_group_name: typing.Optional[str] = pydantic_v1.Field()
+ pay_group_name: typing.Optional[str] = pydantic.Field()
"""
The pay group name.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/pay_period_enum.py b/src/merge/resources/hris/types/pay_period_enum.py
index 92557a6c..87840ef0 100644
--- a/src/merge/resources/hris/types/pay_period_enum.py
+++ b/src/merge/resources/hris/types/pay_period_enum.py
@@ -1,61 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PayPeriodEnum(str, enum.Enum):
- """
- - `HOUR` - HOUR
- - `DAY` - DAY
- - `WEEK` - WEEK
- - `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS
- - `SEMIMONTHLY` - SEMIMONTHLY
- - `MONTH` - MONTH
- - `QUARTER` - QUARTER
- - `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS
- - `YEAR` - YEAR
- """
-
- HOUR = "HOUR"
- DAY = "DAY"
- WEEK = "WEEK"
- EVERY_TWO_WEEKS = "EVERY_TWO_WEEKS"
- SEMIMONTHLY = "SEMIMONTHLY"
- MONTH = "MONTH"
- QUARTER = "QUARTER"
- EVERY_SIX_MONTHS = "EVERY_SIX_MONTHS"
- YEAR = "YEAR"
-
- def visit(
- self,
- hour: typing.Callable[[], T_Result],
- day: typing.Callable[[], T_Result],
- week: typing.Callable[[], T_Result],
- every_two_weeks: typing.Callable[[], T_Result],
- semimonthly: typing.Callable[[], T_Result],
- month: typing.Callable[[], T_Result],
- quarter: typing.Callable[[], T_Result],
- every_six_months: typing.Callable[[], T_Result],
- year: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PayPeriodEnum.HOUR:
- return hour()
- if self is PayPeriodEnum.DAY:
- return day()
- if self is PayPeriodEnum.WEEK:
- return week()
- if self is PayPeriodEnum.EVERY_TWO_WEEKS:
- return every_two_weeks()
- if self is PayPeriodEnum.SEMIMONTHLY:
- return semimonthly()
- if self is PayPeriodEnum.MONTH:
- return month()
- if self is PayPeriodEnum.QUARTER:
- return quarter()
- if self is PayPeriodEnum.EVERY_SIX_MONTHS:
- return every_six_months()
- if self is PayPeriodEnum.YEAR:
- return year()
+PayPeriodEnum = typing.Union[
+ typing.Literal[
+ "HOUR", "DAY", "WEEK", "EVERY_TWO_WEEKS", "SEMIMONTHLY", "MONTH", "QUARTER", "EVERY_SIX_MONTHS", "YEAR"
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/hris/types/payroll_run.py b/src/merge/resources/hris/types/payroll_run.py
index b33772e5..162f9954 100644
--- a/src/merge/resources/hris/types/payroll_run.py
+++ b/src/merge/resources/hris/types/payroll_run.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .payroll_run_run_state import PayrollRunRunState
from .payroll_run_run_type import PayrollRunRunType
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PayrollRun(pydantic_v1.BaseModel):
+class PayrollRun(UniversalBaseModel):
"""
# The PayrollRun Object
@@ -24,22 +24,22 @@ class PayrollRun(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- run_state: typing.Optional[PayrollRunRunState] = pydantic_v1.Field()
+ run_state: typing.Optional[PayrollRunRunState] = pydantic.Field()
"""
The state of the payroll run
@@ -50,7 +50,7 @@ class PayrollRun(pydantic_v1.BaseModel):
- `CLOSED` - CLOSED
"""
- run_type: typing.Optional[PayrollRunRunType] = pydantic_v1.Field()
+ run_type: typing.Optional[PayrollRunRunType] = pydantic.Field()
"""
The type of the payroll run
@@ -61,43 +61,34 @@ class PayrollRun(pydantic_v1.BaseModel):
- `SIGN_ON_BONUS` - SIGN_ON_BONUS
"""
- start_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time the payroll run started.
"""
- end_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time the payroll run ended.
"""
- check_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ check_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time the payroll run was checked.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/payroll_run_run_state.py b/src/merge/resources/hris/types/payroll_run_run_state.py
index a58c8f04..f614aa26 100644
--- a/src/merge/resources/hris/types/payroll_run_run_state.py
+++ b/src/merge/resources/hris/types/payroll_run_run_state.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .run_state_enum import RunStateEnum
PayrollRunRunState = typing.Union[RunStateEnum, str]
diff --git a/src/merge/resources/hris/types/payroll_run_run_type.py b/src/merge/resources/hris/types/payroll_run_run_type.py
index ca957e8e..af5994d4 100644
--- a/src/merge/resources/hris/types/payroll_run_run_type.py
+++ b/src/merge/resources/hris/types/payroll_run_run_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .run_type_enum import RunTypeEnum
PayrollRunRunType = typing.Union[RunTypeEnum, str]
diff --git a/src/merge/resources/hris/types/policy_type_enum.py b/src/merge/resources/hris/types/policy_type_enum.py
index 87cd51f5..5ddb78cd 100644
--- a/src/merge/resources/hris/types/policy_type_enum.py
+++ b/src/merge/resources/hris/types/policy_type_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PolicyTypeEnum(str, enum.Enum):
- """
- - `VACATION` - VACATION
- - `SICK` - SICK
- - `PERSONAL` - PERSONAL
- - `JURY_DUTY` - JURY_DUTY
- - `VOLUNTEER` - VOLUNTEER
- - `BEREAVEMENT` - BEREAVEMENT
- """
-
- VACATION = "VACATION"
- SICK = "SICK"
- PERSONAL = "PERSONAL"
- JURY_DUTY = "JURY_DUTY"
- VOLUNTEER = "VOLUNTEER"
- BEREAVEMENT = "BEREAVEMENT"
-
- def visit(
- self,
- vacation: typing.Callable[[], T_Result],
- sick: typing.Callable[[], T_Result],
- personal: typing.Callable[[], T_Result],
- jury_duty: typing.Callable[[], T_Result],
- volunteer: typing.Callable[[], T_Result],
- bereavement: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PolicyTypeEnum.VACATION:
- return vacation()
- if self is PolicyTypeEnum.SICK:
- return sick()
- if self is PolicyTypeEnum.PERSONAL:
- return personal()
- if self is PolicyTypeEnum.JURY_DUTY:
- return jury_duty()
- if self is PolicyTypeEnum.VOLUNTEER:
- return volunteer()
- if self is PolicyTypeEnum.BEREAVEMENT:
- return bereavement()
+PolicyTypeEnum = typing.Union[
+ typing.Literal["VACATION", "SICK", "PERSONAL", "JURY_DUTY", "VOLUNTEER", "BEREAVEMENT"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/reason_enum.py b/src/merge/resources/hris/types/reason_enum.py
index d14efa20..3e4661d2 100644
--- a/src/merge/resources/hris/types/reason_enum.py
+++ b/src/merge/resources/hris/types/reason_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ReasonEnum(str, enum.Enum):
- """
- - `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST
- - `GDPR` - GDPR
- - `OTHER` - OTHER
- """
-
- GENERAL_CUSTOMER_REQUEST = "GENERAL_CUSTOMER_REQUEST"
- GDPR = "GDPR"
- OTHER = "OTHER"
-
- def visit(
- self,
- general_customer_request: typing.Callable[[], T_Result],
- gdpr: typing.Callable[[], T_Result],
- other: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ReasonEnum.GENERAL_CUSTOMER_REQUEST:
- return general_customer_request()
- if self is ReasonEnum.GDPR:
- return gdpr()
- if self is ReasonEnum.OTHER:
- return other()
+ReasonEnum = typing.Union[typing.Literal["GENERAL_CUSTOMER_REQUEST", "GDPR", "OTHER"], typing.Any]
diff --git a/src/merge/resources/hris/types/relationship_enum.py b/src/merge/resources/hris/types/relationship_enum.py
index 9d7774f7..a1fc982b 100644
--- a/src/merge/resources/hris/types/relationship_enum.py
+++ b/src/merge/resources/hris/types/relationship_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RelationshipEnum(str, enum.Enum):
- """
- - `CHILD` - CHILD
- - `SPOUSE` - SPOUSE
- - `DOMESTIC_PARTNER` - DOMESTIC_PARTNER
- """
-
- CHILD = "CHILD"
- SPOUSE = "SPOUSE"
- DOMESTIC_PARTNER = "DOMESTIC_PARTNER"
-
- def visit(
- self,
- child: typing.Callable[[], T_Result],
- spouse: typing.Callable[[], T_Result],
- domestic_partner: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RelationshipEnum.CHILD:
- return child()
- if self is RelationshipEnum.SPOUSE:
- return spouse()
- if self is RelationshipEnum.DOMESTIC_PARTNER:
- return domestic_partner()
+RelationshipEnum = typing.Union[typing.Literal["CHILD", "SPOUSE", "DOMESTIC_PARTNER"], typing.Any]
diff --git a/src/merge/resources/hris/types/remote_data.py b/src/merge/resources/hris/types/remote_data.py
index 098f551b..27c2a5f2 100644
--- a/src/merge/resources/hris/types/remote_data.py
+++ b/src/merge/resources/hris/types/remote_data.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteData(pydantic_v1.BaseModel):
+class RemoteData(UniversalBaseModel):
path: str
- data: typing.Optional[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ data: typing.Optional[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/remote_endpoint_info.py b/src/merge/resources/hris/types/remote_endpoint_info.py
index da6037bc..454688d0 100644
--- a/src/merge/resources/hris/types/remote_endpoint_info.py
+++ b/src/merge/resources/hris/types/remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteEndpointInfo(pydantic_v1.BaseModel):
+class RemoteEndpointInfo(UniversalBaseModel):
method: str
url_path: str
- field_traversal_path: typing.List[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_traversal_path: typing.List[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/remote_field_api.py b/src/merge/resources/hris/types/remote_field_api.py
index ffa9299c..18f2421d 100644
--- a/src/merge/resources/hris/types/remote_field_api.py
+++ b/src/merge/resources/hris/types/remote_field_api.py
@@ -1,39 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .advanced_metadata import AdvancedMetadata
+import pydantic
from .remote_endpoint_info import RemoteEndpointInfo
+from .advanced_metadata import AdvancedMetadata
from .remote_field_api_coverage import RemoteFieldApiCoverage
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteFieldApi(pydantic_v1.BaseModel):
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+class RemoteFieldApi(UniversalBaseModel):
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_key_name: str
remote_endpoint_info: RemoteEndpointInfo
- example_values: typing.Optional[typing.List[typing.Any]]
+ example_values: typing.Optional[typing.List[typing.Optional[typing.Any]]]
advanced_metadata: typing.Optional[AdvancedMetadata]
coverage: typing.Optional[RemoteFieldApiCoverage]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/remote_field_api_response.py b/src/merge/resources/hris/types/remote_field_api_response.py
index 6c3fc84f..5ecb4ff5 100644
--- a/src/merge/resources/hris/types/remote_field_api_response.py
+++ b/src/merge/resources/hris/types/remote_field_api_response.py
@@ -1,47 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_field_api import RemoteFieldApi
-
-
-class RemoteFieldApiResponse(pydantic_v1.BaseModel):
- benefit: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Benefit")
- employer_benefit: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="EmployerBenefit")
- company: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Company")
- employee_payroll_run: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="EmployeePayrollRun")
- employee: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Employee")
- employment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Employment")
- location: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Location")
- payroll_run: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="PayrollRun")
- team: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Team")
- time_off: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="TimeOff")
- time_off_balance: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="TimeOffBalance")
- bank_info: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="BankInfo")
- pay_group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="PayGroup")
- group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Group")
- dependent: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Dependent")
- timesheet_entry: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="TimesheetEntry")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class RemoteFieldApiResponse(UniversalBaseModel):
+ benefit: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Benefit")
+ employer_benefit: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="EmployerBenefit")
+ company: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Company")
+ employee_payroll_run: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="EmployeePayrollRun")
+ employee: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Employee")
+ employment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Employment")
+ location: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Location")
+ payroll_run: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="PayrollRun")
+ team: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Team")
+ time_off: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="TimeOff")
+ time_off_balance: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="TimeOffBalance")
+ bank_info: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="BankInfo")
+ pay_group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="PayGroup")
+ group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Group")
+ dependent: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Dependent")
+ timesheet_entry: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="TimesheetEntry")
+
+ 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/merge/resources/hris/types/remote_key.py b/src/merge/resources/hris/types/remote_key.py
index e0bec368..7a61c212 100644
--- a/src/merge/resources/hris/types/remote_key.py
+++ b/src/merge/resources/hris/types/remote_key.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteKey(pydantic_v1.BaseModel):
+class RemoteKey(UniversalBaseModel):
"""
# The RemoteKey Object
@@ -23,20 +22,11 @@ class RemoteKey(pydantic_v1.BaseModel):
name: str
key: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/remote_response.py b/src/merge/resources/hris/types/remote_response.py
index e7c13c23..4c9da086 100644
--- a/src/merge/resources/hris/types/remote_response.py
+++ b/src/merge/resources/hris/types/remote_response.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_response_response_type import RemoteResponseResponseType
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteResponse(pydantic_v1.BaseModel):
+class RemoteResponse(UniversalBaseModel):
"""
# The RemoteResponse Object
@@ -24,25 +23,16 @@ class RemoteResponse(pydantic_v1.BaseModel):
method: str
path: str
status: int
- response: typing.Any
- response_headers: typing.Optional[typing.Dict[str, typing.Any]]
+ response: typing.Optional[typing.Any]
+ response_headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
response_type: typing.Optional[RemoteResponseResponseType]
- headers: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/remote_response_response_type.py b/src/merge/resources/hris/types/remote_response_response_type.py
index 2556417a..02c2e69b 100644
--- a/src/merge/resources/hris/types/remote_response_response_type.py
+++ b/src/merge/resources/hris/types/remote_response_response_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .response_type_enum import ResponseTypeEnum
RemoteResponseResponseType = typing.Union[ResponseTypeEnum, str]
diff --git a/src/merge/resources/hris/types/request_format_enum.py b/src/merge/resources/hris/types/request_format_enum.py
index bf445b71..dc284f25 100644
--- a/src/merge/resources/hris/types/request_format_enum.py
+++ b/src/merge/resources/hris/types/request_format_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RequestFormatEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `XML` - XML
- - `MULTIPART` - MULTIPART
- """
-
- JSON = "JSON"
- XML = "XML"
- MULTIPART = "MULTIPART"
-
- def visit(
- self,
- json: typing.Callable[[], T_Result],
- xml: typing.Callable[[], T_Result],
- multipart: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RequestFormatEnum.JSON:
- return json()
- if self is RequestFormatEnum.XML:
- return xml()
- if self is RequestFormatEnum.MULTIPART:
- return multipart()
+RequestFormatEnum = typing.Union[typing.Literal["JSON", "XML", "MULTIPART"], typing.Any]
diff --git a/src/merge/resources/hris/types/request_type_enum.py b/src/merge/resources/hris/types/request_type_enum.py
index a93721b1..a045ff16 100644
--- a/src/merge/resources/hris/types/request_type_enum.py
+++ b/src/merge/resources/hris/types/request_type_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RequestTypeEnum(str, enum.Enum):
- """
- - `VACATION` - VACATION
- - `SICK` - SICK
- - `PERSONAL` - PERSONAL
- - `JURY_DUTY` - JURY_DUTY
- - `VOLUNTEER` - VOLUNTEER
- - `BEREAVEMENT` - BEREAVEMENT
- """
-
- VACATION = "VACATION"
- SICK = "SICK"
- PERSONAL = "PERSONAL"
- JURY_DUTY = "JURY_DUTY"
- VOLUNTEER = "VOLUNTEER"
- BEREAVEMENT = "BEREAVEMENT"
-
- def visit(
- self,
- vacation: typing.Callable[[], T_Result],
- sick: typing.Callable[[], T_Result],
- personal: typing.Callable[[], T_Result],
- jury_duty: typing.Callable[[], T_Result],
- volunteer: typing.Callable[[], T_Result],
- bereavement: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RequestTypeEnum.VACATION:
- return vacation()
- if self is RequestTypeEnum.SICK:
- return sick()
- if self is RequestTypeEnum.PERSONAL:
- return personal()
- if self is RequestTypeEnum.JURY_DUTY:
- return jury_duty()
- if self is RequestTypeEnum.VOLUNTEER:
- return volunteer()
- if self is RequestTypeEnum.BEREAVEMENT:
- return bereavement()
+RequestTypeEnum = typing.Union[
+ typing.Literal["VACATION", "SICK", "PERSONAL", "JURY_DUTY", "VOLUNTEER", "BEREAVEMENT"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/response_type_enum.py b/src/merge/resources/hris/types/response_type_enum.py
index 4b44d47d..7e4d5d30 100644
--- a/src/merge/resources/hris/types/response_type_enum.py
+++ b/src/merge/resources/hris/types/response_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ResponseTypeEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `BASE64_GZIP` - BASE64_GZIP
- """
-
- JSON = "JSON"
- BASE_64_GZIP = "BASE64_GZIP"
-
- def visit(self, json: typing.Callable[[], T_Result], base_64_gzip: typing.Callable[[], T_Result]) -> T_Result:
- if self is ResponseTypeEnum.JSON:
- return json()
- if self is ResponseTypeEnum.BASE_64_GZIP:
- return base_64_gzip()
+ResponseTypeEnum = typing.Union[typing.Literal["JSON", "BASE64_GZIP"], typing.Any]
diff --git a/src/merge/resources/hris/types/role_enum.py b/src/merge/resources/hris/types/role_enum.py
index 05e09112..65066251 100644
--- a/src/merge/resources/hris/types/role_enum.py
+++ b/src/merge/resources/hris/types/role_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RoleEnum(str, enum.Enum):
- """
- - `ADMIN` - ADMIN
- - `DEVELOPER` - DEVELOPER
- - `MEMBER` - MEMBER
- - `API` - API
- - `SYSTEM` - SYSTEM
- - `MERGE_TEAM` - MERGE_TEAM
- """
-
- ADMIN = "ADMIN"
- DEVELOPER = "DEVELOPER"
- MEMBER = "MEMBER"
- API = "API"
- SYSTEM = "SYSTEM"
- MERGE_TEAM = "MERGE_TEAM"
-
- def visit(
- self,
- admin: typing.Callable[[], T_Result],
- developer: typing.Callable[[], T_Result],
- member: typing.Callable[[], T_Result],
- api: typing.Callable[[], T_Result],
- system: typing.Callable[[], T_Result],
- merge_team: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RoleEnum.ADMIN:
- return admin()
- if self is RoleEnum.DEVELOPER:
- return developer()
- if self is RoleEnum.MEMBER:
- return member()
- if self is RoleEnum.API:
- return api()
- if self is RoleEnum.SYSTEM:
- return system()
- if self is RoleEnum.MERGE_TEAM:
- return merge_team()
+RoleEnum = typing.Union[typing.Literal["ADMIN", "DEVELOPER", "MEMBER", "API", "SYSTEM", "MERGE_TEAM"], typing.Any]
diff --git a/src/merge/resources/hris/types/run_state_enum.py b/src/merge/resources/hris/types/run_state_enum.py
index 329321ee..14ba65c0 100644
--- a/src/merge/resources/hris/types/run_state_enum.py
+++ b/src/merge/resources/hris/types/run_state_enum.py
@@ -1,41 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RunStateEnum(str, enum.Enum):
- """
- - `PAID` - PAID
- - `DRAFT` - DRAFT
- - `APPROVED` - APPROVED
- - `FAILED` - FAILED
- - `CLOSED` - CLOSED
- """
-
- PAID = "PAID"
- DRAFT = "DRAFT"
- APPROVED = "APPROVED"
- FAILED = "FAILED"
- CLOSED = "CLOSED"
-
- def visit(
- self,
- paid: typing.Callable[[], T_Result],
- draft: typing.Callable[[], T_Result],
- approved: typing.Callable[[], T_Result],
- failed: typing.Callable[[], T_Result],
- closed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RunStateEnum.PAID:
- return paid()
- if self is RunStateEnum.DRAFT:
- return draft()
- if self is RunStateEnum.APPROVED:
- return approved()
- if self is RunStateEnum.FAILED:
- return failed()
- if self is RunStateEnum.CLOSED:
- return closed()
+RunStateEnum = typing.Union[typing.Literal["PAID", "DRAFT", "APPROVED", "FAILED", "CLOSED"], typing.Any]
diff --git a/src/merge/resources/hris/types/run_type_enum.py b/src/merge/resources/hris/types/run_type_enum.py
index 94b224c5..c8c09203 100644
--- a/src/merge/resources/hris/types/run_type_enum.py
+++ b/src/merge/resources/hris/types/run_type_enum.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RunTypeEnum(str, enum.Enum):
- """
- - `REGULAR` - REGULAR
- - `OFF_CYCLE` - OFF_CYCLE
- - `CORRECTION` - CORRECTION
- - `TERMINATION` - TERMINATION
- - `SIGN_ON_BONUS` - SIGN_ON_BONUS
- """
-
- REGULAR = "REGULAR"
- OFF_CYCLE = "OFF_CYCLE"
- CORRECTION = "CORRECTION"
- TERMINATION = "TERMINATION"
- SIGN_ON_BONUS = "SIGN_ON_BONUS"
-
- def visit(
- self,
- regular: typing.Callable[[], T_Result],
- off_cycle: typing.Callable[[], T_Result],
- correction: typing.Callable[[], T_Result],
- termination: typing.Callable[[], T_Result],
- sign_on_bonus: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RunTypeEnum.REGULAR:
- return regular()
- if self is RunTypeEnum.OFF_CYCLE:
- return off_cycle()
- if self is RunTypeEnum.CORRECTION:
- return correction()
- if self is RunTypeEnum.TERMINATION:
- return termination()
- if self is RunTypeEnum.SIGN_ON_BONUS:
- return sign_on_bonus()
+RunTypeEnum = typing.Union[
+ typing.Literal["REGULAR", "OFF_CYCLE", "CORRECTION", "TERMINATION", "SIGN_ON_BONUS"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/selective_sync_configurations_usage_enum.py b/src/merge/resources/hris/types/selective_sync_configurations_usage_enum.py
index 4de6df94..baa6f2bd 100644
--- a/src/merge/resources/hris/types/selective_sync_configurations_usage_enum.py
+++ b/src/merge/resources/hris/types/selective_sync_configurations_usage_enum.py
@@ -1,24 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SelectiveSyncConfigurationsUsageEnum(str, enum.Enum):
- """
- - `IN_NEXT_SYNC` - IN_NEXT_SYNC
- - `IN_LAST_SYNC` - IN_LAST_SYNC
- """
-
- IN_NEXT_SYNC = "IN_NEXT_SYNC"
- IN_LAST_SYNC = "IN_LAST_SYNC"
-
- def visit(
- self, in_next_sync: typing.Callable[[], T_Result], in_last_sync: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is SelectiveSyncConfigurationsUsageEnum.IN_NEXT_SYNC:
- return in_next_sync()
- if self is SelectiveSyncConfigurationsUsageEnum.IN_LAST_SYNC:
- return in_last_sync()
+SelectiveSyncConfigurationsUsageEnum = typing.Union[typing.Literal["IN_NEXT_SYNC", "IN_LAST_SYNC"], typing.Any]
diff --git a/src/merge/resources/hris/types/sync_status.py b/src/merge/resources/hris/types/sync_status.py
index c6b7cbc4..f9a62229 100644
--- a/src/merge/resources/hris/types/sync_status.py
+++ b/src/merge/resources/hris/types/sync_status.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+import datetime as dt
from .sync_status_status_enum import SyncStatusStatusEnum
+from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class SyncStatus(pydantic_v1.BaseModel):
+class SyncStatus(UniversalBaseModel):
"""
# The SyncStatus Object
@@ -30,20 +30,11 @@ class SyncStatus(pydantic_v1.BaseModel):
is_initial_sync: bool
selective_sync_configurations_usage: typing.Optional[SelectiveSyncConfigurationsUsageEnum]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/sync_status_status_enum.py b/src/merge/resources/hris/types/sync_status_status_enum.py
index e21e3285..92814990 100644
--- a/src/merge/resources/hris/types/sync_status_status_enum.py
+++ b/src/merge/resources/hris/types/sync_status_status_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SyncStatusStatusEnum(str, enum.Enum):
- """
- - `SYNCING` - SYNCING
- - `DONE` - DONE
- - `FAILED` - FAILED
- - `DISABLED` - DISABLED
- - `PAUSED` - PAUSED
- - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED
- """
-
- SYNCING = "SYNCING"
- DONE = "DONE"
- FAILED = "FAILED"
- DISABLED = "DISABLED"
- PAUSED = "PAUSED"
- PARTIALLY_SYNCED = "PARTIALLY_SYNCED"
-
- def visit(
- self,
- syncing: typing.Callable[[], T_Result],
- done: typing.Callable[[], T_Result],
- failed: typing.Callable[[], T_Result],
- disabled: typing.Callable[[], T_Result],
- paused: typing.Callable[[], T_Result],
- partially_synced: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SyncStatusStatusEnum.SYNCING:
- return syncing()
- if self is SyncStatusStatusEnum.DONE:
- return done()
- if self is SyncStatusStatusEnum.FAILED:
- return failed()
- if self is SyncStatusStatusEnum.DISABLED:
- return disabled()
- if self is SyncStatusStatusEnum.PAUSED:
- return paused()
- if self is SyncStatusStatusEnum.PARTIALLY_SYNCED:
- return partially_synced()
+SyncStatusStatusEnum = typing.Union[
+ typing.Literal["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/tax.py b/src/merge/resources/hris/types/tax.py
index cb8946b0..92e2f9dd 100644
--- a/src/merge/resources/hris/types/tax.py
+++ b/src/merge/resources/hris/types/tax.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Tax(pydantic_v1.BaseModel):
+class Tax(UniversalBaseModel):
"""
# The Tax Object
@@ -22,59 +22,50 @@ class Tax(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
employee_payroll_run: typing.Optional[str]
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The tax's name.
"""
- amount: typing.Optional[float] = pydantic_v1.Field()
+ amount: typing.Optional[float] = pydantic.Field()
"""
The tax amount.
"""
- employer_tax: typing.Optional[bool] = pydantic_v1.Field()
+ employer_tax: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the employer is responsible for paying the tax.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/team.py b/src/merge/resources/hris/types/team.py
index 6b41cf48..420fff8c 100644
--- a/src/merge/resources/hris/types/team.py
+++ b/src/merge/resources/hris/types/team.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Team(pydantic_v1.BaseModel):
+class Team(UniversalBaseModel):
"""
# The Team Object
@@ -24,58 +24,49 @@ class Team(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The team's name.
"""
- parent_team: typing.Optional[TeamParentTeam] = pydantic_v1.Field()
+ parent_team: typing.Optional["TeamParentTeam"] = pydantic.Field()
"""
The team's parent team.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
from .team_parent_team import TeamParentTeam # noqa: E402
-Team.update_forward_refs()
+update_forward_refs(Team)
diff --git a/src/merge/resources/hris/types/team_parent_team.py b/src/merge/resources/hris/types/team_parent_team.py
index 53cc5b6b..5dac01de 100644
--- a/src/merge/resources/hris/types/team_parent_team.py
+++ b/src/merge/resources/hris/types/team_parent_team.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .team import Team
-
-TeamParentTeam = typing.Union[str, Team]
+if typing.TYPE_CHECKING:
+ from .team import Team
+TeamParentTeam = typing.Union[str, "Team"]
diff --git a/src/merge/resources/hris/types/time_off.py b/src/merge/resources/hris/types/time_off.py
index 53dc58c7..4f614c17 100644
--- a/src/merge/resources/hris/types/time_off.py
+++ b/src/merge/resources/hris/types/time_off.py
@@ -1,19 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
-from .time_off_approver import TimeOffApprover
+import pydantic
+import datetime as dt
from .time_off_employee import TimeOffEmployee
-from .time_off_request_type import TimeOffRequestType
+from .time_off_approver import TimeOffApprover
from .time_off_status import TimeOffStatus
from .time_off_units import TimeOffUnits
+from .time_off_request_type import TimeOffRequestType
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class TimeOff(pydantic_v1.BaseModel):
+class TimeOff(UniversalBaseModel):
"""
# The TimeOff Object
@@ -27,32 +32,32 @@ class TimeOff(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- employee: typing.Optional[TimeOffEmployee] = pydantic_v1.Field()
+ employee: typing.Optional[TimeOffEmployee] = pydantic.Field()
"""
The employee requesting time off.
"""
- approver: typing.Optional[TimeOffApprover] = pydantic_v1.Field()
+ approver: typing.Optional[TimeOffApprover] = pydantic.Field()
"""
The Merge ID of the employee with the ability to approve the time off request.
"""
- status: typing.Optional[TimeOffStatus] = pydantic_v1.Field()
+ status: typing.Optional[TimeOffStatus] = pydantic.Field()
"""
The status of this time off request.
@@ -63,12 +68,12 @@ class TimeOff(pydantic_v1.BaseModel):
- `DELETED` - DELETED
"""
- employee_note: typing.Optional[str] = pydantic_v1.Field()
+ employee_note: typing.Optional[str] = pydantic.Field()
"""
The employee note for this time off request.
"""
- units: typing.Optional[TimeOffUnits] = pydantic_v1.Field()
+ units: typing.Optional[TimeOffUnits] = pydantic.Field()
"""
The measurement that the third-party integration uses to count time requested.
@@ -76,12 +81,12 @@ class TimeOff(pydantic_v1.BaseModel):
- `DAYS` - DAYS
"""
- amount: typing.Optional[float] = pydantic_v1.Field()
+ amount: typing.Optional[float] = pydantic.Field()
"""
The time off quantity measured by the prescribed βunitsβ.
"""
- request_type: typing.Optional[TimeOffRequestType] = pydantic_v1.Field()
+ request_type: typing.Optional[TimeOffRequestType] = pydantic.Field()
"""
The type of time off request.
@@ -93,34 +98,30 @@ class TimeOff(pydantic_v1.BaseModel):
- `BEREAVEMENT` - BEREAVEMENT
"""
- start_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time of the start of the time requested off.
"""
- end_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time of the end of the time requested off.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, TimeOff=TimeOff)
+update_forward_refs(Employment, TimeOff=TimeOff)
+update_forward_refs(Team, TimeOff=TimeOff)
diff --git a/src/merge/resources/hris/types/time_off_approver.py b/src/merge/resources/hris/types/time_off_approver.py
index 93a01925..9bc84291 100644
--- a/src/merge/resources/hris/types/time_off_approver.py
+++ b/src/merge/resources/hris/types/time_off_approver.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
TimeOffApprover = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/time_off_balance.py b/src/merge/resources/hris/types/time_off_balance.py
index 2b5bf7e9..0a4f0f33 100644
--- a/src/merge/resources/hris/types/time_off_balance.py
+++ b/src/merge/resources/hris/types/time_off_balance.py
@@ -1,16 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
+import pydantic
+import datetime as dt
from .time_off_balance_employee import TimeOffBalanceEmployee
from .time_off_balance_policy_type import TimeOffBalancePolicyType
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class TimeOffBalance(pydantic_v1.BaseModel):
+class TimeOffBalance(UniversalBaseModel):
"""
# The TimeOffBalance Object
@@ -24,37 +29,37 @@ class TimeOffBalance(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- employee: typing.Optional[TimeOffBalanceEmployee] = pydantic_v1.Field()
+ employee: typing.Optional[TimeOffBalanceEmployee] = pydantic.Field()
"""
The employee the balance belongs to.
"""
- balance: typing.Optional[float] = pydantic_v1.Field()
+ balance: typing.Optional[float] = pydantic.Field()
"""
The current remaining PTO balance, always measured in terms of hours.
"""
- used: typing.Optional[float] = pydantic_v1.Field()
+ used: typing.Optional[float] = pydantic.Field()
"""
The amount of PTO used in terms of hours.
"""
- policy_type: typing.Optional[TimeOffBalancePolicyType] = pydantic_v1.Field()
+ policy_type: typing.Optional[TimeOffBalancePolicyType] = pydantic.Field()
"""
The policy type of this time off balance.
@@ -66,28 +71,24 @@ class TimeOffBalance(pydantic_v1.BaseModel):
- `BEREAVEMENT` - BEREAVEMENT
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, TimeOffBalance=TimeOffBalance)
+update_forward_refs(Employment, TimeOffBalance=TimeOffBalance)
+update_forward_refs(Team, TimeOffBalance=TimeOffBalance)
diff --git a/src/merge/resources/hris/types/time_off_balance_employee.py b/src/merge/resources/hris/types/time_off_balance_employee.py
index b13c18f9..e09472b8 100644
--- a/src/merge/resources/hris/types/time_off_balance_employee.py
+++ b/src/merge/resources/hris/types/time_off_balance_employee.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
TimeOffBalanceEmployee = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/time_off_balance_policy_type.py b/src/merge/resources/hris/types/time_off_balance_policy_type.py
index cd18ebf0..1ed2ac33 100644
--- a/src/merge/resources/hris/types/time_off_balance_policy_type.py
+++ b/src/merge/resources/hris/types/time_off_balance_policy_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .policy_type_enum import PolicyTypeEnum
TimeOffBalancePolicyType = typing.Union[PolicyTypeEnum, str]
diff --git a/src/merge/resources/hris/types/time_off_employee.py b/src/merge/resources/hris/types/time_off_employee.py
index 4ca2205f..3988efec 100644
--- a/src/merge/resources/hris/types/time_off_employee.py
+++ b/src/merge/resources/hris/types/time_off_employee.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
TimeOffEmployee = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/time_off_request.py b/src/merge/resources/hris/types/time_off_request.py
index 983cc04a..ef6380cc 100644
--- a/src/merge/resources/hris/types/time_off_request.py
+++ b/src/merge/resources/hris/types/time_off_request.py
@@ -1,18 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .time_off_request_approver import TimeOffRequestApprover
from .time_off_request_employee import TimeOffRequestEmployee
-from .time_off_request_request_type import TimeOffRequestRequestType
+import pydantic
+from .time_off_request_approver import TimeOffRequestApprover
from .time_off_request_status import TimeOffRequestStatus
from .time_off_request_units import TimeOffRequestUnits
+from .time_off_request_request_type import TimeOffRequestRequestType
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class TimeOffRequest(pydantic_v1.BaseModel):
+class TimeOffRequest(UniversalBaseModel):
"""
# The TimeOff Object
@@ -25,17 +30,17 @@ class TimeOffRequest(pydantic_v1.BaseModel):
Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests.
"""
- employee: typing.Optional[TimeOffRequestEmployee] = pydantic_v1.Field()
+ employee: typing.Optional[TimeOffRequestEmployee] = pydantic.Field()
"""
The employee requesting time off.
"""
- approver: typing.Optional[TimeOffRequestApprover] = pydantic_v1.Field()
+ approver: typing.Optional[TimeOffRequestApprover] = pydantic.Field()
"""
The Merge ID of the employee with the ability to approve the time off request.
"""
- status: typing.Optional[TimeOffRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[TimeOffRequestStatus] = pydantic.Field()
"""
The status of this time off request.
@@ -46,12 +51,12 @@ class TimeOffRequest(pydantic_v1.BaseModel):
- `DELETED` - DELETED
"""
- employee_note: typing.Optional[str] = pydantic_v1.Field()
+ employee_note: typing.Optional[str] = pydantic.Field()
"""
The employee note for this time off request.
"""
- units: typing.Optional[TimeOffRequestUnits] = pydantic_v1.Field()
+ units: typing.Optional[TimeOffRequestUnits] = pydantic.Field()
"""
The measurement that the third-party integration uses to count time requested.
@@ -59,12 +64,12 @@ class TimeOffRequest(pydantic_v1.BaseModel):
- `DAYS` - DAYS
"""
- amount: typing.Optional[float] = pydantic_v1.Field()
+ amount: typing.Optional[float] = pydantic.Field()
"""
The time off quantity measured by the prescribed βunitsβ.
"""
- request_type: typing.Optional[TimeOffRequestRequestType] = pydantic_v1.Field()
+ request_type: typing.Optional[TimeOffRequestRequestType] = pydantic.Field()
"""
The type of time off request.
@@ -76,33 +81,29 @@ class TimeOffRequest(pydantic_v1.BaseModel):
- `BEREAVEMENT` - BEREAVEMENT
"""
- start_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time of the start of the time requested off.
"""
- end_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The day and time of the end of the time requested off.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, TimeOffRequest=TimeOffRequest)
+update_forward_refs(Employment, TimeOffRequest=TimeOffRequest)
+update_forward_refs(Team, TimeOffRequest=TimeOffRequest)
diff --git a/src/merge/resources/hris/types/time_off_request_approver.py b/src/merge/resources/hris/types/time_off_request_approver.py
index 726968a9..c679338b 100644
--- a/src/merge/resources/hris/types/time_off_request_approver.py
+++ b/src/merge/resources/hris/types/time_off_request_approver.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
TimeOffRequestApprover = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/time_off_request_employee.py b/src/merge/resources/hris/types/time_off_request_employee.py
index 5f74d51e..68c15e9f 100644
--- a/src/merge/resources/hris/types/time_off_request_employee.py
+++ b/src/merge/resources/hris/types/time_off_request_employee.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .employee import Employee
TimeOffRequestEmployee = typing.Union[str, Employee]
diff --git a/src/merge/resources/hris/types/time_off_request_request_type.py b/src/merge/resources/hris/types/time_off_request_request_type.py
index bc81a1fe..ec50bc36 100644
--- a/src/merge/resources/hris/types/time_off_request_request_type.py
+++ b/src/merge/resources/hris/types/time_off_request_request_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .request_type_enum import RequestTypeEnum
TimeOffRequestRequestType = typing.Union[RequestTypeEnum, str]
diff --git a/src/merge/resources/hris/types/time_off_request_status.py b/src/merge/resources/hris/types/time_off_request_status.py
index e1170b22..910107ad 100644
--- a/src/merge/resources/hris/types/time_off_request_status.py
+++ b/src/merge/resources/hris/types/time_off_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .time_off_status_enum import TimeOffStatusEnum
TimeOffRequestStatus = typing.Union[TimeOffStatusEnum, str]
diff --git a/src/merge/resources/hris/types/time_off_request_type.py b/src/merge/resources/hris/types/time_off_request_type.py
index 28310e73..529d925f 100644
--- a/src/merge/resources/hris/types/time_off_request_type.py
+++ b/src/merge/resources/hris/types/time_off_request_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .request_type_enum import RequestTypeEnum
TimeOffRequestType = typing.Union[RequestTypeEnum, str]
diff --git a/src/merge/resources/hris/types/time_off_request_units.py b/src/merge/resources/hris/types/time_off_request_units.py
index 447ac34c..c3320c66 100644
--- a/src/merge/resources/hris/types/time_off_request_units.py
+++ b/src/merge/resources/hris/types/time_off_request_units.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .units_enum import UnitsEnum
TimeOffRequestUnits = typing.Union[UnitsEnum, str]
diff --git a/src/merge/resources/hris/types/time_off_response.py b/src/merge/resources/hris/types/time_off_response.py
index 92837ef1..5962cafa 100644
--- a/src/merge/resources/hris/types/time_off_response.py
+++ b/src/merge/resources/hris/types/time_off_response.py
@@ -1,36 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .employee import Employee
+from .employment import Employment
+from .team import Team
from .time_off import TimeOff
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class TimeOffResponse(pydantic_v1.BaseModel):
+class TimeOffResponse(UniversalBaseModel):
model: TimeOff
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Employee, TimeOffResponse=TimeOffResponse)
+update_forward_refs(Employment, TimeOffResponse=TimeOffResponse)
+update_forward_refs(Team, TimeOffResponse=TimeOffResponse)
diff --git a/src/merge/resources/hris/types/time_off_status.py b/src/merge/resources/hris/types/time_off_status.py
index 83ff0ebf..c6ae054b 100644
--- a/src/merge/resources/hris/types/time_off_status.py
+++ b/src/merge/resources/hris/types/time_off_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .time_off_status_enum import TimeOffStatusEnum
TimeOffStatus = typing.Union[TimeOffStatusEnum, str]
diff --git a/src/merge/resources/hris/types/time_off_status_enum.py b/src/merge/resources/hris/types/time_off_status_enum.py
index 73ebc5fd..109a713f 100644
--- a/src/merge/resources/hris/types/time_off_status_enum.py
+++ b/src/merge/resources/hris/types/time_off_status_enum.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TimeOffStatusEnum(str, enum.Enum):
- """
- - `REQUESTED` - REQUESTED
- - `APPROVED` - APPROVED
- - `DECLINED` - DECLINED
- - `CANCELLED` - CANCELLED
- - `DELETED` - DELETED
- """
-
- REQUESTED = "REQUESTED"
- APPROVED = "APPROVED"
- DECLINED = "DECLINED"
- CANCELLED = "CANCELLED"
- DELETED = "DELETED"
-
- def visit(
- self,
- requested: typing.Callable[[], T_Result],
- approved: typing.Callable[[], T_Result],
- declined: typing.Callable[[], T_Result],
- cancelled: typing.Callable[[], T_Result],
- deleted: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TimeOffStatusEnum.REQUESTED:
- return requested()
- if self is TimeOffStatusEnum.APPROVED:
- return approved()
- if self is TimeOffStatusEnum.DECLINED:
- return declined()
- if self is TimeOffStatusEnum.CANCELLED:
- return cancelled()
- if self is TimeOffStatusEnum.DELETED:
- return deleted()
+TimeOffStatusEnum = typing.Union[
+ typing.Literal["REQUESTED", "APPROVED", "DECLINED", "CANCELLED", "DELETED"], typing.Any
+]
diff --git a/src/merge/resources/hris/types/time_off_units.py b/src/merge/resources/hris/types/time_off_units.py
index 913db7ba..822823b4 100644
--- a/src/merge/resources/hris/types/time_off_units.py
+++ b/src/merge/resources/hris/types/time_off_units.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .units_enum import UnitsEnum
TimeOffUnits = typing.Union[UnitsEnum, str]
diff --git a/src/merge/resources/hris/types/timesheet_entry.py b/src/merge/resources/hris/types/timesheet_entry.py
index 57b9e21f..1f5d2982 100644
--- a/src/merge/resources/hris/types/timesheet_entry.py
+++ b/src/merge/resources/hris/types/timesheet_entry.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class TimesheetEntry(pydantic_v1.BaseModel):
+class TimesheetEntry(UniversalBaseModel):
"""
# The Timesheet Entry Object
@@ -21,63 +21,54 @@ class TimesheetEntry(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- employee: typing.Optional[str] = pydantic_v1.Field()
+ employee: typing.Optional[str] = pydantic.Field()
"""
The employee the timesheet entry is for.
"""
- hours_worked: typing.Optional[float] = pydantic_v1.Field()
+ hours_worked: typing.Optional[float] = pydantic.Field()
"""
The number of hours logged by the employee.
"""
- start_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the employee started work.
"""
- end_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the employee ended work.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
- remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/timesheet_entry_request.py b/src/merge/resources/hris/types/timesheet_entry_request.py
index 83d0593e..1f250186 100644
--- a/src/merge/resources/hris/types/timesheet_entry_request.py
+++ b/src/merge/resources/hris/types/timesheet_entry_request.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class TimesheetEntryRequest(pydantic_v1.BaseModel):
+class TimesheetEntryRequest(UniversalBaseModel):
"""
# The Timesheet Entry Object
@@ -20,43 +20,34 @@ class TimesheetEntryRequest(pydantic_v1.BaseModel):
GET and POST Timesheet Entries
"""
- employee: typing.Optional[str] = pydantic_v1.Field()
+ employee: typing.Optional[str] = pydantic.Field()
"""
The employee the timesheet entry is for.
"""
- hours_worked: typing.Optional[float] = pydantic_v1.Field()
+ hours_worked: typing.Optional[float] = pydantic.Field()
"""
The number of hours logged by the employee.
"""
- start_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ start_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the employee started work.
"""
- end_time: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ end_time: typing.Optional[dt.datetime] = pydantic.Field()
"""
The time at which the employee ended work.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/timesheet_entry_response.py b/src/merge/resources/hris/types/timesheet_entry_response.py
index d27f29fd..d9c1e3dc 100644
--- a/src/merge/resources/hris/types/timesheet_entry_response.py
+++ b/src/merge/resources/hris/types/timesheet_entry_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .timesheet_entry import TimesheetEntry
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class TimesheetEntryResponse(pydantic_v1.BaseModel):
+class TimesheetEntryResponse(UniversalBaseModel):
model: TimesheetEntry
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/units_enum.py b/src/merge/resources/hris/types/units_enum.py
index 3765cc19..7843ac2e 100644
--- a/src/merge/resources/hris/types/units_enum.py
+++ b/src/merge/resources/hris/types/units_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class UnitsEnum(str, enum.Enum):
- """
- - `HOURS` - HOURS
- - `DAYS` - DAYS
- """
-
- HOURS = "HOURS"
- DAYS = "DAYS"
-
- def visit(self, hours: typing.Callable[[], T_Result], days: typing.Callable[[], T_Result]) -> T_Result:
- if self is UnitsEnum.HOURS:
- return hours()
- if self is UnitsEnum.DAYS:
- return days()
+UnitsEnum = typing.Union[typing.Literal["HOURS", "DAYS"], typing.Any]
diff --git a/src/merge/resources/hris/types/validation_problem_source.py b/src/merge/resources/hris/types/validation_problem_source.py
index fde15b40..d9a4a8fe 100644
--- a/src/merge/resources/hris/types/validation_problem_source.py
+++ b/src/merge/resources/hris/types/validation_problem_source.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ValidationProblemSource(pydantic_v1.BaseModel):
+class ValidationProblemSource(UniversalBaseModel):
pointer: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/warning_validation_problem.py b/src/merge/resources/hris/types/warning_validation_problem.py
index 6baf9600..d508bb6d 100644
--- a/src/merge/resources/hris/types/warning_validation_problem.py
+++ b/src/merge/resources/hris/types/warning_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class WarningValidationProblem(pydantic_v1.BaseModel):
+class WarningValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/types/webhook_receiver.py b/src/merge/resources/hris/types/webhook_receiver.py
index 0544f256..e8cd17aa 100644
--- a/src/merge/resources/hris/types/webhook_receiver.py
+++ b/src/merge/resources/hris/types/webhook_receiver.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class WebhookReceiver(pydantic_v1.BaseModel):
+class WebhookReceiver(UniversalBaseModel):
event: str
is_active: bool
key: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/client.py b/src/merge/resources/ticketing/client.py
index 9fb7044c..8986729c 100644
--- a/src/merge/resources/ticketing/client.py
+++ b/src/merge/resources/ticketing/client.py
@@ -1,40 +1,67 @@
# This file was auto-generated by Fern from our API Definition.
-from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .resources.account_details.client import AccountDetailsClient, AsyncAccountDetailsClient
-from .resources.account_token.client import AccountTokenClient, AsyncAccountTokenClient
-from .resources.accounts.client import AccountsClient, AsyncAccountsClient
-from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from ...core.client_wrapper import SyncClientWrapper
+from .resources.account_details.client import AccountDetailsClient
+from .resources.account_token.client import AccountTokenClient
+from .resources.accounts.client import AccountsClient
from .resources.async_passthrough.client import (
AsyncPassthroughClient as resources_ticketing_resources_async_passthrough_client_AsyncPassthroughClient,
)
-from .resources.attachments.client import AsyncAttachmentsClient, AttachmentsClient
-from .resources.audit_trail.client import AsyncAuditTrailClient, AuditTrailClient
-from .resources.available_actions.client import AsyncAvailableActionsClient, AvailableActionsClient
-from .resources.collections.client import AsyncCollectionsClient, CollectionsClient
-from .resources.comments.client import AsyncCommentsClient, CommentsClient
-from .resources.contacts.client import AsyncContactsClient, ContactsClient
-from .resources.delete_account.client import AsyncDeleteAccountClient, DeleteAccountClient
-from .resources.field_mapping.client import AsyncFieldMappingClient, FieldMappingClient
-from .resources.force_resync.client import AsyncForceResyncClient, ForceResyncClient
-from .resources.generate_key.client import AsyncGenerateKeyClient, GenerateKeyClient
-from .resources.issues.client import AsyncIssuesClient, IssuesClient
-from .resources.link_token.client import AsyncLinkTokenClient, LinkTokenClient
-from .resources.linked_accounts.client import AsyncLinkedAccountsClient, LinkedAccountsClient
+from .resources.attachments.client import AttachmentsClient
+from .resources.audit_trail.client import AuditTrailClient
+from .resources.available_actions.client import AvailableActionsClient
+from .resources.collections.client import CollectionsClient
+from .resources.comments.client import CommentsClient
+from .resources.contacts.client import ContactsClient
+from .resources.scopes.client import ScopesClient
+from .resources.delete_account.client import DeleteAccountClient
+from .resources.field_mapping.client import FieldMappingClient
+from .resources.generate_key.client import GenerateKeyClient
+from .resources.issues.client import IssuesClient
+from .resources.link_token.client import LinkTokenClient
+from .resources.linked_accounts.client import LinkedAccountsClient
+from .resources.passthrough.client import PassthroughClient
+from .resources.projects.client import ProjectsClient
+from .resources.regenerate_key.client import RegenerateKeyClient
+from .resources.roles.client import RolesClient
+from .resources.sync_status.client import SyncStatusClient
+from .resources.force_resync.client import ForceResyncClient
+from .resources.tags.client import TagsClient
+from .resources.teams.client import TeamsClient
+from .resources.tickets.client import TicketsClient
+from .resources.users.client import UsersClient
+from .resources.webhook_receivers.client import WebhookReceiversClient
+from ...core.client_wrapper import AsyncClientWrapper
+from .resources.account_details.client import AsyncAccountDetailsClient
+from .resources.account_token.client import AsyncAccountTokenClient
+from .resources.accounts.client import AsyncAccountsClient
+from .resources.async_passthrough.client import AsyncAsyncPassthroughClient
+from .resources.attachments.client import AsyncAttachmentsClient
+from .resources.audit_trail.client import AsyncAuditTrailClient
+from .resources.available_actions.client import AsyncAvailableActionsClient
+from .resources.collections.client import AsyncCollectionsClient
+from .resources.comments.client import AsyncCommentsClient
+from .resources.contacts.client import AsyncContactsClient
+from .resources.scopes.client import AsyncScopesClient
+from .resources.delete_account.client import AsyncDeleteAccountClient
+from .resources.field_mapping.client import AsyncFieldMappingClient
+from .resources.generate_key.client import AsyncGenerateKeyClient
+from .resources.issues.client import AsyncIssuesClient
+from .resources.link_token.client import AsyncLinkTokenClient
+from .resources.linked_accounts.client import AsyncLinkedAccountsClient
from .resources.passthrough.client import (
AsyncPassthroughClient as resources_ticketing_resources_passthrough_client_AsyncPassthroughClient,
)
-from .resources.passthrough.client import PassthroughClient
-from .resources.projects.client import AsyncProjectsClient, ProjectsClient
-from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient
-from .resources.roles.client import AsyncRolesClient, RolesClient
-from .resources.scopes.client import AsyncScopesClient, ScopesClient
-from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient
-from .resources.tags.client import AsyncTagsClient, TagsClient
-from .resources.teams.client import AsyncTeamsClient, TeamsClient
-from .resources.tickets.client import AsyncTicketsClient, TicketsClient
-from .resources.users.client import AsyncUsersClient, UsersClient
-from .resources.webhook_receivers.client import AsyncWebhookReceiversClient, WebhookReceiversClient
+from .resources.projects.client import AsyncProjectsClient
+from .resources.regenerate_key.client import AsyncRegenerateKeyClient
+from .resources.roles.client import AsyncRolesClient
+from .resources.sync_status.client import AsyncSyncStatusClient
+from .resources.force_resync.client import AsyncForceResyncClient
+from .resources.tags.client import AsyncTagsClient
+from .resources.teams.client import AsyncTeamsClient
+from .resources.tickets.client import AsyncTicketsClient
+from .resources.users.client import AsyncUsersClient
+from .resources.webhook_receivers.client import AsyncWebhookReceiversClient
class TicketingClient:
diff --git a/src/merge/resources/ticketing/resources/account_details/client.py b/src/merge/resources/ticketing/resources/account_details/client.py
index 3e1b1dd6..01ea26a7 100644
--- a/src/merge/resources/ticketing/resources/account_details/client.py
+++ b/src/merge/resources/ticketing/resources/account_details/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_details import AccountDetails
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountDetailsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.ticketing.account_details.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/account-details", method="GET", request_options=request_options
+ "ticketing/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.account_details.retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.account_details.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/account-details", method="GET", request_options=request_options
+ "ticketing/v1/account-details",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountDetails, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountDetails,
+ parse_obj_as(
+ type_=AccountDetails, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/account_token/client.py b/src/merge/resources/ticketing/resources/account_token/client.py
index 313a070e..d5ca34ca 100644
--- a/src/merge/resources/ticketing/resources/account_token/client.py
+++ b/src/merge/resources/ticketing/resources/account_token/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.account_token import AccountToken
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AccountTokenClient:
@@ -33,7 +33,7 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,9 +48,15 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,24 +87,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.account_token.retrieve(
- public_token="public_token",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.account_token.retrieve(
+ public_token="public_token",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/account-token/{jsonable_encoder(public_token)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AccountToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AccountToken,
+ parse_obj_as(
+ type_=AccountToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/accounts/client.py b/src/merge/resources/ticketing/resources/accounts/client.py
index 4c6a9ec8..1f80d69a 100644
--- a/src/merge/resources/ticketing/resources/accounts/client.py
+++ b/src/merge/resources/ticketing/resources/accounts/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_account_list import PaginatedAccountList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.account import Account
-from ...types.paginated_account_list import PaginatedAccountList
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class AccountsClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountList,
+ parse_obj_as(
+ type_=PaginatedAccountList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/accounts/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Account, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Account,
+ parse_obj_as(
+ type_=Account, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.accounts.list()
+
+
+ async def main() -> None:
+ await client.ticketing.accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/accounts",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountList,
+ parse_obj_as(
+ type_=PaginatedAccountList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.accounts.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.accounts.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/accounts/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Account, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Account,
+ parse_obj_as(
+ type_=Account, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/async_passthrough/client.py b/src/merge/resources/ticketing/resources/async_passthrough/client.py
index c864dcd9..99731322 100644
--- a/src/merge/resources/ticketing/resources/async_passthrough/client.py
+++ b/src/merge/resources/ticketing/resources/async_passthrough/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
+from ...types.data_passthrough_request import DataPassthroughRequest
from .....core.request_options import RequestOptions
from ...types.async_passthrough_reciept import AsyncPassthroughReciept
-from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.remote_response import RemoteResponse
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -40,8 +40,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.ticketing import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.ticketing import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,17 +49,27 @@ def create(
)
client.ticketing.async_passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "ticketing/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,7 +95,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -100,9 +110,15 @@ def retrieve(
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,26 +149,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.ticketing import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.ticketing import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.async_passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.ticketing.async_passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/async-passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "ticketing/v1/async-passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AsyncPassthroughReciept, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AsyncPassthroughReciept,
+ parse_obj_as(
+ type_=AsyncPassthroughReciept, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -178,24 +212,38 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.async_passthrough.retrieve(
- async_passthrough_receipt_id="async_passthrough_receipt_id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.async_passthrough.retrieve(
+ async_passthrough_receipt_id="async_passthrough_receipt_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/async-passthrough/{jsonable_encoder(async_passthrough_receipt_id)}",
method="GET",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/attachments/client.py b/src/merge/resources/ticketing/resources/attachments/client.py
index 0bbbe4a8..9786cdfb 100644
--- a/src/merge/resources/ticketing/resources/attachments/client.py
+++ b/src/merge/resources/ticketing/resources/attachments/client.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_attachment_list import PaginatedAttachmentList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.attachment import Attachment
from ...types.attachment_request import AttachmentRequest
-from ...types.meta_response import MetaResponse
-from ...types.paginated_attachment_list import PaginatedAttachmentList
from ...types.ticketing_attachment_response import TicketingAttachmentResponse
+from ...types.attachment import Attachment
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -92,7 +92,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -121,9 +121,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAttachmentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAttachmentList,
+ parse_obj_as(
+ type_=PaginatedAttachmentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -160,7 +166,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ticketing import AttachmentRequest
client = Merge(
@@ -174,14 +180,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/attachments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TicketingAttachmentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TicketingAttachmentResponse,
+ parse_obj_as(
+ type_=TicketingAttachmentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,7 +235,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -231,12 +248,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/attachments/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Attachment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Attachment,
+ parse_obj_as(
+ type_=Attachment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -269,7 +295,7 @@ def download_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -283,15 +309,17 @@ def download_retrieve(
with self._client_wrapper.httpx_client.stream(
f"ticketing/v1/attachments/{jsonable_encoder(id)}/download",
method="GET",
- params={"mime_type": mime_type},
+ params={
+ "mime_type": mime_type,
+ },
request_options=request_options,
) as _response:
- if 200 <= _response.status_code < 300:
- for _chunk in _response.iter_bytes():
- yield _chunk
- return
- _response.read()
try:
+ if 200 <= _response.status_code < 300:
+ for _chunk in _response.iter_bytes():
+ yield _chunk
+ return
+ _response.read()
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -313,7 +341,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -322,11 +350,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.ticketing.attachments.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/attachments/meta/post", method="GET", request_options=request_options
+ "ticketing/v1/attachments/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -405,13 +441,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.attachments.list()
+
+
+ async def main() -> None:
+ await client.ticketing.attachments.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/attachments",
@@ -434,9 +478,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAttachmentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAttachmentList,
+ parse_obj_as(
+ type_=PaginatedAttachmentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -473,28 +523,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ticketing import AttachmentRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.attachments.create(
- model=AttachmentRequest(),
- )
+
+
+ async def main() -> None:
+ await client.ticketing.attachments.create(
+ model=AttachmentRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/attachments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TicketingAttachmentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TicketingAttachmentResponse,
+ parse_obj_as(
+ type_=TicketingAttachmentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -531,25 +600,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.attachments.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.attachments.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/attachments/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Attachment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Attachment,
+ parse_obj_as(
+ type_=Attachment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -582,29 +668,39 @@ async def download_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.attachments.download_retrieve(
- id="string",
- mime_type="string",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.attachments.download_retrieve(
+ id="string",
+ mime_type="string",
+ )
+
+
+ asyncio.run(main())
"""
async with self._client_wrapper.httpx_client.stream(
f"ticketing/v1/attachments/{jsonable_encoder(id)}/download",
method="GET",
- params={"mime_type": mime_type},
+ params={
+ "mime_type": mime_type,
+ },
request_options=request_options,
) as _response:
- if 200 <= _response.status_code < 300:
- async for _chunk in _response.aiter_bytes():
- yield _chunk
- return
- await _response.aread()
try:
+ if 200 <= _response.status_code < 300:
+ async for _chunk in _response.aiter_bytes():
+ yield _chunk
+ return
+ await _response.aread()
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -626,20 +722,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.attachments.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.attachments.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/attachments/meta/post", method="GET", request_options=request_options
+ "ticketing/v1/attachments/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/audit_trail/client.py b/src/merge/resources/ticketing/resources/audit_trail/client.py
index d729cc89..6fea5bc4 100644
--- a/src/merge/resources/ticketing/resources/audit_trail/client.py
+++ b/src/merge/resources/ticketing/resources/audit_trail/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AuditTrailClient:
@@ -23,7 +23,7 @@ def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -58,7 +58,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -79,9 +79,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -101,7 +107,7 @@ async def list(
page_size: typing.Optional[int] = None,
start_date: typing.Optional[str] = None,
user_email: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAuditLogEventList:
"""
Gets a list of audit trail events.
@@ -136,13 +142,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.audit_trail.list()
+
+
+ async def main() -> None:
+ await client.ticketing.audit_trail.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/audit-trail",
@@ -157,9 +171,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAuditLogEventList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAuditLogEventList,
+ parse_obj_as(
+ type_=PaginatedAuditLogEventList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/available_actions/client.py b/src/merge/resources/ticketing/resources/available_actions/client.py
index 5d01997a..d8ffa020 100644
--- a/src/merge/resources/ticketing/resources/available_actions/client.py
+++ b/src/merge/resources/ticketing/resources/available_actions/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.available_actions import AvailableActions
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class AvailableActionsClient:
@@ -30,7 +30,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -39,11 +39,19 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -
client.ticketing.available_actions.retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/available-actions", method="GET", request_options=request_options
+ "ticketing/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -70,20 +78,36 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.available_actions.retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.available_actions.retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/available-actions", method="GET", request_options=request_options
+ "ticketing/v1/available-actions",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(AvailableActions, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ AvailableActions,
+ parse_obj_as(
+ type_=AvailableActions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/collections/client.py b/src/merge/resources/ticketing/resources/collections/client.py
index aa19e9db..b77ecc62 100644
--- a/src/merge/resources/ticketing/resources/collections/client.py
+++ b/src/merge/resources/ticketing/resources/collections/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_collection_list import PaginatedCollectionList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.collection import Collection
-from ...types.paginated_collection_list import PaginatedCollectionList
-from ...types.paginated_user_list import PaginatedUserList
+from .....core.jsonable_encoder import jsonable_encoder
from .types.collections_users_list_request_expand import CollectionsUsersListRequestExpand
+from ...types.paginated_user_list import PaginatedUserList
+from .....core.client_wrapper import AsyncClientWrapper
class CollectionsClient:
@@ -96,7 +96,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -125,9 +125,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCollectionList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCollectionList,
+ parse_obj_as(
+ type_=PaginatedCollectionList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -172,7 +178,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -193,9 +199,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Collection, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Collection,
+ parse_obj_as(
+ type_=Collection, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -244,7 +256,7 @@ def users_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -266,9 +278,15 @@ def users_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -355,13 +373,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.collections.list()
+
+
+ async def main() -> None:
+ await client.ticketing.collections.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/collections",
@@ -384,9 +410,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCollectionList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCollectionList,
+ parse_obj_as(
+ type_=PaginatedCollectionList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -431,15 +463,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.collections.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.collections.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/collections/{jsonable_encoder(id)}",
@@ -452,9 +492,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Collection, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Collection,
+ parse_obj_as(
+ type_=Collection, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -503,15 +549,23 @@ async def users_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.collections.users_list(
- parent_id="parent_id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.collections.users_list(
+ parent_id="parent_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/collections/{jsonable_encoder(parent_id)}/users",
@@ -525,9 +579,15 @@ async def users_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/collections/types/collections_users_list_request_expand.py b/src/merge/resources/ticketing/resources/collections/types/collections_users_list_request_expand.py
index 4f030ae1..dd4af35d 100644
--- a/src/merge/resources/ticketing/resources/collections/types/collections_users_list_request_expand.py
+++ b/src/merge/resources/ticketing/resources/collections/types/collections_users_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CollectionsUsersListRequestExpand(str, enum.Enum):
- ROLES = "roles"
- TEAMS = "teams"
- TEAMS_ROLES = "teams,roles"
-
- def visit(
- self,
- roles: typing.Callable[[], T_Result],
- teams: typing.Callable[[], T_Result],
- teams_roles: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CollectionsUsersListRequestExpand.ROLES:
- return roles()
- if self is CollectionsUsersListRequestExpand.TEAMS:
- return teams()
- if self is CollectionsUsersListRequestExpand.TEAMS_ROLES:
- return teams_roles()
+CollectionsUsersListRequestExpand = typing.Union[typing.Literal["roles", "teams", "teams,roles"], typing.Any]
diff --git a/src/merge/resources/ticketing/resources/comments/client.py b/src/merge/resources/ticketing/resources/comments/client.py
index 76182e8f..52c5a81b 100644
--- a/src/merge/resources/ticketing/resources/comments/client.py
+++ b/src/merge/resources/ticketing/resources/comments/client.py
@@ -1,22 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .types.comments_list_request_expand import CommentsListRequestExpand
+from .....core.request_options import RequestOptions
+from ...types.paginated_comment_list import PaginatedCommentList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.comment import Comment
from ...types.comment_request import CommentRequest
from ...types.comment_response import CommentResponse
-from ...types.meta_response import MetaResponse
-from ...types.paginated_comment_list import PaginatedCommentList
-from .types.comments_list_request_expand import CommentsListRequestExpand
from .types.comments_retrieve_request_expand import CommentsRetrieveRequestExpand
+from ...types.comment import Comment
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -123,9 +123,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCommentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCommentList,
+ parse_obj_as(
+ type_=PaginatedCommentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -162,7 +168,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ticketing import CommentRequest
client = Merge(
@@ -176,14 +182,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/comments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommentResponse,
+ parse_obj_as(
+ type_=CommentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -220,7 +237,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -233,12 +250,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/comments/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Comment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Comment,
+ parse_obj_as(
+ type_=Comment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -260,7 +286,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -269,11 +295,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.ticketing.comments.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/comments/meta/post", method="GET", request_options=request_options
+ "ticketing/v1/comments/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -352,13 +386,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.comments.list()
+
+
+ async def main() -> None:
+ await client.ticketing.comments.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/comments",
@@ -381,9 +423,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedCommentList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedCommentList,
+ parse_obj_as(
+ type_=PaginatedCommentList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -420,28 +468,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ticketing import CommentRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.comments.create(
- model=CommentRequest(),
- )
+
+
+ async def main() -> None:
+ await client.ticketing.comments.create(
+ model=CommentRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/comments",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommentResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommentResponse,
+ parse_obj_as(
+ type_=CommentResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -478,25 +545,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.comments.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.comments.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/comments/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Comment, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Comment,
+ parse_obj_as(
+ type_=Comment, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -518,20 +602,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.comments.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.comments.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/comments/meta/post", method="GET", request_options=request_options
+ "ticketing/v1/comments/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/comments/types/comments_list_request_expand.py b/src/merge/resources/ticketing/resources/comments/types/comments_list_request_expand.py
index 81453337..4725b20e 100644
--- a/src/merge/resources/ticketing/resources/comments/types/comments_list_request_expand.py
+++ b/src/merge/resources/ticketing/resources/comments/types/comments_list_request_expand.py
@@ -1,41 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CommentsListRequestExpand(str, enum.Enum):
- CONTACT = "contact"
- CONTACT_TICKET = "contact,ticket"
- TICKET = "ticket"
- USER = "user"
- USER_CONTACT = "user,contact"
- USER_CONTACT_TICKET = "user,contact,ticket"
- USER_TICKET = "user,ticket"
-
- def visit(
- self,
- contact: typing.Callable[[], T_Result],
- contact_ticket: typing.Callable[[], T_Result],
- ticket: typing.Callable[[], T_Result],
- user: typing.Callable[[], T_Result],
- user_contact: typing.Callable[[], T_Result],
- user_contact_ticket: typing.Callable[[], T_Result],
- user_ticket: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CommentsListRequestExpand.CONTACT:
- return contact()
- if self is CommentsListRequestExpand.CONTACT_TICKET:
- return contact_ticket()
- if self is CommentsListRequestExpand.TICKET:
- return ticket()
- if self is CommentsListRequestExpand.USER:
- return user()
- if self is CommentsListRequestExpand.USER_CONTACT:
- return user_contact()
- if self is CommentsListRequestExpand.USER_CONTACT_TICKET:
- return user_contact_ticket()
- if self is CommentsListRequestExpand.USER_TICKET:
- return user_ticket()
+CommentsListRequestExpand = typing.Union[
+ typing.Literal["contact", "contact,ticket", "ticket", "user", "user,contact", "user,contact,ticket", "user,ticket"],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/resources/comments/types/comments_retrieve_request_expand.py b/src/merge/resources/ticketing/resources/comments/types/comments_retrieve_request_expand.py
index e0ade3cb..e58ebd1c 100644
--- a/src/merge/resources/ticketing/resources/comments/types/comments_retrieve_request_expand.py
+++ b/src/merge/resources/ticketing/resources/comments/types/comments_retrieve_request_expand.py
@@ -1,41 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CommentsRetrieveRequestExpand(str, enum.Enum):
- CONTACT = "contact"
- CONTACT_TICKET = "contact,ticket"
- TICKET = "ticket"
- USER = "user"
- USER_CONTACT = "user,contact"
- USER_CONTACT_TICKET = "user,contact,ticket"
- USER_TICKET = "user,ticket"
-
- def visit(
- self,
- contact: typing.Callable[[], T_Result],
- contact_ticket: typing.Callable[[], T_Result],
- ticket: typing.Callable[[], T_Result],
- user: typing.Callable[[], T_Result],
- user_contact: typing.Callable[[], T_Result],
- user_contact_ticket: typing.Callable[[], T_Result],
- user_ticket: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CommentsRetrieveRequestExpand.CONTACT:
- return contact()
- if self is CommentsRetrieveRequestExpand.CONTACT_TICKET:
- return contact_ticket()
- if self is CommentsRetrieveRequestExpand.TICKET:
- return ticket()
- if self is CommentsRetrieveRequestExpand.USER:
- return user()
- if self is CommentsRetrieveRequestExpand.USER_CONTACT:
- return user_contact()
- if self is CommentsRetrieveRequestExpand.USER_CONTACT_TICKET:
- return user_contact_ticket()
- if self is CommentsRetrieveRequestExpand.USER_TICKET:
- return user_ticket()
+CommentsRetrieveRequestExpand = typing.Union[
+ typing.Literal["contact", "contact,ticket", "ticket", "user", "user,contact", "user,contact,ticket", "user,ticket"],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/resources/contacts/client.py b/src/merge/resources/ticketing/resources/contacts/client.py
index dbc23ba0..195449d1 100644
--- a/src/merge/resources/ticketing/resources/contacts/client.py
+++ b/src/merge/resources/ticketing/resources/contacts/client.py
@@ -1,20 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
+from .....core.request_options import RequestOptions
+from ...types.paginated_contact_list import PaginatedContactList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.contact import Contact
from ...types.contact_request import ContactRequest
-from ...types.meta_response import MetaResponse
-from ...types.paginated_contact_list import PaginatedContactList
from ...types.ticketing_contact_response import TicketingContactResponse
+from ...types.contact import Contact
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.meta_response import MetaResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -84,7 +84,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -109,9 +109,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedContactList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedContactList,
+ parse_obj_as(
+ type_=PaginatedContactList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -148,7 +154,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ticketing import ContactRequest
client = Merge(
@@ -162,14 +168,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/contacts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TicketingContactResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TicketingContactResponse,
+ parse_obj_as(
+ type_=TicketingContactResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -206,7 +223,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -219,12 +236,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/contacts/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Contact, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Contact,
+ parse_obj_as(
+ type_=Contact, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -246,7 +272,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -255,11 +281,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.ticketing.contacts.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/contacts/meta/post", method="GET", request_options=request_options
+ "ticketing/v1/contacts/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -330,13 +364,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.contacts.list()
+
+
+ async def main() -> None:
+ await client.ticketing.contacts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/contacts",
@@ -355,9 +397,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedContactList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedContactList,
+ parse_obj_as(
+ type_=PaginatedContactList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -394,28 +442,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ticketing import ContactRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.contacts.create(
- model=ContactRequest(),
- )
+
+
+ async def main() -> None:
+ await client.ticketing.contacts.create(
+ model=ContactRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/contacts",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TicketingContactResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TicketingContactResponse,
+ parse_obj_as(
+ type_=TicketingContactResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -452,25 +519,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.contacts.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.contacts.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/contacts/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Contact, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Contact,
+ parse_obj_as(
+ type_=Contact, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -492,20 +576,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.contacts.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.contacts.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/contacts/meta/post", method="GET", request_options=request_options
+ "ticketing/v1/contacts/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/delete_account/client.py b/src/merge/resources/ticketing/resources/delete_account/client.py
index 91a8cdaa..1fb12e55 100644
--- a/src/merge/resources/ticketing/resources/delete_account/client.py
+++ b/src/merge/resources/ticketing/resources/delete_account/client.py
@@ -1,11 +1,11 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
+from .....core.request_options import RequestOptions
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import AsyncClientWrapper
class DeleteAccountClient:
@@ -27,7 +27,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -36,11 +36,13 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) ->
client.ticketing.delete_account.delete()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/delete-account", method="POST", request_options=request_options
+ "ticketing/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -66,20 +68,30 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.delete_account.delete()
+
+
+ async def main() -> None:
+ await client.ticketing.delete_account.delete()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/delete-account", method="POST", request_options=request_options
+ "ticketing/v1/delete-account",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return
try:
+ if 200 <= _response.status_code < 300:
+ return
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/field_mapping/client.py b/src/merge/resources/ticketing/resources/field_mapping/client.py
index f8b76b08..742d0913 100644
--- a/src/merge/resources/ticketing/resources/field_mapping/client.py
+++ b/src/merge/resources/ticketing/resources/field_mapping/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
-from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
from ...types.field_mapping_api_instance_response import FieldMappingApiInstanceResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.field_mapping_instance_response import FieldMappingInstanceResponse
+from .....core.jsonable_encoder import jsonable_encoder
from ...types.remote_field_api_response import RemoteFieldApiResponse
+from ...types.external_target_field_api_response import ExternalTargetFieldApiResponse
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -39,7 +39,7 @@ def field_mappings_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -48,11 +48,19 @@ def field_mappings_retrieve(
client.ticketing.field_mapping.field_mappings_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/field-mappings", method="GET", request_options=request_options
+ "ticketing/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -63,7 +71,7 @@ def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -80,7 +88,7 @@ def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -102,7 +110,7 @@ def field_mappings_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -131,9 +139,15 @@ def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -159,7 +173,7 @@ def field_mappings_destroy(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -174,9 +188,15 @@ def field_mappings_destroy(
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -186,7 +206,7 @@ def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -198,7 +218,7 @@ def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -217,7 +237,7 @@ def field_mappings_partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -238,9 +258,15 @@ def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -274,7 +300,7 @@ def remote_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -285,12 +311,21 @@ def remote_fields_retrieve(
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -314,7 +349,7 @@ def target_fields_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -323,11 +358,19 @@ def target_fields_retrieve(
client.ticketing.field_mapping.target_fields_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/target-fields", method="GET", request_options=request_options
+ "ticketing/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -356,20 +399,36 @@ async def field_mappings_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.field_mapping.field_mappings_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.field_mapping.field_mappings_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/field-mappings", method="GET", request_options=request_options
+ "ticketing/v1/field-mappings",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingApiInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingApiInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingApiInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -380,7 +439,7 @@ async def field_mappings_create(
*,
target_field_name: str,
target_field_description: str,
- remote_field_traversal_path: typing.Sequence[typing.Any],
+ remote_field_traversal_path: typing.Sequence[typing.Optional[typing.Any]],
remote_method: str,
remote_url_path: str,
common_model_name: str,
@@ -397,7 +456,7 @@ async def field_mappings_create(
target_field_description : str
The description of the target field you want this remote field to map to.
- remote_field_traversal_path : typing.Sequence[typing.Any]
+ remote_field_traversal_path : typing.Sequence[typing.Optional[typing.Any]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : str
@@ -419,20 +478,28 @@ async def field_mappings_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.field_mapping.field_mappings_create(
- target_field_name="example_target_field_name",
- target_field_description="this is a example description of the target field",
- remote_field_traversal_path=["example_remote_field"],
- remote_method="GET",
- remote_url_path="/example-url-path",
- common_model_name="ExampleCommonModel",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.field_mapping.field_mappings_create(
+ target_field_name="example_target_field_name",
+ target_field_description="this is a example description of the target field",
+ remote_field_traversal_path=["example_remote_field"],
+ remote_method="GET",
+ remote_url_path="/example-url-path",
+ common_model_name="ExampleCommonModel",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/field-mappings",
@@ -448,9 +515,15 @@ async def field_mappings_create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -476,24 +549,38 @@ async def field_mappings_destroy(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.field_mapping.field_mappings_destroy(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.field_mapping.field_mappings_destroy(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
method="DELETE",
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -503,7 +590,7 @@ async def field_mappings_partial_update(
self,
field_mapping_id: str,
*,
- remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Any]] = OMIT,
+ remote_field_traversal_path: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT,
remote_method: typing.Optional[str] = OMIT,
remote_url_path: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
@@ -515,7 +602,7 @@ async def field_mappings_partial_update(
----------
field_mapping_id : str
- remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Any]]
+ remote_field_traversal_path : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]
The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
remote_method : typing.Optional[str]
@@ -534,15 +621,23 @@ async def field_mappings_partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.field_mapping.field_mappings_partial_update(
- field_mapping_id="field_mapping_id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.field_mapping.field_mappings_partial_update(
+ field_mapping_id="field_mapping_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/field-mappings/{jsonable_encoder(field_mapping_id)}",
@@ -555,9 +650,15 @@ async def field_mappings_partial_update(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(FieldMappingInstanceResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ FieldMappingInstanceResponse,
+ parse_obj_as(
+ type_=FieldMappingInstanceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -591,23 +692,40 @@ async def remote_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.field_mapping.remote_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.field_mapping.remote_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/remote-fields",
method="GET",
- params={"common_models": common_models, "include_example_values": include_example_values},
+ params={
+ "common_models": common_models,
+ "include_example_values": include_example_values,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteFieldApiResponse,
+ parse_obj_as(
+ type_=RemoteFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -631,20 +749,36 @@ async def target_fields_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.field_mapping.target_fields_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.field_mapping.target_fields_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/target-fields", method="GET", request_options=request_options
+ "ticketing/v1/target-fields",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(ExternalTargetFieldApiResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ExternalTargetFieldApiResponse,
+ parse_obj_as(
+ type_=ExternalTargetFieldApiResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/force_resync/client.py b/src/merge/resources/ticketing/resources/force_resync/client.py
index ebecec49..be99bb3d 100644
--- a/src/merge/resources/ticketing/resources/force_resync/client.py
+++ b/src/merge/resources/ticketing/resources/force_resync/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.sync_status import SyncStatus
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class ForceResyncClient:
@@ -32,7 +32,7 @@ def sync_status_resync_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -41,11 +41,19 @@ def sync_status_resync_create(
client.ticketing.force_resync.sync_status_resync_create()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/sync-status/resync", method="POST", request_options=request_options
+ "ticketing/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,20 +82,36 @@ async def sync_status_resync_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.force_resync.sync_status_resync_create()
+
+
+ async def main() -> None:
+ await client.ticketing.force_resync.sync_status_resync_create()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/sync-status/resync", method="POST", request_options=request_options
+ "ticketing/v1/sync-status/resync",
+ method="POST",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[SyncStatus], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[SyncStatus],
+ parse_obj_as(
+ type_=typing.List[SyncStatus], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/generate_key/client.py b/src/merge/resources/ticketing/resources/generate_key/client.py
index da64e687..d8dd1ab3 100644
--- a/src/merge/resources/ticketing/resources/generate_key/client.py
+++ b/src/merge/resources/ticketing/resources/generate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,11 +47,23 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "ticketing/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -81,22 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.generate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.generate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/generate-key", method="POST", json={"name": name}, request_options=request_options, omit=OMIT
+ "ticketing/v1/generate-key",
+ method="POST",
+ json={
+ "name": name,
+ },
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/issues/client.py b/src/merge/resources/ticketing/resources/issues/client.py
index 829dfa93..64caade6 100644
--- a/src/merge/resources/ticketing/resources/issues/client.py
+++ b/src/merge/resources/ticketing/resources/issues/client.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
+import datetime as dt
+from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_issue_list import PaginatedIssueList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
from json.decoder import JSONDecodeError
-
from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
from ...types.issue import Issue
-from ...types.paginated_issue_list import PaginatedIssueList
-from .types.issues_list_request_status import IssuesListRequestStatus
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class IssuesClient:
@@ -95,7 +95,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -132,9 +132,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -158,7 +164,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -169,11 +175,19 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions]
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"ticketing/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"ticketing/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -260,13 +274,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.issues.list()
+
+
+ async def main() -> None:
+ await client.ticketing.issues.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/issues",
@@ -297,9 +319,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedIssueList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedIssueList,
+ parse_obj_as(
+ type_=PaginatedIssueList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -323,22 +351,38 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.issues.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.issues.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"ticketing/v1/issues/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"ticketing/v1/issues/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Issue, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Issue,
+ parse_obj_as(
+ type_=Issue, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/issues/types/issues_list_request_status.py b/src/merge/resources/ticketing/resources/issues/types/issues_list_request_status.py
index 2bd3521e..3886423c 100644
--- a/src/merge/resources/ticketing/resources/issues/types/issues_list_request_status.py
+++ b/src/merge/resources/ticketing/resources/issues/types/issues_list_request_status.py
@@ -1,17 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssuesListRequestStatus(str, enum.Enum):
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssuesListRequestStatus.ONGOING:
- return ongoing()
- if self is IssuesListRequestStatus.RESOLVED:
- return resolved()
+IssuesListRequestStatus = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/ticketing/resources/link_token/client.py b/src/merge/resources/ticketing/resources/link_token/client.py
index 28f2fb02..649c9158 100644
--- a/src/merge/resources/ticketing/resources/link_token/client.py
+++ b/src/merge/resources/ticketing/resources/link_token/client.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.categories_enum import CategoriesEnum
from ...types.common_model_scopes_body_request import CommonModelScopesBodyRequest
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.request_options import RequestOptions
from ...types.link_token import LinkToken
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,8 +36,8 @@ def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -77,7 +77,7 @@ def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -90,8 +90,7 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.ticketing import CategoriesEnum
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -101,7 +100,7 @@ def create(
end_user_email_address="example@gmail.com",
end_user_organization_name="Test Organization",
end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
+ categories=["hris", "ats"],
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -124,9 +123,15 @@ def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,8 +158,8 @@ async def create(
typing.Dict[str, typing.Optional[typing.Sequence[IndividualCommonModelScopeDeserializerRequest]]]
] = OMIT,
language: typing.Optional[str] = OMIT,
- integration_specific_config: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ integration_specific_config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
) -> LinkToken:
"""
Creates a link token to be used when linking a new end user.
@@ -194,7 +199,7 @@ async def create(
language : typing.Optional[str]
The language code for the language to localize Merge Link to.
- integration_specific_config : typing.Optional[typing.Dict[str, typing.Any]]
+ integration_specific_config : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
A JSON object containing integration-specific configuration options.
request_options : typing.Optional[RequestOptions]
@@ -207,19 +212,26 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.ticketing import CategoriesEnum
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.link_token.create(
- end_user_email_address="example@gmail.com",
- end_user_organization_name="Test Organization",
- end_user_origin_id="12345",
- categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS],
- )
+
+
+ async def main() -> None:
+ await client.ticketing.link_token.create(
+ end_user_email_address="example@gmail.com",
+ end_user_organization_name="Test Organization",
+ end_user_origin_id="12345",
+ categories=["hris", "ats"],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/link-token",
@@ -241,9 +253,15 @@ async def create(
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(LinkToken, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ LinkToken,
+ parse_obj_as(
+ type_=LinkToken, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/linked_accounts/client.py b/src/merge/resources/ticketing/resources/linked_accounts/client.py
index 64904f97..ef52a1ae 100644
--- a/src/merge/resources/ticketing/resources/linked_accounts/client.py
+++ b/src/merge/resources/ticketing/resources/linked_accounts/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
from .....core.request_options import RequestOptions
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
-from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class LinkedAccountsClient:
@@ -31,7 +31,7 @@ def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -94,7 +94,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -122,9 +122,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -151,7 +157,7 @@ async def list(
is_test_account: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedAccountDetailsAndActionsList:
"""
List linked accounts for your organization.
@@ -214,13 +220,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.linked_accounts.list()
+
+
+ async def main() -> None:
+ await client.ticketing.linked_accounts.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/linked-accounts",
@@ -242,9 +256,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedAccountDetailsAndActionsList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedAccountDetailsAndActionsList,
+ parse_obj_as(
+ type_=PaginatedAccountDetailsAndActionsList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/linked_accounts/types/linked_accounts_list_request_category.py b/src/merge/resources/ticketing/resources/linked_accounts/types/linked_accounts_list_request_category.py
index bd873ea8..531279d5 100644
--- a/src/merge/resources/ticketing/resources/linked_accounts/types/linked_accounts_list_request_category.py
+++ b/src/merge/resources/ticketing/resources/linked_accounts/types/linked_accounts_list_request_category.py
@@ -1,41 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class LinkedAccountsListRequestCategory(str, enum.Enum):
- ACCOUNTING = "accounting"
- ATS = "ats"
- CRM = "crm"
- FILESTORAGE = "filestorage"
- HRIS = "hris"
- MKTG = "mktg"
- TICKETING = "ticketing"
-
- def visit(
- self,
- accounting: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- hris: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is LinkedAccountsListRequestCategory.ACCOUNTING:
- return accounting()
- if self is LinkedAccountsListRequestCategory.ATS:
- return ats()
- if self is LinkedAccountsListRequestCategory.CRM:
- return crm()
- if self is LinkedAccountsListRequestCategory.FILESTORAGE:
- return filestorage()
- if self is LinkedAccountsListRequestCategory.HRIS:
- return hris()
- if self is LinkedAccountsListRequestCategory.MKTG:
- return mktg()
- if self is LinkedAccountsListRequestCategory.TICKETING:
- return ticketing()
+LinkedAccountsListRequestCategory = typing.Union[
+ typing.Literal["accounting", "ats", "crm", "filestorage", "hris", "mktg", "ticketing"], typing.Any
+]
diff --git a/src/merge/resources/ticketing/resources/passthrough/client.py b/src/merge/resources/ticketing/resources/passthrough/client.py
index 28653534..b2991915 100644
--- a/src/merge/resources/ticketing/resources/passthrough/client.py
+++ b/src/merge/resources/ticketing/resources/passthrough/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
+from .....core.client_wrapper import SyncClientWrapper
from ...types.data_passthrough_request import DataPassthroughRequest
+from .....core.request_options import RequestOptions
from ...types.remote_response import RemoteResponse
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -38,8 +38,8 @@ def create(
Examples
--------
- from merge.client import Merge
- from merge.resources.ticketing import DataPassthroughRequest, MethodEnum
+ from merge import Merge
+ from merge.resources.ticketing import DataPassthroughRequest
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -47,17 +47,27 @@ def create(
)
client.ticketing.passthrough.create(
request=DataPassthroughRequest(
- method=MethodEnum.GET,
+ method="GET",
path="/scooters",
),
)
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "ticketing/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -88,26 +98,44 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
- from merge.resources.ticketing import DataPassthroughRequest, MethodEnum
+ import asyncio
+
+ from merge import AsyncMerge
+ from merge.resources.ticketing import DataPassthroughRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
- )
+
+
+ async def main() -> None:
+ await client.ticketing.passthrough.create(
+ request=DataPassthroughRequest(
+ method="GET",
+ path="/scooters",
+ ),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/passthrough", method="POST", json=request, request_options=request_options, omit=OMIT
+ "ticketing/v1/passthrough",
+ method="POST",
+ json=request,
+ request_options=request_options,
+ omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteResponse,
+ parse_obj_as(
+ type_=RemoteResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/projects/client.py b/src/merge/resources/ticketing/resources/projects/client.py
index 28ee1c1c..73a826f5 100644
--- a/src/merge/resources/ticketing/resources/projects/client.py
+++ b/src/merge/resources/ticketing/resources/projects/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_project_list import PaginatedProjectList
-from ...types.paginated_user_list import PaginatedUserList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.project import Project
+from .....core.jsonable_encoder import jsonable_encoder
from .types.projects_users_list_request_expand import ProjectsUsersListRequestExpand
+from ...types.paginated_user_list import PaginatedUserList
+from .....core.client_wrapper import AsyncClientWrapper
class ProjectsClient:
@@ -76,7 +76,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -100,9 +100,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedProjectList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedProjectList,
+ parse_obj_as(
+ type_=PaginatedProjectList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -135,7 +141,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -148,12 +154,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/projects/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Project, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Project,
+ parse_obj_as(
+ type_=Project, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -202,7 +216,7 @@ def users_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -224,9 +238,15 @@ def users_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -293,13 +313,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.projects.list()
+
+
+ async def main() -> None:
+ await client.ticketing.projects.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/projects",
@@ -317,9 +345,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedProjectList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedProjectList,
+ parse_obj_as(
+ type_=PaginatedProjectList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -352,25 +386,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.projects.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.projects.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/projects/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Project, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Project,
+ parse_obj_as(
+ type_=Project, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -419,15 +469,23 @@ async def users_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.projects.users_list(
- parent_id="parent_id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.projects.users_list(
+ parent_id="parent_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/projects/{jsonable_encoder(parent_id)}/users",
@@ -441,9 +499,15 @@ async def users_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/projects/types/projects_users_list_request_expand.py b/src/merge/resources/ticketing/resources/projects/types/projects_users_list_request_expand.py
index e1d7fbd6..b2629829 100644
--- a/src/merge/resources/ticketing/resources/projects/types/projects_users_list_request_expand.py
+++ b/src/merge/resources/ticketing/resources/projects/types/projects_users_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ProjectsUsersListRequestExpand(str, enum.Enum):
- ROLES = "roles"
- TEAMS = "teams"
- TEAMS_ROLES = "teams,roles"
-
- def visit(
- self,
- roles: typing.Callable[[], T_Result],
- teams: typing.Callable[[], T_Result],
- teams_roles: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ProjectsUsersListRequestExpand.ROLES:
- return roles()
- if self is ProjectsUsersListRequestExpand.TEAMS:
- return teams()
- if self is ProjectsUsersListRequestExpand.TEAMS_ROLES:
- return teams_roles()
+ProjectsUsersListRequestExpand = typing.Union[typing.Literal["roles", "teams", "teams,roles"], typing.Any]
diff --git a/src/merge/resources/ticketing/resources/regenerate_key/client.py b/src/merge/resources/ticketing/resources/regenerate_key/client.py
index e429d9d2..b2cc5e3d 100644
--- a/src/merge/resources/ticketing/resources/regenerate_key/client.py
+++ b/src/merge/resources/ticketing/resources/regenerate_key/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.remote_key import RemoteKey
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -49,13 +49,21 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions]
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/regenerate-key",
method="POST",
- json={"name": name},
+ json={
+ "name": name,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -85,26 +93,42 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.regenerate_key.create(
- name="Remote Deployment Key 1",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.regenerate_key.create(
+ name="Remote Deployment Key 1",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/regenerate-key",
method="POST",
- json={"name": name},
+ json={
+ "name": name,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(RemoteKey, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ RemoteKey,
+ parse_obj_as(
+ type_=RemoteKey, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/roles/client.py b/src/merge/resources/ticketing/resources/roles/client.py
index 2462969a..79cfa389 100644
--- a/src/merge/resources/ticketing/resources/roles/client.py
+++ b/src/merge/resources/ticketing/resources/roles/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_role_list import PaginatedRoleList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.role import Role
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class RolesClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRoleList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRoleList,
+ parse_obj_as(
+ type_=PaginatedRoleList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/roles/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Role, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Role,
+ parse_obj_as(
+ type_=Role, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.roles.list()
+
+
+ async def main() -> None:
+ await client.ticketing.roles.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/roles",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRoleList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRoleList,
+ parse_obj_as(
+ type_=PaginatedRoleList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.roles.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.roles.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/roles/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Role, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Role,
+ parse_obj_as(
+ type_=Role, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/scopes/client.py b/src/merge/resources/ticketing/resources/scopes/client.py
index 4aaea998..1f7486f2 100644
--- a/src/merge/resources/ticketing/resources/scopes/client.py
+++ b/src/merge/resources/ticketing/resources/scopes/client.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.common_model_scope_api import CommonModelScopeApi
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.individual_common_model_scope_deserializer_request import IndividualCommonModelScopeDeserializerRequest
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -36,7 +36,7 @@ def default_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -45,11 +45,19 @@ def default_scopes_retrieve(
client.ticketing.scopes.default_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/default-scopes", method="GET", request_options=request_options
+ "ticketing/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -73,7 +81,7 @@ def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -82,11 +90,19 @@ def linked_account_scopes_retrieve(
client.ticketing.scopes.linked_account_scopes_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/linked-account-scopes", method="GET", request_options=request_options
+ "ticketing/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -96,7 +112,7 @@ def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -116,7 +132,7 @@ def linked_account_scopes_create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ticketing import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -153,13 +169,21 @@ def linked_account_scopes_create(
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -188,20 +212,36 @@ async def default_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.scopes.default_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.scopes.default_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/default-scopes", method="GET", request_options=request_options
+ "ticketing/v1/default-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -225,20 +265,36 @@ async def linked_account_scopes_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.scopes.linked_account_scopes_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.scopes.linked_account_scopes_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/linked-account-scopes", method="GET", request_options=request_options
+ "ticketing/v1/linked-account-scopes",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -248,7 +304,7 @@ async def linked_account_scopes_create(
self,
*,
common_models: typing.Sequence[IndividualCommonModelScopeDeserializerRequest],
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> CommonModelScopeApi:
"""
Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes)
@@ -268,7 +324,9 @@ async def linked_account_scopes_create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ticketing import (
IndividualCommonModelScopeDeserializerRequest,
ModelPermissionDeserializerRequest,
@@ -278,40 +336,54 @@ async def linked_account_scopes_create(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.scopes.linked_account_scopes_create(
- common_models=[
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Employee",
- model_permissions={
- "READ": ModelPermissionDeserializerRequest(
- is_enabled=True,
- ),
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- ),
- },
- ),
- IndividualCommonModelScopeDeserializerRequest(
- model_name="Benefit",
- model_permissions={
- "WRITE": ModelPermissionDeserializerRequest(
- is_enabled=False,
- )
- },
- ),
- ],
- )
+
+
+ async def main() -> None:
+ await client.ticketing.scopes.linked_account_scopes_create(
+ common_models=[
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Employee",
+ model_permissions={
+ "READ": ModelPermissionDeserializerRequest(
+ is_enabled=True,
+ ),
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ ),
+ },
+ ),
+ IndividualCommonModelScopeDeserializerRequest(
+ model_name="Benefit",
+ model_permissions={
+ "WRITE": ModelPermissionDeserializerRequest(
+ is_enabled=False,
+ )
+ },
+ ),
+ ],
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/linked-account-scopes",
method="POST",
- json={"common_models": common_models},
+ json={
+ "common_models": common_models,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(CommonModelScopeApi, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ CommonModelScopeApi,
+ parse_obj_as(
+ type_=CommonModelScopeApi, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/sync_status/client.py b/src/merge/resources/ticketing/resources/sync_status/client.py
index c3b62e9b..fd31892a 100644
--- a/src/merge/resources/ticketing/resources/sync_status/client.py
+++ b/src/merge/resources/ticketing/resources/sync_status/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
from .....core.request_options import RequestOptions
from ...types.paginated_sync_status_list import PaginatedSyncStatusList
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
class SyncStatusClient:
@@ -19,7 +19,7 @@ def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -42,7 +42,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -53,12 +53,21 @@ def list(
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -74,7 +83,7 @@ async def list(
*,
cursor: typing.Optional[str] = None,
page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSyncStatusList:
"""
Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -97,23 +106,40 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.sync_status.list()
+
+
+ async def main() -> None:
+ await client.ticketing.sync_status.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/sync-status",
method="GET",
- params={"cursor": cursor, "page_size": page_size},
+ params={
+ "cursor": cursor,
+ "page_size": page_size,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedSyncStatusList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedSyncStatusList,
+ parse_obj_as(
+ type_=PaginatedSyncStatusList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/tags/client.py b/src/merge/resources/ticketing/resources/tags/client.py
index 38ce25d6..e784c7ae 100644
--- a/src/merge/resources/ticketing/resources/tags/client.py
+++ b/src/merge/resources/ticketing/resources/tags/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_tag_list import PaginatedTagList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.tag import Tag
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class TagsClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTagList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTagList,
+ parse_obj_as(
+ type_=PaginatedTagList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/tags/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Tag, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Tag,
+ parse_obj_as(
+ type_=Tag, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tags.list()
+
+
+ async def main() -> None:
+ await client.ticketing.tags.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/tags",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTagList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTagList,
+ parse_obj_as(
+ type_=PaginatedTagList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tags.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.tags.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/tags/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Tag, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Tag,
+ parse_obj_as(
+ type_=Tag, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/teams/client.py b/src/merge/resources/ticketing/resources/teams/client.py
index a9271250..9940bbae 100644
--- a/src/merge/resources/ticketing/resources/teams/client.py
+++ b/src/merge/resources/ticketing/resources/teams/client.py
@@ -1,17 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
from .....core.request_options import RequestOptions
from ...types.paginated_team_list import PaginatedTeamList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from ...types.team import Team
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class TeamsClient:
@@ -74,7 +74,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -98,9 +98,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTeamList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTeamList,
+ parse_obj_as(
+ type_=PaginatedTeamList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -133,7 +139,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -146,12 +152,20 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/teams/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Team, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Team,
+ parse_obj_as(
+ type_=Team, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -218,13 +232,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.teams.list()
+
+
+ async def main() -> None:
+ await client.ticketing.teams.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/teams",
@@ -242,9 +264,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTeamList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTeamList,
+ parse_obj_as(
+ type_=PaginatedTeamList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -277,25 +305,41 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.teams.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.teams.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/teams/{jsonable_encoder(id)}",
method="GET",
- params={"include_remote_data": include_remote_data},
+ params={
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Team, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Team,
+ parse_obj_as(
+ type_=Team, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/tickets/client.py b/src/merge/resources/ticketing/resources/tickets/client.py
index 0f81b0a4..3d97a83d 100644
--- a/src/merge/resources/ticketing/resources/tickets/client.py
+++ b/src/merge/resources/ticketing/resources/tickets/client.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
-from .....core.request_options import RequestOptions
-from ...types.meta_response import MetaResponse
-from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
-from ...types.paginated_ticket_list import PaginatedTicketList
-from ...types.paginated_user_list import PaginatedUserList
-from ...types.patched_ticket_request import PatchedTicketRequest
-from ...types.ticket import Ticket
-from ...types.ticket_request import TicketRequest
-from ...types.ticket_response import TicketResponse
-from .types.tickets_collaborators_list_request_expand import TicketsCollaboratorsListRequestExpand
+from .....core.client_wrapper import SyncClientWrapper
+import datetime as dt
from .types.tickets_list_request_expand import TicketsListRequestExpand
from .types.tickets_list_request_priority import TicketsListRequestPriority
from .types.tickets_list_request_remote_fields import TicketsListRequestRemoteFields
from .types.tickets_list_request_show_enum_origins import TicketsListRequestShowEnumOrigins
from .types.tickets_list_request_status import TicketsListRequestStatus
+from .....core.request_options import RequestOptions
+from ...types.paginated_ticket_list import PaginatedTicketList
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from ...types.ticket_request import TicketRequest
+from ...types.ticket_response import TicketResponse
from .types.tickets_retrieve_request_expand import TicketsRetrieveRequestExpand
from .types.tickets_retrieve_request_remote_fields import TicketsRetrieveRequestRemoteFields
from .types.tickets_retrieve_request_show_enum_origins import TicketsRetrieveRequestShowEnumOrigins
+from ...types.ticket import Ticket
+from .....core.jsonable_encoder import jsonable_encoder
+from ...types.patched_ticket_request import PatchedTicketRequest
+from .types.tickets_collaborators_list_request_expand import TicketsCollaboratorsListRequestExpand
+from ...types.paginated_user_list import PaginatedUserList
+from ...types.meta_response import MetaResponse
+from ...types.paginated_remote_field_class_list import PaginatedRemoteFieldClassList
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -190,7 +190,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -244,9 +244,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTicketList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTicketList,
+ parse_obj_as(
+ type_=PaginatedTicketList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -283,7 +289,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ticketing import TicketRequest
client = Merge(
@@ -297,14 +303,25 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/tickets",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TicketResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TicketResponse,
+ parse_obj_as(
+ type_=TicketResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -353,7 +370,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -375,9 +392,15 @@ def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Ticket, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Ticket,
+ parse_obj_as(
+ type_=Ticket, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -417,7 +440,7 @@ def partial_update(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
from merge.resources.ticketing import PatchedTicketRequest
client = Merge(
@@ -432,14 +455,25 @@ def partial_update(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/tickets/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TicketResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TicketResponse,
+ parse_obj_as(
+ type_=TicketResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -488,7 +522,7 @@ def collaborators_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -510,9 +544,15 @@ def collaborators_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -536,7 +576,7 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -547,11 +587,19 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque
)
"""
_response = self._client_wrapper.httpx_client.request(
- f"ticketing/v1/tickets/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"ticketing/v1/tickets/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -573,7 +621,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -582,11 +630,19 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions]
client.ticketing.tickets.meta_post_retrieve()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/tickets/meta/post", method="GET", request_options=request_options
+ "ticketing/v1/tickets/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -632,7 +688,7 @@ def remote_field_classes_list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -652,9 +708,15 @@ def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -819,13 +881,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tickets.list()
+
+
+ async def main() -> None:
+ await client.ticketing.tickets.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/tickets",
@@ -873,9 +943,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedTicketList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedTicketList,
+ parse_obj_as(
+ type_=PaginatedTicketList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -912,28 +988,47 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ticketing import TicketRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tickets.create(
- model=TicketRequest(),
- )
+
+
+ async def main() -> None:
+ await client.ticketing.tickets.create(
+ model=TicketRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/tickets",
method="POST",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TicketResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TicketResponse,
+ parse_obj_as(
+ type_=TicketResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -982,15 +1077,23 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tickets.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.tickets.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/tickets/{jsonable_encoder(id)}",
@@ -1004,9 +1107,15 @@ async def retrieve(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(Ticket, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ Ticket,
+ parse_obj_as(
+ type_=Ticket, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -1046,29 +1155,48 @@ async def partial_update(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
from merge.resources.ticketing import PatchedTicketRequest
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tickets.partial_update(
- id="id",
- model=PatchedTicketRequest(),
- )
+
+
+ async def main() -> None:
+ await client.ticketing.tickets.partial_update(
+ id="id",
+ model=PatchedTicketRequest(),
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/tickets/{jsonable_encoder(id)}",
method="PATCH",
- params={"is_debug_mode": is_debug_mode, "run_async": run_async},
- json={"model": model},
+ params={
+ "is_debug_mode": is_debug_mode,
+ "run_async": run_async,
+ },
+ json={
+ "model": model,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(TicketResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ TicketResponse,
+ parse_obj_as(
+ type_=TicketResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -1117,15 +1245,23 @@ async def collaborators_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tickets.collaborators_list(
- parent_id="parent_id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.tickets.collaborators_list(
+ parent_id="parent_id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/tickets/{jsonable_encoder(parent_id)}/collaborators",
@@ -1139,9 +1275,15 @@ async def collaborators_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -1167,22 +1309,38 @@ async def meta_patch_retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tickets.meta_patch_retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.tickets.meta_patch_retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- f"ticketing/v1/tickets/meta/patch/{jsonable_encoder(id)}", method="GET", request_options=request_options
+ f"ticketing/v1/tickets/meta/patch/{jsonable_encoder(id)}",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -1204,20 +1362,36 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tickets.meta_post_retrieve()
+
+
+ async def main() -> None:
+ await client.ticketing.tickets.meta_post_retrieve()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/tickets/meta/post", method="GET", request_options=request_options
+ "ticketing/v1/tickets/meta/post",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(MetaResponse, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ MetaResponse,
+ parse_obj_as(
+ type_=MetaResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -1263,13 +1437,21 @@ async def remote_field_classes_list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.tickets.remote_field_classes_list()
+
+
+ async def main() -> None:
+ await client.ticketing.tickets.remote_field_classes_list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/tickets/remote-field-classes",
@@ -1283,9 +1465,15 @@ async def remote_field_classes_list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedRemoteFieldClassList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedRemoteFieldClassList,
+ parse_obj_as(
+ type_=PaginatedRemoteFieldClassList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_collaborators_list_request_expand.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_collaborators_list_request_expand.py
index 3f92497f..c29e60bf 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_collaborators_list_request_expand.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_collaborators_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsCollaboratorsListRequestExpand(str, enum.Enum):
- ROLES = "roles"
- TEAMS = "teams"
- TEAMS_ROLES = "teams,roles"
-
- def visit(
- self,
- roles: typing.Callable[[], T_Result],
- teams: typing.Callable[[], T_Result],
- teams_roles: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsCollaboratorsListRequestExpand.ROLES:
- return roles()
- if self is TicketsCollaboratorsListRequestExpand.TEAMS:
- return teams()
- if self is TicketsCollaboratorsListRequestExpand.TEAMS_ROLES:
- return teams_roles()
+TicketsCollaboratorsListRequestExpand = typing.Union[typing.Literal["roles", "teams", "teams,roles"], typing.Any]
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_expand.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_expand.py
index da191ad3..29de9dd3 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_expand.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_expand.py
@@ -1,537 +1,136 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsListRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_CONTACT = "account,contact"
- ACCOUNT_CONTACT_CREATOR = "account,contact,creator"
- ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = "account,contact,creator,parent_ticket"
- ACCOUNT_CONTACT_PARENT_TICKET = "account,contact,parent_ticket"
- ACCOUNT_CREATOR = "account,creator"
- ACCOUNT_CREATOR_PARENT_TICKET = "account,creator,parent_ticket"
- ACCOUNT_PARENT_TICKET = "account,parent_ticket"
- ASSIGNEES = "assignees"
- ASSIGNEES_ACCOUNT = "assignees,account"
- ASSIGNEES_ACCOUNT_CONTACT = "assignees,account,contact"
- ASSIGNEES_ACCOUNT_CONTACT_CREATOR = "assignees,account,contact,creator"
- ASSIGNEES_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = "assignees,account,contact,creator,parent_ticket"
- ASSIGNEES_ACCOUNT_CONTACT_PARENT_TICKET = "assignees,account,contact,parent_ticket"
- ASSIGNEES_ACCOUNT_CREATOR = "assignees,account,creator"
- ASSIGNEES_ACCOUNT_CREATOR_PARENT_TICKET = "assignees,account,creator,parent_ticket"
- ASSIGNEES_ACCOUNT_PARENT_TICKET = "assignees,account,parent_ticket"
- ASSIGNEES_COLLECTIONS = "assignees,collections"
- ASSIGNEES_COLLECTIONS_ACCOUNT = "assignees,collections,account"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT = "assignees,collections,account,contact"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR = "assignees,collections,account,contact,creator"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = (
- "assignees,collections,account,contact,creator,parent_ticket"
- )
- ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET = "assignees,collections,account,contact,parent_ticket"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR = "assignees,collections,account,creator"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET = "assignees,collections,account,creator,parent_ticket"
- ASSIGNEES_COLLECTIONS_ACCOUNT_PARENT_TICKET = "assignees,collections,account,parent_ticket"
- ASSIGNEES_COLLECTIONS_CONTACT = "assignees,collections,contact"
- ASSIGNEES_COLLECTIONS_CONTACT_CREATOR = "assignees,collections,contact,creator"
- ASSIGNEES_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET = "assignees,collections,contact,creator,parent_ticket"
- ASSIGNEES_COLLECTIONS_CONTACT_PARENT_TICKET = "assignees,collections,contact,parent_ticket"
- ASSIGNEES_COLLECTIONS_CREATOR = "assignees,collections,creator"
- ASSIGNEES_COLLECTIONS_CREATOR_PARENT_TICKET = "assignees,collections,creator,parent_ticket"
- ASSIGNEES_COLLECTIONS_PARENT_TICKET = "assignees,collections,parent_ticket"
- ASSIGNEES_CONTACT = "assignees,contact"
- ASSIGNEES_CONTACT_CREATOR = "assignees,contact,creator"
- ASSIGNEES_CONTACT_CREATOR_PARENT_TICKET = "assignees,contact,creator,parent_ticket"
- ASSIGNEES_CONTACT_PARENT_TICKET = "assignees,contact,parent_ticket"
- ASSIGNEES_CREATOR = "assignees,creator"
- ASSIGNEES_CREATOR_PARENT_TICKET = "assignees,creator,parent_ticket"
- ASSIGNEES_PARENT_TICKET = "assignees,parent_ticket"
- ATTACHMENTS = "attachments"
- ATTACHMENTS_ACCOUNT = "attachments,account"
- ATTACHMENTS_ACCOUNT_CONTACT = "attachments,account,contact"
- ATTACHMENTS_ACCOUNT_CONTACT_CREATOR = "attachments,account,contact,creator"
- ATTACHMENTS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = "attachments,account,contact,creator,parent_ticket"
- ATTACHMENTS_ACCOUNT_CONTACT_PARENT_TICKET = "attachments,account,contact,parent_ticket"
- ATTACHMENTS_ACCOUNT_CREATOR = "attachments,account,creator"
- ATTACHMENTS_ACCOUNT_CREATOR_PARENT_TICKET = "attachments,account,creator,parent_ticket"
- ATTACHMENTS_ACCOUNT_PARENT_TICKET = "attachments,account,parent_ticket"
- ATTACHMENTS_ASSIGNEES = "attachments,assignees"
- ATTACHMENTS_ASSIGNEES_ACCOUNT = "attachments,assignees,account"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT = "attachments,assignees,account,contact"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_CREATOR = "attachments,assignees,account,contact,creator"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = (
- "attachments,assignees,account,contact,creator,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_PARENT_TICKET = "attachments,assignees,account,contact,parent_ticket"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CREATOR = "attachments,assignees,account,creator"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CREATOR_PARENT_TICKET = "attachments,assignees,account,creator,parent_ticket"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_PARENT_TICKET = "attachments,assignees,account,parent_ticket"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS = "attachments,assignees,collections"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT = "attachments,assignees,collections,account"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT = "attachments,assignees,collections,account,contact"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR = (
- "attachments,assignees,collections,account,contact,creator"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = (
- "attachments,assignees,collections,account,contact,creator,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET = (
- "attachments,assignees,collections,account,contact,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR = "attachments,assignees,collections,account,creator"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET = (
- "attachments,assignees,collections,account,creator,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_PARENT_TICKET = "attachments,assignees,collections,account,parent_ticket"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT = "attachments,assignees,collections,contact"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_CREATOR = "attachments,assignees,collections,contact,creator"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET = (
- "attachments,assignees,collections,contact,creator,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_PARENT_TICKET = "attachments,assignees,collections,contact,parent_ticket"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CREATOR = "attachments,assignees,collections,creator"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CREATOR_PARENT_TICKET = "attachments,assignees,collections,creator,parent_ticket"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_PARENT_TICKET = "attachments,assignees,collections,parent_ticket"
- ATTACHMENTS_ASSIGNEES_CONTACT = "attachments,assignees,contact"
- ATTACHMENTS_ASSIGNEES_CONTACT_CREATOR = "attachments,assignees,contact,creator"
- ATTACHMENTS_ASSIGNEES_CONTACT_CREATOR_PARENT_TICKET = "attachments,assignees,contact,creator,parent_ticket"
- ATTACHMENTS_ASSIGNEES_CONTACT_PARENT_TICKET = "attachments,assignees,contact,parent_ticket"
- ATTACHMENTS_ASSIGNEES_CREATOR = "attachments,assignees,creator"
- ATTACHMENTS_ASSIGNEES_CREATOR_PARENT_TICKET = "attachments,assignees,creator,parent_ticket"
- ATTACHMENTS_ASSIGNEES_PARENT_TICKET = "attachments,assignees,parent_ticket"
- ATTACHMENTS_COLLECTIONS = "attachments,collections"
- ATTACHMENTS_COLLECTIONS_ACCOUNT = "attachments,collections,account"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT = "attachments,collections,account,contact"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_CREATOR = "attachments,collections,account,contact,creator"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = (
- "attachments,collections,account,contact,creator,parent_ticket"
- )
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET = "attachments,collections,account,contact,parent_ticket"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CREATOR = "attachments,collections,account,creator"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET = "attachments,collections,account,creator,parent_ticket"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_PARENT_TICKET = "attachments,collections,account,parent_ticket"
- ATTACHMENTS_COLLECTIONS_CONTACT = "attachments,collections,contact"
- ATTACHMENTS_COLLECTIONS_CONTACT_CREATOR = "attachments,collections,contact,creator"
- ATTACHMENTS_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET = "attachments,collections,contact,creator,parent_ticket"
- ATTACHMENTS_COLLECTIONS_CONTACT_PARENT_TICKET = "attachments,collections,contact,parent_ticket"
- ATTACHMENTS_COLLECTIONS_CREATOR = "attachments,collections,creator"
- ATTACHMENTS_COLLECTIONS_CREATOR_PARENT_TICKET = "attachments,collections,creator,parent_ticket"
- ATTACHMENTS_COLLECTIONS_PARENT_TICKET = "attachments,collections,parent_ticket"
- ATTACHMENTS_CONTACT = "attachments,contact"
- ATTACHMENTS_CONTACT_CREATOR = "attachments,contact,creator"
- ATTACHMENTS_CONTACT_CREATOR_PARENT_TICKET = "attachments,contact,creator,parent_ticket"
- ATTACHMENTS_CONTACT_PARENT_TICKET = "attachments,contact,parent_ticket"
- ATTACHMENTS_CREATOR = "attachments,creator"
- ATTACHMENTS_CREATOR_PARENT_TICKET = "attachments,creator,parent_ticket"
- ATTACHMENTS_PARENT_TICKET = "attachments,parent_ticket"
- COLLECTIONS = "collections"
- COLLECTIONS_ACCOUNT = "collections,account"
- COLLECTIONS_ACCOUNT_CONTACT = "collections,account,contact"
- COLLECTIONS_ACCOUNT_CONTACT_CREATOR = "collections,account,contact,creator"
- COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = "collections,account,contact,creator,parent_ticket"
- COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET = "collections,account,contact,parent_ticket"
- COLLECTIONS_ACCOUNT_CREATOR = "collections,account,creator"
- COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET = "collections,account,creator,parent_ticket"
- COLLECTIONS_ACCOUNT_PARENT_TICKET = "collections,account,parent_ticket"
- COLLECTIONS_CONTACT = "collections,contact"
- COLLECTIONS_CONTACT_CREATOR = "collections,contact,creator"
- COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET = "collections,contact,creator,parent_ticket"
- COLLECTIONS_CONTACT_PARENT_TICKET = "collections,contact,parent_ticket"
- COLLECTIONS_CREATOR = "collections,creator"
- COLLECTIONS_CREATOR_PARENT_TICKET = "collections,creator,parent_ticket"
- COLLECTIONS_PARENT_TICKET = "collections,parent_ticket"
- CONTACT = "contact"
- CONTACT_CREATOR = "contact,creator"
- CONTACT_CREATOR_PARENT_TICKET = "contact,creator,parent_ticket"
- CONTACT_PARENT_TICKET = "contact,parent_ticket"
- CREATOR = "creator"
- CREATOR_PARENT_TICKET = "creator,parent_ticket"
- PARENT_TICKET = "parent_ticket"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_contact: typing.Callable[[], T_Result],
- account_contact_creator: typing.Callable[[], T_Result],
- account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- account_contact_parent_ticket: typing.Callable[[], T_Result],
- account_creator: typing.Callable[[], T_Result],
- account_creator_parent_ticket: typing.Callable[[], T_Result],
- account_parent_ticket: typing.Callable[[], T_Result],
- assignees: typing.Callable[[], T_Result],
- assignees_account: typing.Callable[[], T_Result],
- assignees_account_contact: typing.Callable[[], T_Result],
- assignees_account_contact_creator: typing.Callable[[], T_Result],
- assignees_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_account_contact_parent_ticket: typing.Callable[[], T_Result],
- assignees_account_creator: typing.Callable[[], T_Result],
- assignees_account_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_account_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections: typing.Callable[[], T_Result],
- assignees_collections_account: typing.Callable[[], T_Result],
- assignees_collections_account_contact: typing.Callable[[], T_Result],
- assignees_collections_account_contact_creator: typing.Callable[[], T_Result],
- assignees_collections_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_account_contact_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_account_creator: typing.Callable[[], T_Result],
- assignees_collections_account_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_account_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_contact: typing.Callable[[], T_Result],
- assignees_collections_contact_creator: typing.Callable[[], T_Result],
- assignees_collections_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_contact_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_creator: typing.Callable[[], T_Result],
- assignees_collections_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_parent_ticket: typing.Callable[[], T_Result],
- assignees_contact: typing.Callable[[], T_Result],
- assignees_contact_creator: typing.Callable[[], T_Result],
- assignees_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_contact_parent_ticket: typing.Callable[[], T_Result],
- assignees_creator: typing.Callable[[], T_Result],
- assignees_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_parent_ticket: typing.Callable[[], T_Result],
- attachments: typing.Callable[[], T_Result],
- attachments_account: typing.Callable[[], T_Result],
- attachments_account_contact: typing.Callable[[], T_Result],
- attachments_account_contact_creator: typing.Callable[[], T_Result],
- attachments_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_account_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_account_creator: typing.Callable[[], T_Result],
- attachments_account_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_account_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees: typing.Callable[[], T_Result],
- attachments_assignees_account: typing.Callable[[], T_Result],
- attachments_assignees_account_contact: typing.Callable[[], T_Result],
- attachments_assignees_account_contact_creator: typing.Callable[[], T_Result],
- attachments_assignees_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_account_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_account_creator: typing.Callable[[], T_Result],
- attachments_assignees_account_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_account_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections: typing.Callable[[], T_Result],
- attachments_assignees_collections_account: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_contact: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_contact_creator: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_creator: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_contact: typing.Callable[[], T_Result],
- attachments_assignees_collections_contact_creator: typing.Callable[[], T_Result],
- attachments_assignees_collections_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_creator: typing.Callable[[], T_Result],
- attachments_assignees_collections_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_contact: typing.Callable[[], T_Result],
- attachments_assignees_contact_creator: typing.Callable[[], T_Result],
- attachments_assignees_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_creator: typing.Callable[[], T_Result],
- attachments_assignees_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections: typing.Callable[[], T_Result],
- attachments_collections_account: typing.Callable[[], T_Result],
- attachments_collections_account_contact: typing.Callable[[], T_Result],
- attachments_collections_account_contact_creator: typing.Callable[[], T_Result],
- attachments_collections_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_account_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_account_creator: typing.Callable[[], T_Result],
- attachments_collections_account_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_account_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_contact: typing.Callable[[], T_Result],
- attachments_collections_contact_creator: typing.Callable[[], T_Result],
- attachments_collections_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_creator: typing.Callable[[], T_Result],
- attachments_collections_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_parent_ticket: typing.Callable[[], T_Result],
- attachments_contact: typing.Callable[[], T_Result],
- attachments_contact_creator: typing.Callable[[], T_Result],
- attachments_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_creator: typing.Callable[[], T_Result],
- attachments_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_parent_ticket: typing.Callable[[], T_Result],
- collections: typing.Callable[[], T_Result],
- collections_account: typing.Callable[[], T_Result],
- collections_account_contact: typing.Callable[[], T_Result],
- collections_account_contact_creator: typing.Callable[[], T_Result],
- collections_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- collections_account_contact_parent_ticket: typing.Callable[[], T_Result],
- collections_account_creator: typing.Callable[[], T_Result],
- collections_account_creator_parent_ticket: typing.Callable[[], T_Result],
- collections_account_parent_ticket: typing.Callable[[], T_Result],
- collections_contact: typing.Callable[[], T_Result],
- collections_contact_creator: typing.Callable[[], T_Result],
- collections_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- collections_contact_parent_ticket: typing.Callable[[], T_Result],
- collections_creator: typing.Callable[[], T_Result],
- collections_creator_parent_ticket: typing.Callable[[], T_Result],
- collections_parent_ticket: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_creator: typing.Callable[[], T_Result],
- contact_creator_parent_ticket: typing.Callable[[], T_Result],
- contact_parent_ticket: typing.Callable[[], T_Result],
- creator: typing.Callable[[], T_Result],
- creator_parent_ticket: typing.Callable[[], T_Result],
- parent_ticket: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsListRequestExpand.ACCOUNT:
- return account()
- if self is TicketsListRequestExpand.ACCOUNT_CONTACT:
- return account_contact()
- if self is TicketsListRequestExpand.ACCOUNT_CONTACT_CREATOR:
- return account_contact_creator()
- if self is TicketsListRequestExpand.ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return account_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ACCOUNT_CONTACT_PARENT_TICKET:
- return account_contact_parent_ticket()
- if self is TicketsListRequestExpand.ACCOUNT_CREATOR:
- return account_creator()
- if self is TicketsListRequestExpand.ACCOUNT_CREATOR_PARENT_TICKET:
- return account_creator_parent_ticket()
- if self is TicketsListRequestExpand.ACCOUNT_PARENT_TICKET:
- return account_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES:
- return assignees()
- if self is TicketsListRequestExpand.ASSIGNEES_ACCOUNT:
- return assignees_account()
- if self is TicketsListRequestExpand.ASSIGNEES_ACCOUNT_CONTACT:
- return assignees_account_contact()
- if self is TicketsListRequestExpand.ASSIGNEES_ACCOUNT_CONTACT_CREATOR:
- return assignees_account_contact_creator()
- if self is TicketsListRequestExpand.ASSIGNEES_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return assignees_account_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_ACCOUNT_CONTACT_PARENT_TICKET:
- return assignees_account_contact_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_ACCOUNT_CREATOR:
- return assignees_account_creator()
- if self is TicketsListRequestExpand.ASSIGNEES_ACCOUNT_CREATOR_PARENT_TICKET:
- return assignees_account_creator_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_ACCOUNT_PARENT_TICKET:
- return assignees_account_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS:
- return assignees_collections()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT:
- return assignees_collections_account()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT:
- return assignees_collections_account_contact()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR:
- return assignees_collections_account_contact_creator()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return assignees_collections_account_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET:
- return assignees_collections_account_contact_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR:
- return assignees_collections_account_creator()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET:
- return assignees_collections_account_creator_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_PARENT_TICKET:
- return assignees_collections_account_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_CONTACT:
- return assignees_collections_contact()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_CONTACT_CREATOR:
- return assignees_collections_contact_creator()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET:
- return assignees_collections_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_CONTACT_PARENT_TICKET:
- return assignees_collections_contact_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_CREATOR:
- return assignees_collections_creator()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_CREATOR_PARENT_TICKET:
- return assignees_collections_creator_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_COLLECTIONS_PARENT_TICKET:
- return assignees_collections_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_CONTACT:
- return assignees_contact()
- if self is TicketsListRequestExpand.ASSIGNEES_CONTACT_CREATOR:
- return assignees_contact_creator()
- if self is TicketsListRequestExpand.ASSIGNEES_CONTACT_CREATOR_PARENT_TICKET:
- return assignees_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_CONTACT_PARENT_TICKET:
- return assignees_contact_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_CREATOR:
- return assignees_creator()
- if self is TicketsListRequestExpand.ASSIGNEES_CREATOR_PARENT_TICKET:
- return assignees_creator_parent_ticket()
- if self is TicketsListRequestExpand.ASSIGNEES_PARENT_TICKET:
- return assignees_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS:
- return attachments()
- if self is TicketsListRequestExpand.ATTACHMENTS_ACCOUNT:
- return attachments_account()
- if self is TicketsListRequestExpand.ATTACHMENTS_ACCOUNT_CONTACT:
- return attachments_account_contact()
- if self is TicketsListRequestExpand.ATTACHMENTS_ACCOUNT_CONTACT_CREATOR:
- return attachments_account_contact_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_account_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ACCOUNT_CONTACT_PARENT_TICKET:
- return attachments_account_contact_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ACCOUNT_CREATOR:
- return attachments_account_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ACCOUNT_CREATOR_PARENT_TICKET:
- return attachments_account_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ACCOUNT_PARENT_TICKET:
- return attachments_account_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES:
- return attachments_assignees()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT:
- return attachments_assignees_account()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT:
- return attachments_assignees_account_contact()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_CREATOR:
- return attachments_assignees_account_contact_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_assignees_account_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_PARENT_TICKET:
- return attachments_assignees_account_contact_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CREATOR:
- return attachments_assignees_account_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CREATOR_PARENT_TICKET:
- return attachments_assignees_account_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_PARENT_TICKET:
- return attachments_assignees_account_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS:
- return attachments_assignees_collections()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT:
- return attachments_assignees_collections_account()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT:
- return attachments_assignees_collections_account_contact()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR:
- return attachments_assignees_collections_account_contact_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_assignees_collections_account_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET:
- return attachments_assignees_collections_account_contact_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR:
- return attachments_assignees_collections_account_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET:
- return attachments_assignees_collections_account_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_PARENT_TICKET:
- return attachments_assignees_collections_account_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT:
- return attachments_assignees_collections_contact()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_CREATOR:
- return attachments_assignees_collections_contact_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_assignees_collections_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_PARENT_TICKET:
- return attachments_assignees_collections_contact_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CREATOR:
- return attachments_assignees_collections_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CREATOR_PARENT_TICKET:
- return attachments_assignees_collections_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_PARENT_TICKET:
- return attachments_assignees_collections_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_CONTACT:
- return attachments_assignees_contact()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_CONTACT_CREATOR:
- return attachments_assignees_contact_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_assignees_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_CONTACT_PARENT_TICKET:
- return attachments_assignees_contact_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_CREATOR:
- return attachments_assignees_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_CREATOR_PARENT_TICKET:
- return attachments_assignees_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_ASSIGNEES_PARENT_TICKET:
- return attachments_assignees_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS:
- return attachments_collections()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT:
- return attachments_collections_account()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT:
- return attachments_collections_account_contact()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_CREATOR:
- return attachments_collections_account_contact_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_collections_account_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET:
- return attachments_collections_account_contact_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CREATOR:
- return attachments_collections_account_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET:
- return attachments_collections_account_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_PARENT_TICKET:
- return attachments_collections_account_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_CONTACT:
- return attachments_collections_contact()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_CONTACT_CREATOR:
- return attachments_collections_contact_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_collections_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_CONTACT_PARENT_TICKET:
- return attachments_collections_contact_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_CREATOR:
- return attachments_collections_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_CREATOR_PARENT_TICKET:
- return attachments_collections_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_COLLECTIONS_PARENT_TICKET:
- return attachments_collections_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_CONTACT:
- return attachments_contact()
- if self is TicketsListRequestExpand.ATTACHMENTS_CONTACT_CREATOR:
- return attachments_contact_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_CONTACT_PARENT_TICKET:
- return attachments_contact_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_CREATOR:
- return attachments_creator()
- if self is TicketsListRequestExpand.ATTACHMENTS_CREATOR_PARENT_TICKET:
- return attachments_creator_parent_ticket()
- if self is TicketsListRequestExpand.ATTACHMENTS_PARENT_TICKET:
- return attachments_parent_ticket()
- if self is TicketsListRequestExpand.COLLECTIONS:
- return collections()
- if self is TicketsListRequestExpand.COLLECTIONS_ACCOUNT:
- return collections_account()
- if self is TicketsListRequestExpand.COLLECTIONS_ACCOUNT_CONTACT:
- return collections_account_contact()
- if self is TicketsListRequestExpand.COLLECTIONS_ACCOUNT_CONTACT_CREATOR:
- return collections_account_contact_creator()
- if self is TicketsListRequestExpand.COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return collections_account_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET:
- return collections_account_contact_parent_ticket()
- if self is TicketsListRequestExpand.COLLECTIONS_ACCOUNT_CREATOR:
- return collections_account_creator()
- if self is TicketsListRequestExpand.COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET:
- return collections_account_creator_parent_ticket()
- if self is TicketsListRequestExpand.COLLECTIONS_ACCOUNT_PARENT_TICKET:
- return collections_account_parent_ticket()
- if self is TicketsListRequestExpand.COLLECTIONS_CONTACT:
- return collections_contact()
- if self is TicketsListRequestExpand.COLLECTIONS_CONTACT_CREATOR:
- return collections_contact_creator()
- if self is TicketsListRequestExpand.COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET:
- return collections_contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.COLLECTIONS_CONTACT_PARENT_TICKET:
- return collections_contact_parent_ticket()
- if self is TicketsListRequestExpand.COLLECTIONS_CREATOR:
- return collections_creator()
- if self is TicketsListRequestExpand.COLLECTIONS_CREATOR_PARENT_TICKET:
- return collections_creator_parent_ticket()
- if self is TicketsListRequestExpand.COLLECTIONS_PARENT_TICKET:
- return collections_parent_ticket()
- if self is TicketsListRequestExpand.CONTACT:
- return contact()
- if self is TicketsListRequestExpand.CONTACT_CREATOR:
- return contact_creator()
- if self is TicketsListRequestExpand.CONTACT_CREATOR_PARENT_TICKET:
- return contact_creator_parent_ticket()
- if self is TicketsListRequestExpand.CONTACT_PARENT_TICKET:
- return contact_parent_ticket()
- if self is TicketsListRequestExpand.CREATOR:
- return creator()
- if self is TicketsListRequestExpand.CREATOR_PARENT_TICKET:
- return creator_parent_ticket()
- if self is TicketsListRequestExpand.PARENT_TICKET:
- return parent_ticket()
+TicketsListRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,contact",
+ "account,contact,creator",
+ "account,contact,creator,parent_ticket",
+ "account,contact,parent_ticket",
+ "account,creator",
+ "account,creator,parent_ticket",
+ "account,parent_ticket",
+ "assignees",
+ "assignees,account",
+ "assignees,account,contact",
+ "assignees,account,contact,creator",
+ "assignees,account,contact,creator,parent_ticket",
+ "assignees,account,contact,parent_ticket",
+ "assignees,account,creator",
+ "assignees,account,creator,parent_ticket",
+ "assignees,account,parent_ticket",
+ "assignees,collections",
+ "assignees,collections,account",
+ "assignees,collections,account,contact",
+ "assignees,collections,account,contact,creator",
+ "assignees,collections,account,contact,creator,parent_ticket",
+ "assignees,collections,account,contact,parent_ticket",
+ "assignees,collections,account,creator",
+ "assignees,collections,account,creator,parent_ticket",
+ "assignees,collections,account,parent_ticket",
+ "assignees,collections,contact",
+ "assignees,collections,contact,creator",
+ "assignees,collections,contact,creator,parent_ticket",
+ "assignees,collections,contact,parent_ticket",
+ "assignees,collections,creator",
+ "assignees,collections,creator,parent_ticket",
+ "assignees,collections,parent_ticket",
+ "assignees,contact",
+ "assignees,contact,creator",
+ "assignees,contact,creator,parent_ticket",
+ "assignees,contact,parent_ticket",
+ "assignees,creator",
+ "assignees,creator,parent_ticket",
+ "assignees,parent_ticket",
+ "attachments",
+ "attachments,account",
+ "attachments,account,contact",
+ "attachments,account,contact,creator",
+ "attachments,account,contact,creator,parent_ticket",
+ "attachments,account,contact,parent_ticket",
+ "attachments,account,creator",
+ "attachments,account,creator,parent_ticket",
+ "attachments,account,parent_ticket",
+ "attachments,assignees",
+ "attachments,assignees,account",
+ "attachments,assignees,account,contact",
+ "attachments,assignees,account,contact,creator",
+ "attachments,assignees,account,contact,creator,parent_ticket",
+ "attachments,assignees,account,contact,parent_ticket",
+ "attachments,assignees,account,creator",
+ "attachments,assignees,account,creator,parent_ticket",
+ "attachments,assignees,account,parent_ticket",
+ "attachments,assignees,collections",
+ "attachments,assignees,collections,account",
+ "attachments,assignees,collections,account,contact",
+ "attachments,assignees,collections,account,contact,creator",
+ "attachments,assignees,collections,account,contact,creator,parent_ticket",
+ "attachments,assignees,collections,account,contact,parent_ticket",
+ "attachments,assignees,collections,account,creator",
+ "attachments,assignees,collections,account,creator,parent_ticket",
+ "attachments,assignees,collections,account,parent_ticket",
+ "attachments,assignees,collections,contact",
+ "attachments,assignees,collections,contact,creator",
+ "attachments,assignees,collections,contact,creator,parent_ticket",
+ "attachments,assignees,collections,contact,parent_ticket",
+ "attachments,assignees,collections,creator",
+ "attachments,assignees,collections,creator,parent_ticket",
+ "attachments,assignees,collections,parent_ticket",
+ "attachments,assignees,contact",
+ "attachments,assignees,contact,creator",
+ "attachments,assignees,contact,creator,parent_ticket",
+ "attachments,assignees,contact,parent_ticket",
+ "attachments,assignees,creator",
+ "attachments,assignees,creator,parent_ticket",
+ "attachments,assignees,parent_ticket",
+ "attachments,collections",
+ "attachments,collections,account",
+ "attachments,collections,account,contact",
+ "attachments,collections,account,contact,creator",
+ "attachments,collections,account,contact,creator,parent_ticket",
+ "attachments,collections,account,contact,parent_ticket",
+ "attachments,collections,account,creator",
+ "attachments,collections,account,creator,parent_ticket",
+ "attachments,collections,account,parent_ticket",
+ "attachments,collections,contact",
+ "attachments,collections,contact,creator",
+ "attachments,collections,contact,creator,parent_ticket",
+ "attachments,collections,contact,parent_ticket",
+ "attachments,collections,creator",
+ "attachments,collections,creator,parent_ticket",
+ "attachments,collections,parent_ticket",
+ "attachments,contact",
+ "attachments,contact,creator",
+ "attachments,contact,creator,parent_ticket",
+ "attachments,contact,parent_ticket",
+ "attachments,creator",
+ "attachments,creator,parent_ticket",
+ "attachments,parent_ticket",
+ "collections",
+ "collections,account",
+ "collections,account,contact",
+ "collections,account,contact,creator",
+ "collections,account,contact,creator,parent_ticket",
+ "collections,account,contact,parent_ticket",
+ "collections,account,creator",
+ "collections,account,creator,parent_ticket",
+ "collections,account,parent_ticket",
+ "collections,contact",
+ "collections,contact,creator",
+ "collections,contact,creator,parent_ticket",
+ "collections,contact,parent_ticket",
+ "collections,creator",
+ "collections,creator,parent_ticket",
+ "collections,parent_ticket",
+ "contact",
+ "contact,creator",
+ "contact,creator,parent_ticket",
+ "contact,parent_ticket",
+ "creator",
+ "creator,parent_ticket",
+ "parent_ticket",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_priority.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_priority.py
index db455e45..74f3e193 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_priority.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_priority.py
@@ -1,29 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsListRequestPriority(str, enum.Enum):
- HIGH = "HIGH"
- LOW = "LOW"
- NORMAL = "NORMAL"
- URGENT = "URGENT"
-
- def visit(
- self,
- high: typing.Callable[[], T_Result],
- low: typing.Callable[[], T_Result],
- normal: typing.Callable[[], T_Result],
- urgent: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsListRequestPriority.HIGH:
- return high()
- if self is TicketsListRequestPriority.LOW:
- return low()
- if self is TicketsListRequestPriority.NORMAL:
- return normal()
- if self is TicketsListRequestPriority.URGENT:
- return urgent()
+TicketsListRequestPriority = typing.Union[typing.Literal["HIGH", "LOW", "NORMAL", "URGENT"], typing.Any]
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_remote_fields.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_remote_fields.py
index f12ce7d7..5fd53efe 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_remote_fields.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_remote_fields.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsListRequestRemoteFields(str, enum.Enum):
- PRIORITY = "priority"
- PRIORITY_STATUS = "priority,status"
- PRIORITY_STATUS_TICKET_TYPE = "priority,status,ticket_type"
- PRIORITY_TICKET_TYPE = "priority,ticket_type"
- STATUS = "status"
- STATUS_TICKET_TYPE = "status,ticket_type"
- TICKET_TYPE = "ticket_type"
-
- def visit(
- self,
- priority: typing.Callable[[], T_Result],
- priority_status: typing.Callable[[], T_Result],
- priority_status_ticket_type: typing.Callable[[], T_Result],
- priority_ticket_type: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- status_ticket_type: typing.Callable[[], T_Result],
- ticket_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsListRequestRemoteFields.PRIORITY:
- return priority()
- if self is TicketsListRequestRemoteFields.PRIORITY_STATUS:
- return priority_status()
- if self is TicketsListRequestRemoteFields.PRIORITY_STATUS_TICKET_TYPE:
- return priority_status_ticket_type()
- if self is TicketsListRequestRemoteFields.PRIORITY_TICKET_TYPE:
- return priority_ticket_type()
- if self is TicketsListRequestRemoteFields.STATUS:
- return status()
- if self is TicketsListRequestRemoteFields.STATUS_TICKET_TYPE:
- return status_ticket_type()
- if self is TicketsListRequestRemoteFields.TICKET_TYPE:
- return ticket_type()
+TicketsListRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "priority",
+ "priority,status",
+ "priority,status,ticket_type",
+ "priority,ticket_type",
+ "status",
+ "status,ticket_type",
+ "ticket_type",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_show_enum_origins.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_show_enum_origins.py
index d077c628..84a9808a 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_show_enum_origins.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_show_enum_origins.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsListRequestShowEnumOrigins(str, enum.Enum):
- PRIORITY = "priority"
- PRIORITY_STATUS = "priority,status"
- PRIORITY_STATUS_TICKET_TYPE = "priority,status,ticket_type"
- PRIORITY_TICKET_TYPE = "priority,ticket_type"
- STATUS = "status"
- STATUS_TICKET_TYPE = "status,ticket_type"
- TICKET_TYPE = "ticket_type"
-
- def visit(
- self,
- priority: typing.Callable[[], T_Result],
- priority_status: typing.Callable[[], T_Result],
- priority_status_ticket_type: typing.Callable[[], T_Result],
- priority_ticket_type: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- status_ticket_type: typing.Callable[[], T_Result],
- ticket_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsListRequestShowEnumOrigins.PRIORITY:
- return priority()
- if self is TicketsListRequestShowEnumOrigins.PRIORITY_STATUS:
- return priority_status()
- if self is TicketsListRequestShowEnumOrigins.PRIORITY_STATUS_TICKET_TYPE:
- return priority_status_ticket_type()
- if self is TicketsListRequestShowEnumOrigins.PRIORITY_TICKET_TYPE:
- return priority_ticket_type()
- if self is TicketsListRequestShowEnumOrigins.STATUS:
- return status()
- if self is TicketsListRequestShowEnumOrigins.STATUS_TICKET_TYPE:
- return status_ticket_type()
- if self is TicketsListRequestShowEnumOrigins.TICKET_TYPE:
- return ticket_type()
+TicketsListRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "priority",
+ "priority,status",
+ "priority,status,ticket_type",
+ "priority,ticket_type",
+ "status",
+ "status,ticket_type",
+ "ticket_type",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py
index 4209dca7..631a2265 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_list_request_status.py
@@ -1,29 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsListRequestStatus(str, enum.Enum):
- CLOSED = "CLOSED"
- IN_PROGRESS = "IN_PROGRESS"
- ON_HOLD = "ON_HOLD"
- OPEN = "OPEN"
-
- def visit(
- self,
- closed: typing.Callable[[], T_Result],
- in_progress: typing.Callable[[], T_Result],
- on_hold: typing.Callable[[], T_Result],
- open: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsListRequestStatus.CLOSED:
- return closed()
- if self is TicketsListRequestStatus.IN_PROGRESS:
- return in_progress()
- if self is TicketsListRequestStatus.ON_HOLD:
- return on_hold()
- if self is TicketsListRequestStatus.OPEN:
- return open()
+TicketsListRequestStatus = typing.Union[typing.Literal["CLOSED", "IN_PROGRESS", "ON_HOLD", "OPEN"], typing.Any]
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_expand.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_expand.py
index 95988219..de97d62b 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_expand.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_expand.py
@@ -1,537 +1,136 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsRetrieveRequestExpand(str, enum.Enum):
- ACCOUNT = "account"
- ACCOUNT_CONTACT = "account,contact"
- ACCOUNT_CONTACT_CREATOR = "account,contact,creator"
- ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = "account,contact,creator,parent_ticket"
- ACCOUNT_CONTACT_PARENT_TICKET = "account,contact,parent_ticket"
- ACCOUNT_CREATOR = "account,creator"
- ACCOUNT_CREATOR_PARENT_TICKET = "account,creator,parent_ticket"
- ACCOUNT_PARENT_TICKET = "account,parent_ticket"
- ASSIGNEES = "assignees"
- ASSIGNEES_ACCOUNT = "assignees,account"
- ASSIGNEES_ACCOUNT_CONTACT = "assignees,account,contact"
- ASSIGNEES_ACCOUNT_CONTACT_CREATOR = "assignees,account,contact,creator"
- ASSIGNEES_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = "assignees,account,contact,creator,parent_ticket"
- ASSIGNEES_ACCOUNT_CONTACT_PARENT_TICKET = "assignees,account,contact,parent_ticket"
- ASSIGNEES_ACCOUNT_CREATOR = "assignees,account,creator"
- ASSIGNEES_ACCOUNT_CREATOR_PARENT_TICKET = "assignees,account,creator,parent_ticket"
- ASSIGNEES_ACCOUNT_PARENT_TICKET = "assignees,account,parent_ticket"
- ASSIGNEES_COLLECTIONS = "assignees,collections"
- ASSIGNEES_COLLECTIONS_ACCOUNT = "assignees,collections,account"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT = "assignees,collections,account,contact"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR = "assignees,collections,account,contact,creator"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = (
- "assignees,collections,account,contact,creator,parent_ticket"
- )
- ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET = "assignees,collections,account,contact,parent_ticket"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR = "assignees,collections,account,creator"
- ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET = "assignees,collections,account,creator,parent_ticket"
- ASSIGNEES_COLLECTIONS_ACCOUNT_PARENT_TICKET = "assignees,collections,account,parent_ticket"
- ASSIGNEES_COLLECTIONS_CONTACT = "assignees,collections,contact"
- ASSIGNEES_COLLECTIONS_CONTACT_CREATOR = "assignees,collections,contact,creator"
- ASSIGNEES_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET = "assignees,collections,contact,creator,parent_ticket"
- ASSIGNEES_COLLECTIONS_CONTACT_PARENT_TICKET = "assignees,collections,contact,parent_ticket"
- ASSIGNEES_COLLECTIONS_CREATOR = "assignees,collections,creator"
- ASSIGNEES_COLLECTIONS_CREATOR_PARENT_TICKET = "assignees,collections,creator,parent_ticket"
- ASSIGNEES_COLLECTIONS_PARENT_TICKET = "assignees,collections,parent_ticket"
- ASSIGNEES_CONTACT = "assignees,contact"
- ASSIGNEES_CONTACT_CREATOR = "assignees,contact,creator"
- ASSIGNEES_CONTACT_CREATOR_PARENT_TICKET = "assignees,contact,creator,parent_ticket"
- ASSIGNEES_CONTACT_PARENT_TICKET = "assignees,contact,parent_ticket"
- ASSIGNEES_CREATOR = "assignees,creator"
- ASSIGNEES_CREATOR_PARENT_TICKET = "assignees,creator,parent_ticket"
- ASSIGNEES_PARENT_TICKET = "assignees,parent_ticket"
- ATTACHMENTS = "attachments"
- ATTACHMENTS_ACCOUNT = "attachments,account"
- ATTACHMENTS_ACCOUNT_CONTACT = "attachments,account,contact"
- ATTACHMENTS_ACCOUNT_CONTACT_CREATOR = "attachments,account,contact,creator"
- ATTACHMENTS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = "attachments,account,contact,creator,parent_ticket"
- ATTACHMENTS_ACCOUNT_CONTACT_PARENT_TICKET = "attachments,account,contact,parent_ticket"
- ATTACHMENTS_ACCOUNT_CREATOR = "attachments,account,creator"
- ATTACHMENTS_ACCOUNT_CREATOR_PARENT_TICKET = "attachments,account,creator,parent_ticket"
- ATTACHMENTS_ACCOUNT_PARENT_TICKET = "attachments,account,parent_ticket"
- ATTACHMENTS_ASSIGNEES = "attachments,assignees"
- ATTACHMENTS_ASSIGNEES_ACCOUNT = "attachments,assignees,account"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT = "attachments,assignees,account,contact"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_CREATOR = "attachments,assignees,account,contact,creator"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = (
- "attachments,assignees,account,contact,creator,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_PARENT_TICKET = "attachments,assignees,account,contact,parent_ticket"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CREATOR = "attachments,assignees,account,creator"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_CREATOR_PARENT_TICKET = "attachments,assignees,account,creator,parent_ticket"
- ATTACHMENTS_ASSIGNEES_ACCOUNT_PARENT_TICKET = "attachments,assignees,account,parent_ticket"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS = "attachments,assignees,collections"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT = "attachments,assignees,collections,account"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT = "attachments,assignees,collections,account,contact"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR = (
- "attachments,assignees,collections,account,contact,creator"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = (
- "attachments,assignees,collections,account,contact,creator,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET = (
- "attachments,assignees,collections,account,contact,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR = "attachments,assignees,collections,account,creator"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET = (
- "attachments,assignees,collections,account,creator,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_PARENT_TICKET = "attachments,assignees,collections,account,parent_ticket"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT = "attachments,assignees,collections,contact"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_CREATOR = "attachments,assignees,collections,contact,creator"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET = (
- "attachments,assignees,collections,contact,creator,parent_ticket"
- )
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_PARENT_TICKET = "attachments,assignees,collections,contact,parent_ticket"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CREATOR = "attachments,assignees,collections,creator"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_CREATOR_PARENT_TICKET = "attachments,assignees,collections,creator,parent_ticket"
- ATTACHMENTS_ASSIGNEES_COLLECTIONS_PARENT_TICKET = "attachments,assignees,collections,parent_ticket"
- ATTACHMENTS_ASSIGNEES_CONTACT = "attachments,assignees,contact"
- ATTACHMENTS_ASSIGNEES_CONTACT_CREATOR = "attachments,assignees,contact,creator"
- ATTACHMENTS_ASSIGNEES_CONTACT_CREATOR_PARENT_TICKET = "attachments,assignees,contact,creator,parent_ticket"
- ATTACHMENTS_ASSIGNEES_CONTACT_PARENT_TICKET = "attachments,assignees,contact,parent_ticket"
- ATTACHMENTS_ASSIGNEES_CREATOR = "attachments,assignees,creator"
- ATTACHMENTS_ASSIGNEES_CREATOR_PARENT_TICKET = "attachments,assignees,creator,parent_ticket"
- ATTACHMENTS_ASSIGNEES_PARENT_TICKET = "attachments,assignees,parent_ticket"
- ATTACHMENTS_COLLECTIONS = "attachments,collections"
- ATTACHMENTS_COLLECTIONS_ACCOUNT = "attachments,collections,account"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT = "attachments,collections,account,contact"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_CREATOR = "attachments,collections,account,contact,creator"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = (
- "attachments,collections,account,contact,creator,parent_ticket"
- )
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET = "attachments,collections,account,contact,parent_ticket"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CREATOR = "attachments,collections,account,creator"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET = "attachments,collections,account,creator,parent_ticket"
- ATTACHMENTS_COLLECTIONS_ACCOUNT_PARENT_TICKET = "attachments,collections,account,parent_ticket"
- ATTACHMENTS_COLLECTIONS_CONTACT = "attachments,collections,contact"
- ATTACHMENTS_COLLECTIONS_CONTACT_CREATOR = "attachments,collections,contact,creator"
- ATTACHMENTS_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET = "attachments,collections,contact,creator,parent_ticket"
- ATTACHMENTS_COLLECTIONS_CONTACT_PARENT_TICKET = "attachments,collections,contact,parent_ticket"
- ATTACHMENTS_COLLECTIONS_CREATOR = "attachments,collections,creator"
- ATTACHMENTS_COLLECTIONS_CREATOR_PARENT_TICKET = "attachments,collections,creator,parent_ticket"
- ATTACHMENTS_COLLECTIONS_PARENT_TICKET = "attachments,collections,parent_ticket"
- ATTACHMENTS_CONTACT = "attachments,contact"
- ATTACHMENTS_CONTACT_CREATOR = "attachments,contact,creator"
- ATTACHMENTS_CONTACT_CREATOR_PARENT_TICKET = "attachments,contact,creator,parent_ticket"
- ATTACHMENTS_CONTACT_PARENT_TICKET = "attachments,contact,parent_ticket"
- ATTACHMENTS_CREATOR = "attachments,creator"
- ATTACHMENTS_CREATOR_PARENT_TICKET = "attachments,creator,parent_ticket"
- ATTACHMENTS_PARENT_TICKET = "attachments,parent_ticket"
- COLLECTIONS = "collections"
- COLLECTIONS_ACCOUNT = "collections,account"
- COLLECTIONS_ACCOUNT_CONTACT = "collections,account,contact"
- COLLECTIONS_ACCOUNT_CONTACT_CREATOR = "collections,account,contact,creator"
- COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET = "collections,account,contact,creator,parent_ticket"
- COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET = "collections,account,contact,parent_ticket"
- COLLECTIONS_ACCOUNT_CREATOR = "collections,account,creator"
- COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET = "collections,account,creator,parent_ticket"
- COLLECTIONS_ACCOUNT_PARENT_TICKET = "collections,account,parent_ticket"
- COLLECTIONS_CONTACT = "collections,contact"
- COLLECTIONS_CONTACT_CREATOR = "collections,contact,creator"
- COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET = "collections,contact,creator,parent_ticket"
- COLLECTIONS_CONTACT_PARENT_TICKET = "collections,contact,parent_ticket"
- COLLECTIONS_CREATOR = "collections,creator"
- COLLECTIONS_CREATOR_PARENT_TICKET = "collections,creator,parent_ticket"
- COLLECTIONS_PARENT_TICKET = "collections,parent_ticket"
- CONTACT = "contact"
- CONTACT_CREATOR = "contact,creator"
- CONTACT_CREATOR_PARENT_TICKET = "contact,creator,parent_ticket"
- CONTACT_PARENT_TICKET = "contact,parent_ticket"
- CREATOR = "creator"
- CREATOR_PARENT_TICKET = "creator,parent_ticket"
- PARENT_TICKET = "parent_ticket"
-
- def visit(
- self,
- account: typing.Callable[[], T_Result],
- account_contact: typing.Callable[[], T_Result],
- account_contact_creator: typing.Callable[[], T_Result],
- account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- account_contact_parent_ticket: typing.Callable[[], T_Result],
- account_creator: typing.Callable[[], T_Result],
- account_creator_parent_ticket: typing.Callable[[], T_Result],
- account_parent_ticket: typing.Callable[[], T_Result],
- assignees: typing.Callable[[], T_Result],
- assignees_account: typing.Callable[[], T_Result],
- assignees_account_contact: typing.Callable[[], T_Result],
- assignees_account_contact_creator: typing.Callable[[], T_Result],
- assignees_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_account_contact_parent_ticket: typing.Callable[[], T_Result],
- assignees_account_creator: typing.Callable[[], T_Result],
- assignees_account_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_account_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections: typing.Callable[[], T_Result],
- assignees_collections_account: typing.Callable[[], T_Result],
- assignees_collections_account_contact: typing.Callable[[], T_Result],
- assignees_collections_account_contact_creator: typing.Callable[[], T_Result],
- assignees_collections_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_account_contact_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_account_creator: typing.Callable[[], T_Result],
- assignees_collections_account_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_account_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_contact: typing.Callable[[], T_Result],
- assignees_collections_contact_creator: typing.Callable[[], T_Result],
- assignees_collections_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_contact_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_creator: typing.Callable[[], T_Result],
- assignees_collections_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_collections_parent_ticket: typing.Callable[[], T_Result],
- assignees_contact: typing.Callable[[], T_Result],
- assignees_contact_creator: typing.Callable[[], T_Result],
- assignees_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_contact_parent_ticket: typing.Callable[[], T_Result],
- assignees_creator: typing.Callable[[], T_Result],
- assignees_creator_parent_ticket: typing.Callable[[], T_Result],
- assignees_parent_ticket: typing.Callable[[], T_Result],
- attachments: typing.Callable[[], T_Result],
- attachments_account: typing.Callable[[], T_Result],
- attachments_account_contact: typing.Callable[[], T_Result],
- attachments_account_contact_creator: typing.Callable[[], T_Result],
- attachments_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_account_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_account_creator: typing.Callable[[], T_Result],
- attachments_account_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_account_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees: typing.Callable[[], T_Result],
- attachments_assignees_account: typing.Callable[[], T_Result],
- attachments_assignees_account_contact: typing.Callable[[], T_Result],
- attachments_assignees_account_contact_creator: typing.Callable[[], T_Result],
- attachments_assignees_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_account_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_account_creator: typing.Callable[[], T_Result],
- attachments_assignees_account_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_account_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections: typing.Callable[[], T_Result],
- attachments_assignees_collections_account: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_contact: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_contact_creator: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_creator: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_account_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_contact: typing.Callable[[], T_Result],
- attachments_assignees_collections_contact_creator: typing.Callable[[], T_Result],
- attachments_assignees_collections_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_creator: typing.Callable[[], T_Result],
- attachments_assignees_collections_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_collections_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_contact: typing.Callable[[], T_Result],
- attachments_assignees_contact_creator: typing.Callable[[], T_Result],
- attachments_assignees_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_creator: typing.Callable[[], T_Result],
- attachments_assignees_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_assignees_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections: typing.Callable[[], T_Result],
- attachments_collections_account: typing.Callable[[], T_Result],
- attachments_collections_account_contact: typing.Callable[[], T_Result],
- attachments_collections_account_contact_creator: typing.Callable[[], T_Result],
- attachments_collections_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_account_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_account_creator: typing.Callable[[], T_Result],
- attachments_collections_account_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_account_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_contact: typing.Callable[[], T_Result],
- attachments_collections_contact_creator: typing.Callable[[], T_Result],
- attachments_collections_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_creator: typing.Callable[[], T_Result],
- attachments_collections_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_collections_parent_ticket: typing.Callable[[], T_Result],
- attachments_contact: typing.Callable[[], T_Result],
- attachments_contact_creator: typing.Callable[[], T_Result],
- attachments_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_contact_parent_ticket: typing.Callable[[], T_Result],
- attachments_creator: typing.Callable[[], T_Result],
- attachments_creator_parent_ticket: typing.Callable[[], T_Result],
- attachments_parent_ticket: typing.Callable[[], T_Result],
- collections: typing.Callable[[], T_Result],
- collections_account: typing.Callable[[], T_Result],
- collections_account_contact: typing.Callable[[], T_Result],
- collections_account_contact_creator: typing.Callable[[], T_Result],
- collections_account_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- collections_account_contact_parent_ticket: typing.Callable[[], T_Result],
- collections_account_creator: typing.Callable[[], T_Result],
- collections_account_creator_parent_ticket: typing.Callable[[], T_Result],
- collections_account_parent_ticket: typing.Callable[[], T_Result],
- collections_contact: typing.Callable[[], T_Result],
- collections_contact_creator: typing.Callable[[], T_Result],
- collections_contact_creator_parent_ticket: typing.Callable[[], T_Result],
- collections_contact_parent_ticket: typing.Callable[[], T_Result],
- collections_creator: typing.Callable[[], T_Result],
- collections_creator_parent_ticket: typing.Callable[[], T_Result],
- collections_parent_ticket: typing.Callable[[], T_Result],
- contact: typing.Callable[[], T_Result],
- contact_creator: typing.Callable[[], T_Result],
- contact_creator_parent_ticket: typing.Callable[[], T_Result],
- contact_parent_ticket: typing.Callable[[], T_Result],
- creator: typing.Callable[[], T_Result],
- creator_parent_ticket: typing.Callable[[], T_Result],
- parent_ticket: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsRetrieveRequestExpand.ACCOUNT:
- return account()
- if self is TicketsRetrieveRequestExpand.ACCOUNT_CONTACT:
- return account_contact()
- if self is TicketsRetrieveRequestExpand.ACCOUNT_CONTACT_CREATOR:
- return account_contact_creator()
- if self is TicketsRetrieveRequestExpand.ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return account_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ACCOUNT_CONTACT_PARENT_TICKET:
- return account_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ACCOUNT_CREATOR:
- return account_creator()
- if self is TicketsRetrieveRequestExpand.ACCOUNT_CREATOR_PARENT_TICKET:
- return account_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ACCOUNT_PARENT_TICKET:
- return account_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES:
- return assignees()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_ACCOUNT:
- return assignees_account()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_ACCOUNT_CONTACT:
- return assignees_account_contact()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_ACCOUNT_CONTACT_CREATOR:
- return assignees_account_contact_creator()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return assignees_account_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_ACCOUNT_CONTACT_PARENT_TICKET:
- return assignees_account_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_ACCOUNT_CREATOR:
- return assignees_account_creator()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_ACCOUNT_CREATOR_PARENT_TICKET:
- return assignees_account_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_ACCOUNT_PARENT_TICKET:
- return assignees_account_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS:
- return assignees_collections()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT:
- return assignees_collections_account()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT:
- return assignees_collections_account_contact()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR:
- return assignees_collections_account_contact_creator()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return assignees_collections_account_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET:
- return assignees_collections_account_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR:
- return assignees_collections_account_creator()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET:
- return assignees_collections_account_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_ACCOUNT_PARENT_TICKET:
- return assignees_collections_account_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_CONTACT:
- return assignees_collections_contact()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_CONTACT_CREATOR:
- return assignees_collections_contact_creator()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET:
- return assignees_collections_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_CONTACT_PARENT_TICKET:
- return assignees_collections_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_CREATOR:
- return assignees_collections_creator()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_CREATOR_PARENT_TICKET:
- return assignees_collections_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_COLLECTIONS_PARENT_TICKET:
- return assignees_collections_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_CONTACT:
- return assignees_contact()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_CONTACT_CREATOR:
- return assignees_contact_creator()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_CONTACT_CREATOR_PARENT_TICKET:
- return assignees_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_CONTACT_PARENT_TICKET:
- return assignees_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_CREATOR:
- return assignees_creator()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_CREATOR_PARENT_TICKET:
- return assignees_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ASSIGNEES_PARENT_TICKET:
- return assignees_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS:
- return attachments()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ACCOUNT:
- return attachments_account()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ACCOUNT_CONTACT:
- return attachments_account_contact()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ACCOUNT_CONTACT_CREATOR:
- return attachments_account_contact_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_account_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ACCOUNT_CONTACT_PARENT_TICKET:
- return attachments_account_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ACCOUNT_CREATOR:
- return attachments_account_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ACCOUNT_CREATOR_PARENT_TICKET:
- return attachments_account_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ACCOUNT_PARENT_TICKET:
- return attachments_account_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES:
- return attachments_assignees()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT:
- return attachments_assignees_account()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT:
- return attachments_assignees_account_contact()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_CREATOR:
- return attachments_assignees_account_contact_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_assignees_account_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CONTACT_PARENT_TICKET:
- return attachments_assignees_account_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CREATOR:
- return attachments_assignees_account_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_CREATOR_PARENT_TICKET:
- return attachments_assignees_account_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_ACCOUNT_PARENT_TICKET:
- return attachments_assignees_account_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS:
- return attachments_assignees_collections()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT:
- return attachments_assignees_collections_account()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT:
- return attachments_assignees_collections_account_contact()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR:
- return attachments_assignees_collections_account_contact_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_assignees_collections_account_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET:
- return attachments_assignees_collections_account_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR:
- return attachments_assignees_collections_account_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET:
- return attachments_assignees_collections_account_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_ACCOUNT_PARENT_TICKET:
- return attachments_assignees_collections_account_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT:
- return attachments_assignees_collections_contact()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_CREATOR:
- return attachments_assignees_collections_contact_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_assignees_collections_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CONTACT_PARENT_TICKET:
- return attachments_assignees_collections_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CREATOR:
- return attachments_assignees_collections_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_CREATOR_PARENT_TICKET:
- return attachments_assignees_collections_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_COLLECTIONS_PARENT_TICKET:
- return attachments_assignees_collections_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_CONTACT:
- return attachments_assignees_contact()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_CONTACT_CREATOR:
- return attachments_assignees_contact_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_assignees_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_CONTACT_PARENT_TICKET:
- return attachments_assignees_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_CREATOR:
- return attachments_assignees_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_CREATOR_PARENT_TICKET:
- return attachments_assignees_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_ASSIGNEES_PARENT_TICKET:
- return attachments_assignees_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS:
- return attachments_collections()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT:
- return attachments_collections_account()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT:
- return attachments_collections_account_contact()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_CREATOR:
- return attachments_collections_account_contact_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_collections_account_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET:
- return attachments_collections_account_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CREATOR:
- return attachments_collections_account_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET:
- return attachments_collections_account_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_ACCOUNT_PARENT_TICKET:
- return attachments_collections_account_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_CONTACT:
- return attachments_collections_contact()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_CONTACT_CREATOR:
- return attachments_collections_contact_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_collections_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_CONTACT_PARENT_TICKET:
- return attachments_collections_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_CREATOR:
- return attachments_collections_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_CREATOR_PARENT_TICKET:
- return attachments_collections_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_COLLECTIONS_PARENT_TICKET:
- return attachments_collections_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_CONTACT:
- return attachments_contact()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_CONTACT_CREATOR:
- return attachments_contact_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_CONTACT_CREATOR_PARENT_TICKET:
- return attachments_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_CONTACT_PARENT_TICKET:
- return attachments_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_CREATOR:
- return attachments_creator()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_CREATOR_PARENT_TICKET:
- return attachments_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.ATTACHMENTS_PARENT_TICKET:
- return attachments_parent_ticket()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS:
- return collections()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_ACCOUNT:
- return collections_account()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_ACCOUNT_CONTACT:
- return collections_account_contact()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_ACCOUNT_CONTACT_CREATOR:
- return collections_account_contact_creator()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_ACCOUNT_CONTACT_CREATOR_PARENT_TICKET:
- return collections_account_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_ACCOUNT_CONTACT_PARENT_TICKET:
- return collections_account_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_ACCOUNT_CREATOR:
- return collections_account_creator()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_ACCOUNT_CREATOR_PARENT_TICKET:
- return collections_account_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_ACCOUNT_PARENT_TICKET:
- return collections_account_parent_ticket()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_CONTACT:
- return collections_contact()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_CONTACT_CREATOR:
- return collections_contact_creator()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_CONTACT_CREATOR_PARENT_TICKET:
- return collections_contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_CONTACT_PARENT_TICKET:
- return collections_contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_CREATOR:
- return collections_creator()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_CREATOR_PARENT_TICKET:
- return collections_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.COLLECTIONS_PARENT_TICKET:
- return collections_parent_ticket()
- if self is TicketsRetrieveRequestExpand.CONTACT:
- return contact()
- if self is TicketsRetrieveRequestExpand.CONTACT_CREATOR:
- return contact_creator()
- if self is TicketsRetrieveRequestExpand.CONTACT_CREATOR_PARENT_TICKET:
- return contact_creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.CONTACT_PARENT_TICKET:
- return contact_parent_ticket()
- if self is TicketsRetrieveRequestExpand.CREATOR:
- return creator()
- if self is TicketsRetrieveRequestExpand.CREATOR_PARENT_TICKET:
- return creator_parent_ticket()
- if self is TicketsRetrieveRequestExpand.PARENT_TICKET:
- return parent_ticket()
+TicketsRetrieveRequestExpand = typing.Union[
+ typing.Literal[
+ "account",
+ "account,contact",
+ "account,contact,creator",
+ "account,contact,creator,parent_ticket",
+ "account,contact,parent_ticket",
+ "account,creator",
+ "account,creator,parent_ticket",
+ "account,parent_ticket",
+ "assignees",
+ "assignees,account",
+ "assignees,account,contact",
+ "assignees,account,contact,creator",
+ "assignees,account,contact,creator,parent_ticket",
+ "assignees,account,contact,parent_ticket",
+ "assignees,account,creator",
+ "assignees,account,creator,parent_ticket",
+ "assignees,account,parent_ticket",
+ "assignees,collections",
+ "assignees,collections,account",
+ "assignees,collections,account,contact",
+ "assignees,collections,account,contact,creator",
+ "assignees,collections,account,contact,creator,parent_ticket",
+ "assignees,collections,account,contact,parent_ticket",
+ "assignees,collections,account,creator",
+ "assignees,collections,account,creator,parent_ticket",
+ "assignees,collections,account,parent_ticket",
+ "assignees,collections,contact",
+ "assignees,collections,contact,creator",
+ "assignees,collections,contact,creator,parent_ticket",
+ "assignees,collections,contact,parent_ticket",
+ "assignees,collections,creator",
+ "assignees,collections,creator,parent_ticket",
+ "assignees,collections,parent_ticket",
+ "assignees,contact",
+ "assignees,contact,creator",
+ "assignees,contact,creator,parent_ticket",
+ "assignees,contact,parent_ticket",
+ "assignees,creator",
+ "assignees,creator,parent_ticket",
+ "assignees,parent_ticket",
+ "attachments",
+ "attachments,account",
+ "attachments,account,contact",
+ "attachments,account,contact,creator",
+ "attachments,account,contact,creator,parent_ticket",
+ "attachments,account,contact,parent_ticket",
+ "attachments,account,creator",
+ "attachments,account,creator,parent_ticket",
+ "attachments,account,parent_ticket",
+ "attachments,assignees",
+ "attachments,assignees,account",
+ "attachments,assignees,account,contact",
+ "attachments,assignees,account,contact,creator",
+ "attachments,assignees,account,contact,creator,parent_ticket",
+ "attachments,assignees,account,contact,parent_ticket",
+ "attachments,assignees,account,creator",
+ "attachments,assignees,account,creator,parent_ticket",
+ "attachments,assignees,account,parent_ticket",
+ "attachments,assignees,collections",
+ "attachments,assignees,collections,account",
+ "attachments,assignees,collections,account,contact",
+ "attachments,assignees,collections,account,contact,creator",
+ "attachments,assignees,collections,account,contact,creator,parent_ticket",
+ "attachments,assignees,collections,account,contact,parent_ticket",
+ "attachments,assignees,collections,account,creator",
+ "attachments,assignees,collections,account,creator,parent_ticket",
+ "attachments,assignees,collections,account,parent_ticket",
+ "attachments,assignees,collections,contact",
+ "attachments,assignees,collections,contact,creator",
+ "attachments,assignees,collections,contact,creator,parent_ticket",
+ "attachments,assignees,collections,contact,parent_ticket",
+ "attachments,assignees,collections,creator",
+ "attachments,assignees,collections,creator,parent_ticket",
+ "attachments,assignees,collections,parent_ticket",
+ "attachments,assignees,contact",
+ "attachments,assignees,contact,creator",
+ "attachments,assignees,contact,creator,parent_ticket",
+ "attachments,assignees,contact,parent_ticket",
+ "attachments,assignees,creator",
+ "attachments,assignees,creator,parent_ticket",
+ "attachments,assignees,parent_ticket",
+ "attachments,collections",
+ "attachments,collections,account",
+ "attachments,collections,account,contact",
+ "attachments,collections,account,contact,creator",
+ "attachments,collections,account,contact,creator,parent_ticket",
+ "attachments,collections,account,contact,parent_ticket",
+ "attachments,collections,account,creator",
+ "attachments,collections,account,creator,parent_ticket",
+ "attachments,collections,account,parent_ticket",
+ "attachments,collections,contact",
+ "attachments,collections,contact,creator",
+ "attachments,collections,contact,creator,parent_ticket",
+ "attachments,collections,contact,parent_ticket",
+ "attachments,collections,creator",
+ "attachments,collections,creator,parent_ticket",
+ "attachments,collections,parent_ticket",
+ "attachments,contact",
+ "attachments,contact,creator",
+ "attachments,contact,creator,parent_ticket",
+ "attachments,contact,parent_ticket",
+ "attachments,creator",
+ "attachments,creator,parent_ticket",
+ "attachments,parent_ticket",
+ "collections",
+ "collections,account",
+ "collections,account,contact",
+ "collections,account,contact,creator",
+ "collections,account,contact,creator,parent_ticket",
+ "collections,account,contact,parent_ticket",
+ "collections,account,creator",
+ "collections,account,creator,parent_ticket",
+ "collections,account,parent_ticket",
+ "collections,contact",
+ "collections,contact,creator",
+ "collections,contact,creator,parent_ticket",
+ "collections,contact,parent_ticket",
+ "collections,creator",
+ "collections,creator,parent_ticket",
+ "collections,parent_ticket",
+ "contact",
+ "contact,creator",
+ "contact,creator,parent_ticket",
+ "contact,parent_ticket",
+ "creator",
+ "creator,parent_ticket",
+ "parent_ticket",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_remote_fields.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_remote_fields.py
index 18dfa4e7..524d59df 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_remote_fields.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_remote_fields.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsRetrieveRequestRemoteFields(str, enum.Enum):
- PRIORITY = "priority"
- PRIORITY_STATUS = "priority,status"
- PRIORITY_STATUS_TICKET_TYPE = "priority,status,ticket_type"
- PRIORITY_TICKET_TYPE = "priority,ticket_type"
- STATUS = "status"
- STATUS_TICKET_TYPE = "status,ticket_type"
- TICKET_TYPE = "ticket_type"
-
- def visit(
- self,
- priority: typing.Callable[[], T_Result],
- priority_status: typing.Callable[[], T_Result],
- priority_status_ticket_type: typing.Callable[[], T_Result],
- priority_ticket_type: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- status_ticket_type: typing.Callable[[], T_Result],
- ticket_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsRetrieveRequestRemoteFields.PRIORITY:
- return priority()
- if self is TicketsRetrieveRequestRemoteFields.PRIORITY_STATUS:
- return priority_status()
- if self is TicketsRetrieveRequestRemoteFields.PRIORITY_STATUS_TICKET_TYPE:
- return priority_status_ticket_type()
- if self is TicketsRetrieveRequestRemoteFields.PRIORITY_TICKET_TYPE:
- return priority_ticket_type()
- if self is TicketsRetrieveRequestRemoteFields.STATUS:
- return status()
- if self is TicketsRetrieveRequestRemoteFields.STATUS_TICKET_TYPE:
- return status_ticket_type()
- if self is TicketsRetrieveRequestRemoteFields.TICKET_TYPE:
- return ticket_type()
+TicketsRetrieveRequestRemoteFields = typing.Union[
+ typing.Literal[
+ "priority",
+ "priority,status",
+ "priority,status,ticket_type",
+ "priority,ticket_type",
+ "status",
+ "status,ticket_type",
+ "ticket_type",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_show_enum_origins.py b/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_show_enum_origins.py
index a0fcfa42..62612ca4 100644
--- a/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_show_enum_origins.py
+++ b/src/merge/resources/ticketing/resources/tickets/types/tickets_retrieve_request_show_enum_origins.py
@@ -1,41 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketsRetrieveRequestShowEnumOrigins(str, enum.Enum):
- PRIORITY = "priority"
- PRIORITY_STATUS = "priority,status"
- PRIORITY_STATUS_TICKET_TYPE = "priority,status,ticket_type"
- PRIORITY_TICKET_TYPE = "priority,ticket_type"
- STATUS = "status"
- STATUS_TICKET_TYPE = "status,ticket_type"
- TICKET_TYPE = "ticket_type"
-
- def visit(
- self,
- priority: typing.Callable[[], T_Result],
- priority_status: typing.Callable[[], T_Result],
- priority_status_ticket_type: typing.Callable[[], T_Result],
- priority_ticket_type: typing.Callable[[], T_Result],
- status: typing.Callable[[], T_Result],
- status_ticket_type: typing.Callable[[], T_Result],
- ticket_type: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketsRetrieveRequestShowEnumOrigins.PRIORITY:
- return priority()
- if self is TicketsRetrieveRequestShowEnumOrigins.PRIORITY_STATUS:
- return priority_status()
- if self is TicketsRetrieveRequestShowEnumOrigins.PRIORITY_STATUS_TICKET_TYPE:
- return priority_status_ticket_type()
- if self is TicketsRetrieveRequestShowEnumOrigins.PRIORITY_TICKET_TYPE:
- return priority_ticket_type()
- if self is TicketsRetrieveRequestShowEnumOrigins.STATUS:
- return status()
- if self is TicketsRetrieveRequestShowEnumOrigins.STATUS_TICKET_TYPE:
- return status_ticket_type()
- if self is TicketsRetrieveRequestShowEnumOrigins.TICKET_TYPE:
- return ticket_type()
+TicketsRetrieveRequestShowEnumOrigins = typing.Union[
+ typing.Literal[
+ "priority",
+ "priority,status",
+ "priority,status,ticket_type",
+ "priority,ticket_type",
+ "status",
+ "status,ticket_type",
+ "ticket_type",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/resources/users/client.py b/src/merge/resources/ticketing/resources/users/client.py
index 3f79530f..e6a81877 100644
--- a/src/merge/resources/ticketing/resources/users/client.py
+++ b/src/merge/resources/ticketing/resources/users/client.py
@@ -1,19 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from .....core.client_wrapper import SyncClientWrapper
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.datetime_utils import serialize_datetime
-from .....core.jsonable_encoder import jsonable_encoder
-from .....core.pydantic_utilities import pydantic_v1
+import datetime as dt
+from .types.users_list_request_expand import UsersListRequestExpand
from .....core.request_options import RequestOptions
from ...types.paginated_user_list import PaginatedUserList
-from ...types.user import User
-from .types.users_list_request_expand import UsersListRequestExpand
+from .....core.datetime_utils import serialize_datetime
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
from .types.users_retrieve_request_expand import UsersRetrieveRequestExpand
+from ...types.user import User
+from .....core.jsonable_encoder import jsonable_encoder
+from .....core.client_wrapper import AsyncClientWrapper
class UsersClient:
@@ -84,7 +84,7 @@ def list(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -110,9 +110,15 @@ def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -149,7 +155,7 @@ def retrieve(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -162,12 +168,21 @@ def retrieve(
_response = self._client_wrapper.httpx_client.request(
f"ticketing/v1/users/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(User, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ User,
+ parse_obj_as(
+ type_=User, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -242,13 +257,21 @@ async def list(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.users.list()
+
+
+ async def main() -> None:
+ await client.ticketing.users.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/users",
@@ -268,9 +291,15 @@ async def list(
},
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PaginatedUserList, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ PaginatedUserList,
+ parse_obj_as(
+ type_=PaginatedUserList, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -307,25 +336,42 @@ async def retrieve(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.users.retrieve(
- id="id",
- )
+
+
+ async def main() -> None:
+ await client.ticketing.users.retrieve(
+ id="id",
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
f"ticketing/v1/users/{jsonable_encoder(id)}",
method="GET",
- params={"expand": expand, "include_remote_data": include_remote_data},
+ params={
+ "expand": expand,
+ "include_remote_data": include_remote_data,
+ },
request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(User, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ User,
+ parse_obj_as(
+ type_=User, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/resources/users/types/users_list_request_expand.py b/src/merge/resources/ticketing/resources/users/types/users_list_request_expand.py
index d4b526f8..88cc39d2 100644
--- a/src/merge/resources/ticketing/resources/users/types/users_list_request_expand.py
+++ b/src/merge/resources/ticketing/resources/users/types/users_list_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class UsersListRequestExpand(str, enum.Enum):
- ROLES = "roles"
- TEAMS = "teams"
- TEAMS_ROLES = "teams,roles"
-
- def visit(
- self,
- roles: typing.Callable[[], T_Result],
- teams: typing.Callable[[], T_Result],
- teams_roles: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is UsersListRequestExpand.ROLES:
- return roles()
- if self is UsersListRequestExpand.TEAMS:
- return teams()
- if self is UsersListRequestExpand.TEAMS_ROLES:
- return teams_roles()
+UsersListRequestExpand = typing.Union[typing.Literal["roles", "teams", "teams,roles"], typing.Any]
diff --git a/src/merge/resources/ticketing/resources/users/types/users_retrieve_request_expand.py b/src/merge/resources/ticketing/resources/users/types/users_retrieve_request_expand.py
index b7f19ab6..22704ae4 100644
--- a/src/merge/resources/ticketing/resources/users/types/users_retrieve_request_expand.py
+++ b/src/merge/resources/ticketing/resources/users/types/users_retrieve_request_expand.py
@@ -1,25 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class UsersRetrieveRequestExpand(str, enum.Enum):
- ROLES = "roles"
- TEAMS = "teams"
- TEAMS_ROLES = "teams,roles"
-
- def visit(
- self,
- roles: typing.Callable[[], T_Result],
- teams: typing.Callable[[], T_Result],
- teams_roles: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is UsersRetrieveRequestExpand.ROLES:
- return roles()
- if self is UsersRetrieveRequestExpand.TEAMS:
- return teams()
- if self is UsersRetrieveRequestExpand.TEAMS_ROLES:
- return teams_roles()
+UsersRetrieveRequestExpand = typing.Union[typing.Literal["roles", "teams", "teams,roles"], typing.Any]
diff --git a/src/merge/resources/ticketing/resources/webhook_receivers/client.py b/src/merge/resources/ticketing/resources/webhook_receivers/client.py
index 69cc8a61..4ce00883 100644
--- a/src/merge/resources/ticketing/resources/webhook_receivers/client.py
+++ b/src/merge/resources/ticketing/resources/webhook_receivers/client.py
@@ -1,13 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-from json.decoder import JSONDecodeError
-
-from .....core.api_error import ApiError
-from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from .....core.pydantic_utilities import pydantic_v1
+from .....core.client_wrapper import SyncClientWrapper
from .....core.request_options import RequestOptions
from ...types.webhook_receiver import WebhookReceiver
+from .....core.pydantic_utilities import parse_obj_as
+from json.decoder import JSONDecodeError
+from .....core.api_error import ApiError
+from .....core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -33,7 +33,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -42,11 +42,19 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty
client.ticketing.webhook_receivers.list()
"""
_response = self._client_wrapper.httpx_client.request(
- "ticketing/v1/webhook-receivers", method="GET", request_options=request_options
+ "ticketing/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -58,7 +66,7 @@ def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -81,7 +89,7 @@ def create(
Examples
--------
- from merge.client import Merge
+ from merge import Merge
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
@@ -95,13 +103,23 @@ def create(
_response = self._client_wrapper.httpx_client.request(
"ticketing/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -128,20 +146,36 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None)
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.webhook_receivers.list()
+
+
+ async def main() -> None:
+ await client.ticketing.webhook_receivers.list()
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "ticketing/v1/webhook-receivers", method="GET", request_options=request_options
+ "ticketing/v1/webhook-receivers",
+ method="GET",
+ request_options=request_options,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(typing.List[WebhookReceiver], _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[WebhookReceiver],
+ parse_obj_as(
+ type_=typing.List[WebhookReceiver], # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -153,7 +187,7 @@ async def create(
event: str,
is_active: bool,
key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None
+ request_options: typing.Optional[RequestOptions] = None,
) -> WebhookReceiver:
"""
Creates a `WebhookReceiver` object with the given values.
@@ -176,27 +210,45 @@ async def create(
Examples
--------
- from merge.client import AsyncMerge
+ import asyncio
+
+ from merge import AsyncMerge
client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
- await client.ticketing.webhook_receivers.create(
- event="event",
- is_active=True,
- )
+
+
+ async def main() -> None:
+ await client.ticketing.webhook_receivers.create(
+ event="event",
+ is_active=True,
+ )
+
+
+ asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"ticketing/v1/webhook-receivers",
method="POST",
- json={"event": event, "is_active": is_active, "key": key},
+ json={
+ "event": event,
+ "is_active": is_active,
+ "key": key,
+ },
request_options=request_options,
omit=OMIT,
)
- if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(WebhookReceiver, _response.json()) # type: ignore
try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ WebhookReceiver,
+ parse_obj_as(
+ type_=WebhookReceiver, # type: ignore
+ object_=_response.json(),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/merge/resources/ticketing/types/access_level_enum.py b/src/merge/resources/ticketing/types/access_level_enum.py
index 19bf6228..eaf5e557 100644
--- a/src/merge/resources/ticketing/types/access_level_enum.py
+++ b/src/merge/resources/ticketing/types/access_level_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccessLevelEnum(str, enum.Enum):
- """
- - `PRIVATE` - PRIVATE
- - `COMPANY` - COMPANY
- - `PUBLIC` - PUBLIC
- """
-
- PRIVATE = "PRIVATE"
- COMPANY = "COMPANY"
- PUBLIC = "PUBLIC"
-
- def visit(
- self,
- private: typing.Callable[[], T_Result],
- company: typing.Callable[[], T_Result],
- public: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccessLevelEnum.PRIVATE:
- return private()
- if self is AccessLevelEnum.COMPANY:
- return company()
- if self is AccessLevelEnum.PUBLIC:
- return public()
+AccessLevelEnum = typing.Union[typing.Literal["PRIVATE", "COMPANY", "PUBLIC"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/account.py b/src/merge/resources/ticketing/types/account.py
index d82079c6..d9fe1711 100644
--- a/src/merge/resources/ticketing/types/account.py
+++ b/src/merge/resources/ticketing/types/account.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Account(pydantic_v1.BaseModel):
+class Account(UniversalBaseModel):
"""
# The Account Object
@@ -24,53 +24,44 @@ class Account(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The account's name.
"""
- domains: typing.Optional[typing.List[typing.Optional[str]]] = pydantic_v1.Field()
+ domains: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field()
"""
The account's domain names.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/account_details.py b/src/merge/resources/ticketing/types/account_details.py
index 81f9587b..50a3736a 100644
--- a/src/merge/resources/ticketing/types/account_details.py
+++ b/src/merge/resources/ticketing/types/account_details.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .category_enum import CategoryEnum
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetails(pydantic_v1.BaseModel):
+class AccountDetails(UniversalBaseModel):
id: typing.Optional[str]
integration: typing.Optional[str]
integration_slug: typing.Optional[str]
@@ -18,27 +17,18 @@ class AccountDetails(pydantic_v1.BaseModel):
end_user_email_address: typing.Optional[str]
status: typing.Optional[str]
webhook_listener_url: typing.Optional[str]
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
account_type: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/account_details_and_actions.py b/src/merge/resources/ticketing/types/account_details_and_actions.py
index 6a1b2874..39a7b0da 100644
--- a/src/merge/resources/ticketing/types/account_details_and_actions.py
+++ b/src/merge/resources/ticketing/types/account_details_and_actions.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
-from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
from .category_enum import CategoryEnum
+from .account_details_and_actions_status_enum import AccountDetailsAndActionsStatusEnum
+import pydantic
+from .account_details_and_actions_integration import AccountDetailsAndActionsIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountDetailsAndActions(pydantic_v1.BaseModel):
+class AccountDetailsAndActions(UniversalBaseModel):
"""
# The LinkedAccount Object
@@ -30,13 +29,13 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
end_user_origin_id: typing.Optional[str]
end_user_organization_name: str
end_user_email_address: str
- subdomain: typing.Optional[str] = pydantic_v1.Field()
+ subdomain: typing.Optional[str] = pydantic.Field()
"""
The tenant or domain the customer has provided access to.
"""
webhook_listener_url: str
- is_duplicate: typing.Optional[bool] = pydantic_v1.Field()
+ is_duplicate: typing.Optional[bool] = pydantic.Field()
"""
Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.
"""
@@ -44,20 +43,11 @@ class AccountDetailsAndActions(pydantic_v1.BaseModel):
integration: typing.Optional[AccountDetailsAndActionsIntegration]
account_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/account_details_and_actions_integration.py b/src/merge/resources/ticketing/types/account_details_and_actions_integration.py
index 7c300a2b..5779ac5b 100644
--- a/src/merge/resources/ticketing/types/account_details_and_actions_integration.py
+++ b/src/merge/resources/ticketing/types/account_details_and_actions_integration.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
+class AccountDetailsAndActionsIntegration(UniversalBaseModel):
name: str
categories: typing.List[CategoriesEnum]
image: typing.Optional[str]
@@ -19,20 +18,11 @@ class AccountDetailsAndActionsIntegration(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/account_details_and_actions_status_enum.py b/src/merge/resources/ticketing/types/account_details_and_actions_status_enum.py
index a904e550..47a6e845 100644
--- a/src/merge/resources/ticketing/types/account_details_and_actions_status_enum.py
+++ b/src/merge/resources/ticketing/types/account_details_and_actions_status_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class AccountDetailsAndActionsStatusEnum(str, enum.Enum):
- """
- - `COMPLETE` - COMPLETE
- - `INCOMPLETE` - INCOMPLETE
- - `RELINK_NEEDED` - RELINK_NEEDED
- """
-
- COMPLETE = "COMPLETE"
- INCOMPLETE = "INCOMPLETE"
- RELINK_NEEDED = "RELINK_NEEDED"
-
- def visit(
- self,
- complete: typing.Callable[[], T_Result],
- incomplete: typing.Callable[[], T_Result],
- relink_needed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is AccountDetailsAndActionsStatusEnum.COMPLETE:
- return complete()
- if self is AccountDetailsAndActionsStatusEnum.INCOMPLETE:
- return incomplete()
- if self is AccountDetailsAndActionsStatusEnum.RELINK_NEEDED:
- return relink_needed()
+AccountDetailsAndActionsStatusEnum = typing.Union[typing.Literal["COMPLETE", "INCOMPLETE", "RELINK_NEEDED"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/account_integration.py b/src/merge/resources/ticketing/types/account_integration.py
index ad3fd193..b1e4ec7e 100644
--- a/src/merge/resources/ticketing/types/account_integration.py
+++ b/src/merge/resources/ticketing/types/account_integration.py
@@ -1,74 +1,66 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .categories_enum import CategoriesEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AccountIntegration(pydantic_v1.BaseModel):
- name: str = pydantic_v1.Field()
+class AccountIntegration(UniversalBaseModel):
+ name: str = pydantic.Field()
"""
Company name.
"""
- abbreviated_name: typing.Optional[str] = pydantic_v1.Field()
+ abbreviated_name: typing.Optional[str] = pydantic.Field()
"""
Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).
Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)
"""
- categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic_v1.Field()
+ categories: typing.Optional[typing.List[CategoriesEnum]] = pydantic.Field()
"""
Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].
"""
- image: typing.Optional[str] = pydantic_v1.Field()
+ image: typing.Optional[str] = pydantic.Field()
"""
Company logo in rectangular shape. Upload an image with a clear background.
"""
- square_image: typing.Optional[str] = pydantic_v1.Field()
+ square_image: typing.Optional[str] = pydantic.Field()
"""
Company logo in square shape. Upload an image with a white background.
"""
- color: typing.Optional[str] = pydantic_v1.Field()
+ color: typing.Optional[str] = pydantic.Field()
"""
The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color.
"""
slug: typing.Optional[str]
- api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ api_endpoints_to_documentation_urls: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = (
+ pydantic.Field()
+ )
"""
Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}
"""
- webhook_setup_guide_url: typing.Optional[str] = pydantic_v1.Field()
+ webhook_setup_guide_url: typing.Optional[str] = pydantic.Field()
"""
Setup guide URL for third party webhook creation. Exposed in Merge Docs.
"""
- category_beta_status: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ category_beta_status: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
Category or categories this integration is in beta status for.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/account_token.py b/src/merge/resources/ticketing/types/account_token.py
index 4794fea3..fa8b76ec 100644
--- a/src/merge/resources/ticketing/types/account_token.py
+++ b/src/merge/resources/ticketing/types/account_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class AccountToken(pydantic_v1.BaseModel):
+class AccountToken(UniversalBaseModel):
account_token: str
integration: AccountIntegration
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/advanced_metadata.py b/src/merge/resources/ticketing/types/advanced_metadata.py
index 2aa7d1d6..6287a842 100644
--- a/src/merge/resources/ticketing/types/advanced_metadata.py
+++ b/src/merge/resources/ticketing/types/advanced_metadata.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AdvancedMetadata(pydantic_v1.BaseModel):
+class AdvancedMetadata(UniversalBaseModel):
id: str
display_name: typing.Optional[str]
description: typing.Optional[str]
is_required: typing.Optional[bool]
is_custom: typing.Optional[bool]
- field_choices: typing.Optional[typing.List[typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_choices: typing.Optional[typing.List[typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/async_passthrough_reciept.py b/src/merge/resources/ticketing/types/async_passthrough_reciept.py
index 2cc33210..43dc5284 100644
--- a/src/merge/resources/ticketing/types/async_passthrough_reciept.py
+++ b/src/merge/resources/ticketing/types/async_passthrough_reciept.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class AsyncPassthroughReciept(pydantic_v1.BaseModel):
+class AsyncPassthroughReciept(UniversalBaseModel):
async_passthrough_receipt_id: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/attachment.py b/src/merge/resources/ticketing/types/attachment.py
index 7bff1381..8a57e5ee 100644
--- a/src/merge/resources/ticketing/types/attachment.py
+++ b/src/merge/resources/ticketing/types/attachment.py
@@ -1,16 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from .collection import Collection
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Attachment(pydantic_v1.BaseModel):
+class Attachment(UniversalBaseModel):
"""
# The Attachment Object
@@ -24,74 +25,68 @@ class Attachment(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The attachment's name. It is required to include the file extension in the attachment's name.
"""
- ticket: typing.Optional[AttachmentTicket] = pydantic_v1.Field()
+ ticket: typing.Optional["AttachmentTicket"] = pydantic.Field()
"""
The ticket associated with the attachment.
"""
- file_url: typing.Optional[str] = pydantic_v1.Field()
+ file_url: typing.Optional[str] = pydantic.Field()
"""
The attachment's url. It is required to include the file extension in the file's URL.
"""
- content_type: typing.Optional[str] = pydantic_v1.Field()
+ content_type: typing.Optional[str] = pydantic.Field()
"""
The attachment's file format.
"""
- uploaded_by: typing.Optional[str] = pydantic_v1.Field()
+ uploaded_by: typing.Optional[str] = pydantic.Field()
"""
The user who uploaded the attachment.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's attachment was created.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+from .ticket import Ticket # noqa: E402
from .attachment_ticket import AttachmentTicket # noqa: E402
-Attachment.update_forward_refs()
+update_forward_refs(Collection, Attachment=Attachment)
+update_forward_refs(Ticket, Attachment=Attachment)
+update_forward_refs(Attachment)
diff --git a/src/merge/resources/ticketing/types/attachment_request.py b/src/merge/resources/ticketing/types/attachment_request.py
index e859c014..bb831e5d 100644
--- a/src/merge/resources/ticketing/types/attachment_request.py
+++ b/src/merge/resources/ticketing/types/attachment_request.py
@@ -1,14 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .attachment import Attachment
+from .collection import Collection
+from .ticket import Ticket
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .attachment_request_ticket import AttachmentRequestTicket
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class AttachmentRequest(pydantic_v1.BaseModel):
+class AttachmentRequest(UniversalBaseModel):
"""
# The Attachment Object
@@ -21,48 +25,44 @@ class AttachmentRequest(pydantic_v1.BaseModel):
TODO
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The attachment's name. It is required to include the file extension in the attachment's name.
"""
- ticket: typing.Optional[AttachmentRequestTicket] = pydantic_v1.Field()
+ ticket: typing.Optional[AttachmentRequestTicket] = pydantic.Field()
"""
The ticket associated with the attachment.
"""
- file_url: typing.Optional[str] = pydantic_v1.Field()
+ file_url: typing.Optional[str] = pydantic.Field()
"""
The attachment's url. It is required to include the file extension in the file's URL.
"""
- content_type: typing.Optional[str] = pydantic_v1.Field()
+ content_type: typing.Optional[str] = pydantic.Field()
"""
The attachment's file format.
"""
- uploaded_by: typing.Optional[str] = pydantic_v1.Field()
+ uploaded_by: typing.Optional[str] = pydantic.Field()
"""
The user who uploaded the attachment.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, AttachmentRequest=AttachmentRequest)
+update_forward_refs(Collection, AttachmentRequest=AttachmentRequest)
+update_forward_refs(Ticket, AttachmentRequest=AttachmentRequest)
diff --git a/src/merge/resources/ticketing/types/attachment_request_ticket.py b/src/merge/resources/ticketing/types/attachment_request_ticket.py
index 88236232..17a45b28 100644
--- a/src/merge/resources/ticketing/types/attachment_request_ticket.py
+++ b/src/merge/resources/ticketing/types/attachment_request_ticket.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket import Ticket
AttachmentRequestTicket = typing.Union[str, Ticket]
diff --git a/src/merge/resources/ticketing/types/attachment_ticket.py b/src/merge/resources/ticketing/types/attachment_ticket.py
index 025dcf1f..a69d1db0 100644
--- a/src/merge/resources/ticketing/types/attachment_ticket.py
+++ b/src/merge/resources/ticketing/types/attachment_ticket.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .ticket import Ticket
-
-AttachmentTicket = typing.Union[str, Ticket]
+if typing.TYPE_CHECKING:
+ from .ticket import Ticket
+AttachmentTicket = typing.Union[str, "Ticket"]
diff --git a/src/merge/resources/ticketing/types/audit_log_event.py b/src/merge/resources/ticketing/types/audit_log_event.py
index 051c0286..b57101fc 100644
--- a/src/merge/resources/ticketing/types/audit_log_event.py
+++ b/src/merge/resources/ticketing/types/audit_log_event.py
@@ -1,27 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .audit_log_event_event_type import AuditLogEventEventType
+import pydantic
from .audit_log_event_role import AuditLogEventRole
+from .audit_log_event_event_type import AuditLogEventEventType
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class AuditLogEvent(pydantic_v1.BaseModel):
+class AuditLogEvent(UniversalBaseModel):
id: typing.Optional[str]
- user_name: typing.Optional[str] = pydantic_v1.Field()
+ user_name: typing.Optional[str] = pydantic.Field()
"""
The User's full name at the time of this Event occurring.
"""
- user_email: typing.Optional[str] = pydantic_v1.Field()
+ user_email: typing.Optional[str] = pydantic.Field()
"""
The User's email at the time of this Event occurring.
"""
- role: AuditLogEventRole = pydantic_v1.Field()
+ role: AuditLogEventRole = pydantic.Field()
"""
Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.
@@ -34,7 +34,7 @@ class AuditLogEvent(pydantic_v1.BaseModel):
"""
ip_address: str
- event_type: AuditLogEventEventType = pydantic_v1.Field()
+ event_type: AuditLogEventEventType = pydantic.Field()
"""
Designates the type of event that occurred.
@@ -81,20 +81,11 @@ class AuditLogEvent(pydantic_v1.BaseModel):
event_description: str
created_at: typing.Optional[dt.datetime]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/audit_log_event_event_type.py b/src/merge/resources/ticketing/types/audit_log_event_event_type.py
index f9c9d2b3..f9d43eed 100644
--- a/src/merge/resources/ticketing/types/audit_log_event_event_type.py
+++ b/src/merge/resources/ticketing/types/audit_log_event_event_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .event_type_enum import EventTypeEnum
AuditLogEventEventType = typing.Union[EventTypeEnum, str]
diff --git a/src/merge/resources/ticketing/types/audit_log_event_role.py b/src/merge/resources/ticketing/types/audit_log_event_role.py
index fe91ed6f..83ecd93a 100644
--- a/src/merge/resources/ticketing/types/audit_log_event_role.py
+++ b/src/merge/resources/ticketing/types/audit_log_event_role.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .role_enum import RoleEnum
AuditLogEventRole = typing.Union[RoleEnum, str]
diff --git a/src/merge/resources/ticketing/types/available_actions.py b/src/merge/resources/ticketing/types/available_actions.py
index bbd94581..5f164db6 100644
--- a/src/merge/resources/ticketing/types/available_actions.py
+++ b/src/merge/resources/ticketing/types/available_actions.py
@@ -1,15 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .account_integration import AccountIntegration
+import typing
from .model_operation import ModelOperation
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class AvailableActions(pydantic_v1.BaseModel):
+class AvailableActions(UniversalBaseModel):
"""
# The AvailableActions Object
@@ -26,20 +25,11 @@ class AvailableActions(pydantic_v1.BaseModel):
passthrough_available: bool
available_model_operations: typing.Optional[typing.List[ModelOperation]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/categories_enum.py b/src/merge/resources/ticketing/types/categories_enum.py
index ee5cac33..14d064dd 100644
--- a/src/merge/resources/ticketing/types/categories_enum.py
+++ b/src/merge/resources/ticketing/types/categories_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoriesEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoriesEnum.HRIS:
- return hris()
- if self is CategoriesEnum.ATS:
- return ats()
- if self is CategoriesEnum.ACCOUNTING:
- return accounting()
- if self is CategoriesEnum.TICKETING:
- return ticketing()
- if self is CategoriesEnum.CRM:
- return crm()
- if self is CategoriesEnum.MKTG:
- return mktg()
- if self is CategoriesEnum.FILESTORAGE:
- return filestorage()
+CategoriesEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/ticketing/types/category_enum.py b/src/merge/resources/ticketing/types/category_enum.py
index ad5a0688..597342a8 100644
--- a/src/merge/resources/ticketing/types/category_enum.py
+++ b/src/merge/resources/ticketing/types/category_enum.py
@@ -1,51 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CategoryEnum(str, enum.Enum):
- """
- - `hris` - hris
- - `ats` - ats
- - `accounting` - accounting
- - `ticketing` - ticketing
- - `crm` - crm
- - `mktg` - mktg
- - `filestorage` - filestorage
- """
-
- HRIS = "hris"
- ATS = "ats"
- ACCOUNTING = "accounting"
- TICKETING = "ticketing"
- CRM = "crm"
- MKTG = "mktg"
- FILESTORAGE = "filestorage"
-
- def visit(
- self,
- hris: typing.Callable[[], T_Result],
- ats: typing.Callable[[], T_Result],
- accounting: typing.Callable[[], T_Result],
- ticketing: typing.Callable[[], T_Result],
- crm: typing.Callable[[], T_Result],
- mktg: typing.Callable[[], T_Result],
- filestorage: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is CategoryEnum.HRIS:
- return hris()
- if self is CategoryEnum.ATS:
- return ats()
- if self is CategoryEnum.ACCOUNTING:
- return accounting()
- if self is CategoryEnum.TICKETING:
- return ticketing()
- if self is CategoryEnum.CRM:
- return crm()
- if self is CategoryEnum.MKTG:
- return mktg()
- if self is CategoryEnum.FILESTORAGE:
- return filestorage()
+CategoryEnum = typing.Union[
+ typing.Literal["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage"], typing.Any
+]
diff --git a/src/merge/resources/ticketing/types/collection.py b/src/merge/resources/ticketing/types/collection.py
index 86d10b86..43331c55 100644
--- a/src/merge/resources/ticketing/types/collection.py
+++ b/src/merge/resources/ticketing/types/collection.py
@@ -1,18 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .collection_access_level import CollectionAccessLevel
+import pydantic
+import datetime as dt
from .collection_collection_type import CollectionCollectionType
+from .collection_access_level import CollectionAccessLevel
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Collection(pydantic_v1.BaseModel):
+class Collection(UniversalBaseModel):
"""
# The Collection Object
@@ -27,32 +27,32 @@ class Collection(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The collection's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The collection's description.
"""
- collection_type: typing.Optional[CollectionCollectionType] = pydantic_v1.Field()
+ collection_type: typing.Optional[CollectionCollectionType] = pydantic.Field()
"""
The collection's type.
@@ -60,17 +60,17 @@ class Collection(pydantic_v1.BaseModel):
- `PROJECT` - PROJECT
"""
- parent_collection: typing.Optional[CollectionParentCollection] = pydantic_v1.Field()
+ parent_collection: typing.Optional["CollectionParentCollection"] = pydantic.Field()
"""
The parent collection for this collection.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- access_level: typing.Optional[CollectionAccessLevel] = pydantic_v1.Field()
+ access_level: typing.Optional[CollectionAccessLevel] = pydantic.Field()
"""
The level of access a User has to the Collection and its sub-objects.
@@ -79,28 +79,19 @@ class Collection(pydantic_v1.BaseModel):
- `PUBLIC` - PUBLIC
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
from .collection_parent_collection import CollectionParentCollection # noqa: E402
-Collection.update_forward_refs()
+update_forward_refs(Collection)
diff --git a/src/merge/resources/ticketing/types/collection_access_level.py b/src/merge/resources/ticketing/types/collection_access_level.py
index b0de2ebf..07522d89 100644
--- a/src/merge/resources/ticketing/types/collection_access_level.py
+++ b/src/merge/resources/ticketing/types/collection_access_level.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .access_level_enum import AccessLevelEnum
CollectionAccessLevel = typing.Union[AccessLevelEnum, str]
diff --git a/src/merge/resources/ticketing/types/collection_collection_type.py b/src/merge/resources/ticketing/types/collection_collection_type.py
index 986d6db9..46323048 100644
--- a/src/merge/resources/ticketing/types/collection_collection_type.py
+++ b/src/merge/resources/ticketing/types/collection_collection_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .collection_type_enum import CollectionTypeEnum
CollectionCollectionType = typing.Union[CollectionTypeEnum, str]
diff --git a/src/merge/resources/ticketing/types/collection_parent_collection.py b/src/merge/resources/ticketing/types/collection_parent_collection.py
index 33811973..f54be43c 100644
--- a/src/merge/resources/ticketing/types/collection_parent_collection.py
+++ b/src/merge/resources/ticketing/types/collection_parent_collection.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .collection import Collection
-
-CollectionParentCollection = typing.Union[str, Collection]
+if typing.TYPE_CHECKING:
+ from .collection import Collection
+CollectionParentCollection = typing.Union[str, "Collection"]
diff --git a/src/merge/resources/ticketing/types/collection_type_enum.py b/src/merge/resources/ticketing/types/collection_type_enum.py
index fe4b83b0..3dbb1f34 100644
--- a/src/merge/resources/ticketing/types/collection_type_enum.py
+++ b/src/merge/resources/ticketing/types/collection_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class CollectionTypeEnum(str, enum.Enum):
- """
- - `LIST` - LIST
- - `PROJECT` - PROJECT
- """
-
- LIST = "LIST"
- PROJECT = "PROJECT"
-
- def visit(self, list_: typing.Callable[[], T_Result], project: typing.Callable[[], T_Result]) -> T_Result:
- if self is CollectionTypeEnum.LIST:
- return list_()
- if self is CollectionTypeEnum.PROJECT:
- return project()
+CollectionTypeEnum = typing.Union[typing.Literal["LIST", "PROJECT"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/comment.py b/src/merge/resources/ticketing/types/comment.py
index 1640edee..80c966ea 100644
--- a/src/merge/resources/ticketing/types/comment.py
+++ b/src/merge/resources/ticketing/types/comment.py
@@ -1,17 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .attachment import Attachment
+from .collection import Collection
+from .ticket import Ticket
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
+from .comment_user import CommentUser
from .comment_contact import CommentContact
from .comment_ticket import CommentTicket
-from .comment_user import CommentUser
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Comment(pydantic_v1.BaseModel):
+class Comment(UniversalBaseModel):
"""
# The Comment Object
@@ -25,74 +30,70 @@ class Comment(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- user: typing.Optional[CommentUser] = pydantic_v1.Field()
+ user: typing.Optional[CommentUser] = pydantic.Field()
"""
The author of the Comment, if the author is a User.
"""
- contact: typing.Optional[CommentContact] = pydantic_v1.Field()
+ contact: typing.Optional[CommentContact] = pydantic.Field()
"""
The author of the Comment, if the author is a Contact.
"""
- body: typing.Optional[str] = pydantic_v1.Field()
+ body: typing.Optional[str] = pydantic.Field()
"""
The comment's text body.
"""
- html_body: typing.Optional[str] = pydantic_v1.Field()
+ html_body: typing.Optional[str] = pydantic.Field()
"""
The comment's text body formatted as html.
"""
- ticket: typing.Optional[CommentTicket] = pydantic_v1.Field()
+ ticket: typing.Optional[CommentTicket] = pydantic.Field()
"""
The ticket associated with the comment.
"""
- is_private: typing.Optional[bool] = pydantic_v1.Field()
+ is_private: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the comment is internal.
"""
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's comment was created.
"""
remote_was_deleted: typing.Optional[bool]
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, Comment=Comment)
+update_forward_refs(Collection, Comment=Comment)
+update_forward_refs(Ticket, Comment=Comment)
diff --git a/src/merge/resources/ticketing/types/comment_contact.py b/src/merge/resources/ticketing/types/comment_contact.py
index 55fd4fa4..d7a94510 100644
--- a/src/merge/resources/ticketing/types/comment_contact.py
+++ b/src/merge/resources/ticketing/types/comment_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
CommentContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/ticketing/types/comment_request.py b/src/merge/resources/ticketing/types/comment_request.py
index 77e0cb8e..948b2ecb 100644
--- a/src/merge/resources/ticketing/types/comment_request.py
+++ b/src/merge/resources/ticketing/types/comment_request.py
@@ -1,16 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .attachment import Attachment
+from .collection import Collection
+from .ticket import Ticket
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from .comment_request_user import CommentRequestUser
+import pydantic
from .comment_request_contact import CommentRequestContact
from .comment_request_ticket import CommentRequestTicket
-from .comment_request_user import CommentRequestUser
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class CommentRequest(pydantic_v1.BaseModel):
+class CommentRequest(UniversalBaseModel):
"""
# The Comment Object
@@ -23,53 +27,49 @@ class CommentRequest(pydantic_v1.BaseModel):
TODO
"""
- user: typing.Optional[CommentRequestUser] = pydantic_v1.Field()
+ user: typing.Optional[CommentRequestUser] = pydantic.Field()
"""
The author of the Comment, if the author is a User.
"""
- contact: typing.Optional[CommentRequestContact] = pydantic_v1.Field()
+ contact: typing.Optional[CommentRequestContact] = pydantic.Field()
"""
The author of the Comment, if the author is a Contact.
"""
- body: typing.Optional[str] = pydantic_v1.Field()
+ body: typing.Optional[str] = pydantic.Field()
"""
The comment's text body.
"""
- html_body: typing.Optional[str] = pydantic_v1.Field()
+ html_body: typing.Optional[str] = pydantic.Field()
"""
The comment's text body formatted as html.
"""
- ticket: typing.Optional[CommentRequestTicket] = pydantic_v1.Field()
+ ticket: typing.Optional[CommentRequestTicket] = pydantic.Field()
"""
The ticket associated with the comment.
"""
- is_private: typing.Optional[bool] = pydantic_v1.Field()
+ is_private: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the comment is internal.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, CommentRequest=CommentRequest)
+update_forward_refs(Collection, CommentRequest=CommentRequest)
+update_forward_refs(Ticket, CommentRequest=CommentRequest)
diff --git a/src/merge/resources/ticketing/types/comment_request_contact.py b/src/merge/resources/ticketing/types/comment_request_contact.py
index 927ae877..5a3d16e5 100644
--- a/src/merge/resources/ticketing/types/comment_request_contact.py
+++ b/src/merge/resources/ticketing/types/comment_request_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
CommentRequestContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/ticketing/types/comment_request_ticket.py b/src/merge/resources/ticketing/types/comment_request_ticket.py
index 4edbf9d3..d9145cab 100644
--- a/src/merge/resources/ticketing/types/comment_request_ticket.py
+++ b/src/merge/resources/ticketing/types/comment_request_ticket.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket import Ticket
CommentRequestTicket = typing.Union[str, Ticket]
diff --git a/src/merge/resources/ticketing/types/comment_request_user.py b/src/merge/resources/ticketing/types/comment_request_user.py
index dde5ed32..eaa6eced 100644
--- a/src/merge/resources/ticketing/types/comment_request_user.py
+++ b/src/merge/resources/ticketing/types/comment_request_user.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
CommentRequestUser = typing.Union[str, User]
diff --git a/src/merge/resources/ticketing/types/comment_response.py b/src/merge/resources/ticketing/types/comment_response.py
index 5396f0fb..f871949b 100644
--- a/src/merge/resources/ticketing/types/comment_response.py
+++ b/src/merge/resources/ticketing/types/comment_response.py
@@ -1,36 +1,36 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .attachment import Attachment
+from .collection import Collection
+from .ticket import Ticket
from .comment import Comment
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class CommentResponse(pydantic_v1.BaseModel):
+class CommentResponse(UniversalBaseModel):
model: Comment
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, CommentResponse=CommentResponse)
+update_forward_refs(Collection, CommentResponse=CommentResponse)
+update_forward_refs(Ticket, CommentResponse=CommentResponse)
diff --git a/src/merge/resources/ticketing/types/comment_ticket.py b/src/merge/resources/ticketing/types/comment_ticket.py
index 5a8c6680..691552f6 100644
--- a/src/merge/resources/ticketing/types/comment_ticket.py
+++ b/src/merge/resources/ticketing/types/comment_ticket.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket import Ticket
CommentTicket = typing.Union[str, Ticket]
diff --git a/src/merge/resources/ticketing/types/comment_user.py b/src/merge/resources/ticketing/types/comment_user.py
index 73c7f4da..6408daa6 100644
--- a/src/merge/resources/ticketing/types/comment_user.py
+++ b/src/merge/resources/ticketing/types/comment_user.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
CommentUser = typing.Union[str, User]
diff --git a/src/merge/resources/ticketing/types/common_model_scope_api.py b/src/merge/resources/ticketing/types/common_model_scope_api.py
index d6fdec56..c6a178b1 100644
--- a/src/merge/resources/ticketing/types/common_model_scope_api.py
+++ b/src/merge/resources/ticketing/types/common_model_scope_api.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .individual_common_model_scope_deserializer import IndividualCommonModelScopeDeserializer
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class CommonModelScopeApi(pydantic_v1.BaseModel):
- common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic_v1.Field()
+class CommonModelScopeApi(UniversalBaseModel):
+ common_models: typing.List[IndividualCommonModelScopeDeserializer] = pydantic.Field()
"""
The common models you want to update the scopes for
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/common_model_scopes_body_request.py b/src/merge/resources/ticketing/types/common_model_scopes_body_request.py
index e956cbdc..305ab44c 100644
--- a/src/merge/resources/ticketing/types/common_model_scopes_body_request.py
+++ b/src/merge/resources/ticketing/types/common_model_scopes_body_request.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .enabled_actions_enum import EnabledActionsEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class CommonModelScopesBodyRequest(pydantic_v1.BaseModel):
+class CommonModelScopesBodyRequest(UniversalBaseModel):
model_id: str
enabled_actions: typing.List[EnabledActionsEnum]
disabled_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/contact.py b/src/merge/resources/ticketing/types/contact.py
index 1ae431ab..16b48b85 100644
--- a/src/merge/resources/ticketing/types/contact.py
+++ b/src/merge/resources/ticketing/types/contact.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .contact_account import ContactAccount
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Contact(pydantic_v1.BaseModel):
+class Contact(UniversalBaseModel):
"""
# The Contact Object
@@ -23,68 +23,59 @@ class Contact(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The contact's name.
"""
- email_address: typing.Optional[str] = pydantic_v1.Field()
+ email_address: typing.Optional[str] = pydantic.Field()
"""
The contact's email address.
"""
- phone_number: typing.Optional[str] = pydantic_v1.Field()
+ phone_number: typing.Optional[str] = pydantic.Field()
"""
The contact's phone number.
"""
- details: typing.Optional[str] = pydantic_v1.Field()
+ details: typing.Optional[str] = pydantic.Field()
"""
The contact's details.
"""
- account: typing.Optional[ContactAccount] = pydantic_v1.Field()
+ account: typing.Optional[ContactAccount] = pydantic.Field()
"""
The contact's account.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/contact_account.py b/src/merge/resources/ticketing/types/contact_account.py
index f21ef820..b58782ef 100644
--- a/src/merge/resources/ticketing/types/contact_account.py
+++ b/src/merge/resources/ticketing/types/contact_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ContactAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/ticketing/types/contact_request.py b/src/merge/resources/ticketing/types/contact_request.py
index a71e7ab8..de2ced7e 100644
--- a/src/merge/resources/ticketing/types/contact_request.py
+++ b/src/merge/resources/ticketing/types/contact_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .contact_request_account import ContactRequestAccount
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class ContactRequest(pydantic_v1.BaseModel):
+class ContactRequest(UniversalBaseModel):
"""
# The Contact Object
@@ -21,48 +20,39 @@ class ContactRequest(pydantic_v1.BaseModel):
TODO
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The contact's name.
"""
- email_address: typing.Optional[str] = pydantic_v1.Field()
+ email_address: typing.Optional[str] = pydantic.Field()
"""
The contact's email address.
"""
- phone_number: typing.Optional[str] = pydantic_v1.Field()
+ phone_number: typing.Optional[str] = pydantic.Field()
"""
The contact's phone number.
"""
- details: typing.Optional[str] = pydantic_v1.Field()
+ details: typing.Optional[str] = pydantic.Field()
"""
The contact's details.
"""
- account: typing.Optional[ContactRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[ContactRequestAccount] = pydantic.Field()
"""
The contact's account.
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/contact_request_account.py b/src/merge/resources/ticketing/types/contact_request_account.py
index 449187af..89a6048f 100644
--- a/src/merge/resources/ticketing/types/contact_request_account.py
+++ b/src/merge/resources/ticketing/types/contact_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
ContactRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/ticketing/types/data_passthrough_request.py b/src/merge/resources/ticketing/types/data_passthrough_request.py
index fdf9b18c..f2718105 100644
--- a/src/merge/resources/ticketing/types/data_passthrough_request.py
+++ b/src/merge/resources/ticketing/types/data_passthrough_request.py
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .method_enum import MethodEnum
+import pydantic
+import typing
from .multipart_form_field_request import MultipartFormFieldRequest
from .request_format_enum import RequestFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class DataPassthroughRequest(pydantic_v1.BaseModel):
+class DataPassthroughRequest(UniversalBaseModel):
"""
# The DataPassthrough Object
@@ -24,51 +23,42 @@ class DataPassthroughRequest(pydantic_v1.BaseModel):
"""
method: MethodEnum
- path: str = pydantic_v1.Field()
+ path: str = pydantic.Field()
"""
The path of the request in the third party's platform.
"""
- base_url_override: typing.Optional[str] = pydantic_v1.Field()
+ base_url_override: typing.Optional[str] = pydantic.Field()
"""
An optional override of the third party's base url for the request.
"""
- data: typing.Optional[str] = pydantic_v1.Field()
+ data: typing.Optional[str] = pydantic.Field()
"""
The data with the request. You must include a `request_format` parameter matching the data's format
"""
- multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic_v1.Field()
+ multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field()
"""
Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`.
"""
- headers: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field()
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field()
"""
The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server.
"""
request_format: typing.Optional[RequestFormatEnum]
- normalize_response: typing.Optional[bool] = pydantic_v1.Field()
+ normalize_response: typing.Optional[bool] = pydantic.Field()
"""
Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/debug_mode_log.py b/src/merge/resources/ticketing/types/debug_mode_log.py
index 321c9090..2b02c1b9 100644
--- a/src/merge/resources/ticketing/types/debug_mode_log.py
+++ b/src/merge/resources/ticketing/types/debug_mode_log.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .debug_model_log_summary import DebugModelLogSummary
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
-class DebugModeLog(pydantic_v1.BaseModel):
+class DebugModeLog(UniversalBaseModel):
log_id: str
dashboard_view: str
log_summary: DebugModelLogSummary
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/debug_model_log_summary.py b/src/merge/resources/ticketing/types/debug_model_log_summary.py
index 06bb154b..b4f48752 100644
--- a/src/merge/resources/ticketing/types/debug_model_log_summary.py
+++ b/src/merge/resources/ticketing/types/debug_model_log_summary.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class DebugModelLogSummary(pydantic_v1.BaseModel):
+class DebugModelLogSummary(UniversalBaseModel):
url: str
method: str
status_code: int
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/enabled_actions_enum.py b/src/merge/resources/ticketing/types/enabled_actions_enum.py
index 949d69dc..fa6c674e 100644
--- a/src/merge/resources/ticketing/types/enabled_actions_enum.py
+++ b/src/merge/resources/ticketing/types/enabled_actions_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EnabledActionsEnum(str, enum.Enum):
- """
- - `READ` - READ
- - `WRITE` - WRITE
- """
-
- READ = "READ"
- WRITE = "WRITE"
-
- def visit(self, read: typing.Callable[[], T_Result], write: typing.Callable[[], T_Result]) -> T_Result:
- if self is EnabledActionsEnum.READ:
- return read()
- if self is EnabledActionsEnum.WRITE:
- return write()
+EnabledActionsEnum = typing.Union[typing.Literal["READ", "WRITE"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/encoding_enum.py b/src/merge/resources/ticketing/types/encoding_enum.py
index fed12372..4c4997b2 100644
--- a/src/merge/resources/ticketing/types/encoding_enum.py
+++ b/src/merge/resources/ticketing/types/encoding_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EncodingEnum(str, enum.Enum):
- """
- - `RAW` - RAW
- - `BASE64` - BASE64
- - `GZIP_BASE64` - GZIP_BASE64
- """
-
- RAW = "RAW"
- BASE_64 = "BASE64"
- GZIP_BASE_64 = "GZIP_BASE64"
-
- def visit(
- self,
- raw: typing.Callable[[], T_Result],
- base_64: typing.Callable[[], T_Result],
- gzip_base_64: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EncodingEnum.RAW:
- return raw()
- if self is EncodingEnum.BASE_64:
- return base_64()
- if self is EncodingEnum.GZIP_BASE_64:
- return gzip_base_64()
+EncodingEnum = typing.Union[typing.Literal["RAW", "BASE64", "GZIP_BASE64"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/error_validation_problem.py b/src/merge/resources/ticketing/types/error_validation_problem.py
index 425af45c..58ea87e6 100644
--- a/src/merge/resources/ticketing/types/error_validation_problem.py
+++ b/src/merge/resources/ticketing/types/error_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ErrorValidationProblem(pydantic_v1.BaseModel):
+class ErrorValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/event_type_enum.py b/src/merge/resources/ticketing/types/event_type_enum.py
index c10cd701..2693c646 100644
--- a/src/merge/resources/ticketing/types/event_type_enum.py
+++ b/src/merge/resources/ticketing/types/event_type_enum.py
@@ -1,206 +1,47 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class EventTypeEnum(str, enum.Enum):
- """
- - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY
- - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY
- - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY
- - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY
- - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY
- - `INVITED_USER` - INVITED_USER
- - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED
- - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED
- - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT
- - `CREATED_DESTINATION` - CREATED_DESTINATION
- - `DELETED_DESTINATION` - DELETED_DESTINATION
- - `CHANGED_DESTINATION` - CHANGED_DESTINATION
- - `CHANGED_SCOPES` - CHANGED_SCOPES
- - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION
- - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS
- - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION
- - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION
- - `ENABLED_CATEGORY` - ENABLED_CATEGORY
- - `DISABLED_CATEGORY` - DISABLED_CATEGORY
- - `CHANGED_PASSWORD` - CHANGED_PASSWORD
- - `RESET_PASSWORD` - RESET_PASSWORD
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION
- - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT
- - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING
- - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING
- - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING
- - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING
- - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING
- - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC
- - `MUTED_ISSUE` - MUTED_ISSUE
- - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK
- - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK
- - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK
- - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
- - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
- """
-
- CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY"
- DELETED_REMOTE_PRODUCTION_API_KEY = "DELETED_REMOTE_PRODUCTION_API_KEY"
- CREATED_TEST_API_KEY = "CREATED_TEST_API_KEY"
- DELETED_TEST_API_KEY = "DELETED_TEST_API_KEY"
- REGENERATED_PRODUCTION_API_KEY = "REGENERATED_PRODUCTION_API_KEY"
- INVITED_USER = "INVITED_USER"
- TWO_FACTOR_AUTH_ENABLED = "TWO_FACTOR_AUTH_ENABLED"
- TWO_FACTOR_AUTH_DISABLED = "TWO_FACTOR_AUTH_DISABLED"
- DELETED_LINKED_ACCOUNT = "DELETED_LINKED_ACCOUNT"
- CREATED_DESTINATION = "CREATED_DESTINATION"
- DELETED_DESTINATION = "DELETED_DESTINATION"
- CHANGED_DESTINATION = "CHANGED_DESTINATION"
- CHANGED_SCOPES = "CHANGED_SCOPES"
- CHANGED_PERSONAL_INFORMATION = "CHANGED_PERSONAL_INFORMATION"
- CHANGED_ORGANIZATION_SETTINGS = "CHANGED_ORGANIZATION_SETTINGS"
- ENABLED_INTEGRATION = "ENABLED_INTEGRATION"
- DISABLED_INTEGRATION = "DISABLED_INTEGRATION"
- ENABLED_CATEGORY = "ENABLED_CATEGORY"
- DISABLED_CATEGORY = "DISABLED_CATEGORY"
- CHANGED_PASSWORD = "CHANGED_PASSWORD"
- RESET_PASSWORD = "RESET_PASSWORD"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION"
- DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT"
- CREATED_INTEGRATION_WIDE_FIELD_MAPPING = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING"
- CREATED_LINKED_ACCOUNT_FIELD_MAPPING = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING"
- CHANGED_INTEGRATION_WIDE_FIELD_MAPPING = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING"
- CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING"
- DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING"
- DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING"
- FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC"
- MUTED_ISSUE = "MUTED_ISSUE"
- GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK"
- ENABLED_MERGE_WEBHOOK = "ENABLED_MERGE_WEBHOOK"
- DISABLED_MERGE_WEBHOOK = "DISABLED_MERGE_WEBHOOK"
- MERGE_WEBHOOK_TARGET_CHANGED = "MERGE_WEBHOOK_TARGET_CHANGED"
- END_USER_CREDENTIALS_ACCESSED = "END_USER_CREDENTIALS_ACCESSED"
-
- def visit(
- self,
- created_remote_production_api_key: typing.Callable[[], T_Result],
- deleted_remote_production_api_key: typing.Callable[[], T_Result],
- created_test_api_key: typing.Callable[[], T_Result],
- deleted_test_api_key: typing.Callable[[], T_Result],
- regenerated_production_api_key: typing.Callable[[], T_Result],
- invited_user: typing.Callable[[], T_Result],
- two_factor_auth_enabled: typing.Callable[[], T_Result],
- two_factor_auth_disabled: typing.Callable[[], T_Result],
- deleted_linked_account: typing.Callable[[], T_Result],
- created_destination: typing.Callable[[], T_Result],
- deleted_destination: typing.Callable[[], T_Result],
- changed_destination: typing.Callable[[], T_Result],
- changed_scopes: typing.Callable[[], T_Result],
- changed_personal_information: typing.Callable[[], T_Result],
- changed_organization_settings: typing.Callable[[], T_Result],
- enabled_integration: typing.Callable[[], T_Result],
- disabled_integration: typing.Callable[[], T_Result],
- enabled_category: typing.Callable[[], T_Result],
- disabled_category: typing.Callable[[], T_Result],
- changed_password: typing.Callable[[], T_Result],
- reset_password: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- enabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_organization: typing.Callable[[], T_Result],
- disabled_redact_unmapped_data_for_linked_account: typing.Callable[[], T_Result],
- created_integration_wide_field_mapping: typing.Callable[[], T_Result],
- created_linked_account_field_mapping: typing.Callable[[], T_Result],
- changed_integration_wide_field_mapping: typing.Callable[[], T_Result],
- changed_linked_account_field_mapping: typing.Callable[[], T_Result],
- deleted_integration_wide_field_mapping: typing.Callable[[], T_Result],
- deleted_linked_account_field_mapping: typing.Callable[[], T_Result],
- forced_linked_account_resync: typing.Callable[[], T_Result],
- muted_issue: typing.Callable[[], T_Result],
- generated_magic_link: typing.Callable[[], T_Result],
- enabled_merge_webhook: typing.Callable[[], T_Result],
- disabled_merge_webhook: typing.Callable[[], T_Result],
- merge_webhook_target_changed: typing.Callable[[], T_Result],
- end_user_credentials_accessed: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY:
- return created_remote_production_api_key()
- if self is EventTypeEnum.DELETED_REMOTE_PRODUCTION_API_KEY:
- return deleted_remote_production_api_key()
- if self is EventTypeEnum.CREATED_TEST_API_KEY:
- return created_test_api_key()
- if self is EventTypeEnum.DELETED_TEST_API_KEY:
- return deleted_test_api_key()
- if self is EventTypeEnum.REGENERATED_PRODUCTION_API_KEY:
- return regenerated_production_api_key()
- if self is EventTypeEnum.INVITED_USER:
- return invited_user()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_ENABLED:
- return two_factor_auth_enabled()
- if self is EventTypeEnum.TWO_FACTOR_AUTH_DISABLED:
- return two_factor_auth_disabled()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT:
- return deleted_linked_account()
- if self is EventTypeEnum.CREATED_DESTINATION:
- return created_destination()
- if self is EventTypeEnum.DELETED_DESTINATION:
- return deleted_destination()
- if self is EventTypeEnum.CHANGED_DESTINATION:
- return changed_destination()
- if self is EventTypeEnum.CHANGED_SCOPES:
- return changed_scopes()
- if self is EventTypeEnum.CHANGED_PERSONAL_INFORMATION:
- return changed_personal_information()
- if self is EventTypeEnum.CHANGED_ORGANIZATION_SETTINGS:
- return changed_organization_settings()
- if self is EventTypeEnum.ENABLED_INTEGRATION:
- return enabled_integration()
- if self is EventTypeEnum.DISABLED_INTEGRATION:
- return disabled_integration()
- if self is EventTypeEnum.ENABLED_CATEGORY:
- return enabled_category()
- if self is EventTypeEnum.DISABLED_CATEGORY:
- return disabled_category()
- if self is EventTypeEnum.CHANGED_PASSWORD:
- return changed_password()
- if self is EventTypeEnum.RESET_PASSWORD:
- return reset_password()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return enabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return enabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION:
- return disabled_redact_unmapped_data_for_organization()
- if self is EventTypeEnum.DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT:
- return disabled_redact_unmapped_data_for_linked_account()
- if self is EventTypeEnum.CREATED_INTEGRATION_WIDE_FIELD_MAPPING:
- return created_integration_wide_field_mapping()
- if self is EventTypeEnum.CREATED_LINKED_ACCOUNT_FIELD_MAPPING:
- return created_linked_account_field_mapping()
- if self is EventTypeEnum.CHANGED_INTEGRATION_WIDE_FIELD_MAPPING:
- return changed_integration_wide_field_mapping()
- if self is EventTypeEnum.CHANGED_LINKED_ACCOUNT_FIELD_MAPPING:
- return changed_linked_account_field_mapping()
- if self is EventTypeEnum.DELETED_INTEGRATION_WIDE_FIELD_MAPPING:
- return deleted_integration_wide_field_mapping()
- if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING:
- return deleted_linked_account_field_mapping()
- if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC:
- return forced_linked_account_resync()
- if self is EventTypeEnum.MUTED_ISSUE:
- return muted_issue()
- if self is EventTypeEnum.GENERATED_MAGIC_LINK:
- return generated_magic_link()
- if self is EventTypeEnum.ENABLED_MERGE_WEBHOOK:
- return enabled_merge_webhook()
- if self is EventTypeEnum.DISABLED_MERGE_WEBHOOK:
- return disabled_merge_webhook()
- if self is EventTypeEnum.MERGE_WEBHOOK_TARGET_CHANGED:
- return merge_webhook_target_changed()
- if self is EventTypeEnum.END_USER_CREDENTIALS_ACCESSED:
- return end_user_credentials_accessed()
+EventTypeEnum = typing.Union[
+ typing.Literal[
+ "CREATED_REMOTE_PRODUCTION_API_KEY",
+ "DELETED_REMOTE_PRODUCTION_API_KEY",
+ "CREATED_TEST_API_KEY",
+ "DELETED_TEST_API_KEY",
+ "REGENERATED_PRODUCTION_API_KEY",
+ "INVITED_USER",
+ "TWO_FACTOR_AUTH_ENABLED",
+ "TWO_FACTOR_AUTH_DISABLED",
+ "DELETED_LINKED_ACCOUNT",
+ "CREATED_DESTINATION",
+ "DELETED_DESTINATION",
+ "CHANGED_DESTINATION",
+ "CHANGED_SCOPES",
+ "CHANGED_PERSONAL_INFORMATION",
+ "CHANGED_ORGANIZATION_SETTINGS",
+ "ENABLED_INTEGRATION",
+ "DISABLED_INTEGRATION",
+ "ENABLED_CATEGORY",
+ "DISABLED_CATEGORY",
+ "CHANGED_PASSWORD",
+ "RESET_PASSWORD",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION",
+ "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT",
+ "CREATED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CREATED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "DELETED_INTEGRATION_WIDE_FIELD_MAPPING",
+ "DELETED_LINKED_ACCOUNT_FIELD_MAPPING",
+ "FORCED_LINKED_ACCOUNT_RESYNC",
+ "MUTED_ISSUE",
+ "GENERATED_MAGIC_LINK",
+ "ENABLED_MERGE_WEBHOOK",
+ "DISABLED_MERGE_WEBHOOK",
+ "MERGE_WEBHOOK_TARGET_CHANGED",
+ "END_USER_CREDENTIALS_ACCESSED",
+ ],
+ typing.Any,
+]
diff --git a/src/merge/resources/ticketing/types/external_target_field_api.py b/src/merge/resources/ticketing/types/external_target_field_api.py
index a97d536a..18988d44 100644
--- a/src/merge/resources/ticketing/types/external_target_field_api.py
+++ b/src/merge/resources/ticketing/types/external_target_field_api.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ExternalTargetFieldApi(pydantic_v1.BaseModel):
+class ExternalTargetFieldApi(UniversalBaseModel):
name: typing.Optional[str]
description: typing.Optional[str]
is_mapped: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/external_target_field_api_response.py b/src/merge/resources/ticketing/types/external_target_field_api_response.py
index a7edc1b3..09c7f0e6 100644
--- a/src/merge/resources/ticketing/types/external_target_field_api_response.py
+++ b/src/merge/resources/ticketing/types/external_target_field_api_response.py
@@ -1,42 +1,30 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .external_target_field_api import ExternalTargetFieldApi
-
-
-class ExternalTargetFieldApiResponse(pydantic_v1.BaseModel):
- ticket: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Ticket")
- comment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Comment")
- project: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Project")
- collection: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Collection")
- user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="User")
- role: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Role")
- account: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Account")
- team: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Team")
- attachment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Attachment")
- tag: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Tag")
- contact: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic_v1.Field(alias="Contact")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class ExternalTargetFieldApiResponse(UniversalBaseModel):
+ ticket: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Ticket")
+ comment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Comment")
+ project: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Project")
+ collection: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Collection")
+ user: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="User")
+ role: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Role")
+ account: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Account")
+ team: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Team")
+ attachment: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Attachment")
+ tag: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Tag")
+ contact: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Contact")
+
+ 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/merge/resources/ticketing/types/field_format_enum.py b/src/merge/resources/ticketing/types/field_format_enum.py
index 9d80b73d..9c904dc8 100644
--- a/src/merge/resources/ticketing/types/field_format_enum.py
+++ b/src/merge/resources/ticketing/types/field_format_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FieldFormatEnum(str, enum.Enum):
- """
- - `string` - string
- - `number` - number
- - `date` - date
- - `datetime` - datetime
- - `bool` - bool
- - `list` - list
- """
-
- STRING = "string"
- NUMBER = "number"
- DATE = "date"
- DATETIME = "datetime"
- BOOL = "bool"
- LIST = "list"
-
- def visit(
- self,
- string: typing.Callable[[], T_Result],
- number: typing.Callable[[], T_Result],
- date: typing.Callable[[], T_Result],
- datetime: typing.Callable[[], T_Result],
- bool_: typing.Callable[[], T_Result],
- list_: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FieldFormatEnum.STRING:
- return string()
- if self is FieldFormatEnum.NUMBER:
- return number()
- if self is FieldFormatEnum.DATE:
- return date()
- if self is FieldFormatEnum.DATETIME:
- return datetime()
- if self is FieldFormatEnum.BOOL:
- return bool_()
- if self is FieldFormatEnum.LIST:
- return list_()
+FieldFormatEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/field_mapping_api_instance.py b/src/merge/resources/ticketing/types/field_mapping_api_instance.py
index d9d7670d..ef4d9c48 100644
--- a/src/merge/resources/ticketing/types/field_mapping_api_instance.py
+++ b/src/merge/resources/ticketing/types/field_mapping_api_instance.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
from .field_mapping_api_instance_target_field import FieldMappingApiInstanceTargetField
+from .field_mapping_api_instance_remote_field import FieldMappingApiInstanceRemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingApiInstance(pydantic_v1.BaseModel):
+class FieldMappingApiInstance(UniversalBaseModel):
id: typing.Optional[str]
is_integration_wide: typing.Optional[bool]
target_field: typing.Optional[FieldMappingApiInstanceTargetField]
remote_field: typing.Optional[FieldMappingApiInstanceRemoteField]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/field_mapping_api_instance_remote_field.py b/src/merge/resources/ticketing/types/field_mapping_api_instance_remote_field.py
index 9539d3dc..ddfff4da 100644
--- a/src/merge/resources/ticketing/types/field_mapping_api_instance_remote_field.py
+++ b/src/merge/resources/ticketing/types/field_mapping_api_instance_remote_field.py
@@ -1,36 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
from .field_mapping_api_instance_remote_field_remote_endpoint_info import (
FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo,
)
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class FieldMappingApiInstanceRemoteField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteField(UniversalBaseModel):
remote_key_name: str
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py b/src/merge/resources/ticketing/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
index d9fcc276..14c37c76 100644
--- a/src/merge/resources/ticketing/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
+++ b/src/merge/resources/ticketing/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(UniversalBaseModel):
method: typing.Optional[str]
url_path: typing.Optional[str]
field_traversal_path: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/field_mapping_api_instance_response.py b/src/merge/resources/ticketing/types/field_mapping_api_instance_response.py
index 3386985e..36d1bcc5 100644
--- a/src/merge/resources/ticketing/types/field_mapping_api_instance_response.py
+++ b/src/merge/resources/ticketing/types/field_mapping_api_instance_response.py
@@ -1,42 +1,30 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .field_mapping_api_instance import FieldMappingApiInstance
-
-
-class FieldMappingApiInstanceResponse(pydantic_v1.BaseModel):
- ticket: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Ticket")
- comment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Comment")
- project: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Project")
- collection: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Collection")
- user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="User")
- role: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Role")
- account: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Account")
- team: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Team")
- attachment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Attachment")
- tag: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Tag")
- contact: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic_v1.Field(alias="Contact")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class FieldMappingApiInstanceResponse(UniversalBaseModel):
+ ticket: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Ticket")
+ comment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Comment")
+ project: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Project")
+ collection: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Collection")
+ user: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="User")
+ role: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Role")
+ account: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Account")
+ team: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Team")
+ attachment: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Attachment")
+ tag: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Tag")
+ contact: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Contact")
+
+ 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/merge/resources/ticketing/types/field_mapping_api_instance_target_field.py b/src/merge/resources/ticketing/types/field_mapping_api_instance_target_field.py
index 25a8dcff..a1b51052 100644
--- a/src/merge/resources/ticketing/types/field_mapping_api_instance_target_field.py
+++ b/src/merge/resources/ticketing/types/field_mapping_api_instance_target_field.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class FieldMappingApiInstanceTargetField(pydantic_v1.BaseModel):
+class FieldMappingApiInstanceTargetField(UniversalBaseModel):
name: str
description: str
is_organization_wide: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/field_mapping_instance_response.py b/src/merge/resources/ticketing/types/field_mapping_instance_response.py
index b55d2c40..a56aeb93 100644
--- a/src/merge/resources/ticketing/types/field_mapping_instance_response.py
+++ b/src/merge/resources/ticketing/types/field_mapping_instance_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from ....core.pydantic_utilities import UniversalBaseModel
from .field_mapping_api_instance import FieldMappingApiInstance
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class FieldMappingInstanceResponse(pydantic_v1.BaseModel):
+class FieldMappingInstanceResponse(UniversalBaseModel):
model: FieldMappingApiInstance
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/field_permission_deserializer.py b/src/merge/resources/ticketing/types/field_permission_deserializer.py
index 124f3deb..9670537a 100644
--- a/src/merge/resources/ticketing/types/field_permission_deserializer.py
+++ b/src/merge/resources/ticketing/types/field_permission_deserializer.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializer(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializer(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/field_permission_deserializer_request.py b/src/merge/resources/ticketing/types/field_permission_deserializer_request.py
index 65e80e75..04e14608 100644
--- a/src/merge/resources/ticketing/types/field_permission_deserializer_request.py
+++ b/src/merge/resources/ticketing/types/field_permission_deserializer_request.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+class FieldPermissionDeserializerRequest(UniversalBaseModel):
+ enabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
+ disabled: typing.Optional[typing.List[typing.Optional[typing.Any]]]
-class FieldPermissionDeserializerRequest(pydantic_v1.BaseModel):
- enabled: typing.Optional[typing.List[typing.Any]]
- disabled: typing.Optional[typing.List[typing.Any]]
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/field_type_enum.py b/src/merge/resources/ticketing/types/field_type_enum.py
index d05a1ae4..e6fa6d6f 100644
--- a/src/merge/resources/ticketing/types/field_type_enum.py
+++ b/src/merge/resources/ticketing/types/field_type_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class FieldTypeEnum(str, enum.Enum):
- """
- - `string` - string
- - `number` - number
- - `date` - date
- - `datetime` - datetime
- - `bool` - bool
- - `list` - list
- """
-
- STRING = "string"
- NUMBER = "number"
- DATE = "date"
- DATETIME = "datetime"
- BOOL = "bool"
- LIST = "list"
-
- def visit(
- self,
- string: typing.Callable[[], T_Result],
- number: typing.Callable[[], T_Result],
- date: typing.Callable[[], T_Result],
- datetime: typing.Callable[[], T_Result],
- bool_: typing.Callable[[], T_Result],
- list_: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is FieldTypeEnum.STRING:
- return string()
- if self is FieldTypeEnum.NUMBER:
- return number()
- if self is FieldTypeEnum.DATE:
- return date()
- if self is FieldTypeEnum.DATETIME:
- return datetime()
- if self is FieldTypeEnum.BOOL:
- return bool_()
- if self is FieldTypeEnum.LIST:
- return list_()
+FieldTypeEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/individual_common_model_scope_deserializer.py b/src/merge/resources/ticketing/types/individual_common_model_scope_deserializer.py
index d80ca06e..122df11c 100644
--- a/src/merge/resources/ticketing/types/individual_common_model_scope_deserializer.py
+++ b/src/merge/resources/ticketing/types/individual_common_model_scope_deserializer.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer import FieldPermissionDeserializer
from .model_permission_deserializer import ModelPermissionDeserializer
+from .field_permission_deserializer import FieldPermissionDeserializer
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializer(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializer(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializer]]
field_permissions: typing.Optional[FieldPermissionDeserializer]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/individual_common_model_scope_deserializer_request.py b/src/merge/resources/ticketing/types/individual_common_model_scope_deserializer_request.py
index 8f2e7de5..a1a80902 100644
--- a/src/merge/resources/ticketing/types/individual_common_model_scope_deserializer_request.py
+++ b/src/merge/resources/ticketing/types/individual_common_model_scope_deserializer_request.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
from .model_permission_deserializer_request import ModelPermissionDeserializerRequest
+from .field_permission_deserializer_request import FieldPermissionDeserializerRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class IndividualCommonModelScopeDeserializerRequest(pydantic_v1.BaseModel):
+class IndividualCommonModelScopeDeserializerRequest(UniversalBaseModel):
model_name: str
model_permissions: typing.Optional[typing.Dict[str, ModelPermissionDeserializerRequest]]
field_permissions: typing.Optional[FieldPermissionDeserializerRequest]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/issue.py b/src/merge/resources/ticketing/types/issue.py
index 086a0db2..5a584515 100644
--- a/src/merge/resources/ticketing/types/issue.py
+++ b/src/merge/resources/ticketing/types/issue.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue_status import IssueStatus
+import pydantic
+import datetime as dt
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Issue(pydantic_v1.BaseModel):
+class Issue(UniversalBaseModel):
id: typing.Optional[str]
- status: typing.Optional[IssueStatus] = pydantic_v1.Field()
+ status: typing.Optional[IssueStatus] = pydantic.Field()
"""
Status of the issue. Options: ('ONGOING', 'RESOLVED')
@@ -19,26 +19,17 @@ class Issue(pydantic_v1.BaseModel):
"""
error_description: str
- end_user: typing.Optional[typing.Dict[str, typing.Any]]
+ end_user: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
first_incident_time: typing.Optional[dt.datetime]
last_incident_time: typing.Optional[dt.datetime]
is_muted: typing.Optional[bool]
error_details: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/issue_status.py b/src/merge/resources/ticketing/types/issue_status.py
index 8e4d6516..59d004d8 100644
--- a/src/merge/resources/ticketing/types/issue_status.py
+++ b/src/merge/resources/ticketing/types/issue_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .issue_status_enum import IssueStatusEnum
IssueStatus = typing.Union[IssueStatusEnum, str]
diff --git a/src/merge/resources/ticketing/types/issue_status_enum.py b/src/merge/resources/ticketing/types/issue_status_enum.py
index fc2ef2b5..76eb5549 100644
--- a/src/merge/resources/ticketing/types/issue_status_enum.py
+++ b/src/merge/resources/ticketing/types/issue_status_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class IssueStatusEnum(str, enum.Enum):
- """
- - `ONGOING` - ONGOING
- - `RESOLVED` - RESOLVED
- """
-
- ONGOING = "ONGOING"
- RESOLVED = "RESOLVED"
-
- def visit(self, ongoing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
- if self is IssueStatusEnum.ONGOING:
- return ongoing()
- if self is IssueStatusEnum.RESOLVED:
- return resolved()
+IssueStatusEnum = typing.Union[typing.Literal["ONGOING", "RESOLVED"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/item_format_enum.py b/src/merge/resources/ticketing/types/item_format_enum.py
index 2e4854df..37140f1f 100644
--- a/src/merge/resources/ticketing/types/item_format_enum.py
+++ b/src/merge/resources/ticketing/types/item_format_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ItemFormatEnum(str, enum.Enum):
- """
- - `string` - uuid
- - `number` - url
- - `date` - email
- - `datetime` - phone
- - `bool` - currency
- - `list` - decimal
- """
-
- STRING = "string"
- NUMBER = "number"
- DATE = "date"
- DATETIME = "datetime"
- BOOL = "bool"
- LIST = "list"
-
- def visit(
- self,
- string: typing.Callable[[], T_Result],
- number: typing.Callable[[], T_Result],
- date: typing.Callable[[], T_Result],
- datetime: typing.Callable[[], T_Result],
- bool_: typing.Callable[[], T_Result],
- list_: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ItemFormatEnum.STRING:
- return string()
- if self is ItemFormatEnum.NUMBER:
- return number()
- if self is ItemFormatEnum.DATE:
- return date()
- if self is ItemFormatEnum.DATETIME:
- return datetime()
- if self is ItemFormatEnum.BOOL:
- return bool_()
- if self is ItemFormatEnum.LIST:
- return list_()
+ItemFormatEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/item_schema.py b/src/merge/resources/ticketing/types/item_schema.py
index 45059fd0..cfe24209 100644
--- a/src/merge/resources/ticketing/types/item_schema.py
+++ b/src/merge/resources/ticketing/types/item_schema.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .item_format_enum import ItemFormatEnum
from .item_type_enum import ItemTypeEnum
+from .item_format_enum import ItemFormatEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class ItemSchema(pydantic_v1.BaseModel):
+class ItemSchema(UniversalBaseModel):
item_type: typing.Optional[ItemTypeEnum]
item_format: typing.Optional[ItemFormatEnum]
item_choices: typing.Optional[typing.List[str]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/item_type_enum.py b/src/merge/resources/ticketing/types/item_type_enum.py
index d9b50e3f..e8873e07 100644
--- a/src/merge/resources/ticketing/types/item_type_enum.py
+++ b/src/merge/resources/ticketing/types/item_type_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ItemTypeEnum(str, enum.Enum):
- """
- - `string` - string
- - `number` - number
- - `date` - date
- - `datetime` - datetime
- - `bool` - bool
- - `list` - list
- """
-
- STRING = "string"
- NUMBER = "number"
- DATE = "date"
- DATETIME = "datetime"
- BOOL = "bool"
- LIST = "list"
-
- def visit(
- self,
- string: typing.Callable[[], T_Result],
- number: typing.Callable[[], T_Result],
- date: typing.Callable[[], T_Result],
- datetime: typing.Callable[[], T_Result],
- bool_: typing.Callable[[], T_Result],
- list_: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is ItemTypeEnum.STRING:
- return string()
- if self is ItemTypeEnum.NUMBER:
- return number()
- if self is ItemTypeEnum.DATE:
- return date()
- if self is ItemTypeEnum.DATETIME:
- return datetime()
- if self is ItemTypeEnum.BOOL:
- return bool_()
- if self is ItemTypeEnum.LIST:
- return list_()
+ItemTypeEnum = typing.Union[typing.Literal["string", "number", "date", "datetime", "bool", "list"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/link_token.py b/src/merge/resources/ticketing/types/link_token.py
index 1c82d1ac..1d25dddb 100644
--- a/src/merge/resources/ticketing/types/link_token.py
+++ b/src/merge/resources/ticketing/types/link_token.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkToken(pydantic_v1.BaseModel):
+class LinkToken(UniversalBaseModel):
link_token: str
integration_name: typing.Optional[str]
magic_link_url: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/linked_account_status.py b/src/merge/resources/ticketing/types/linked_account_status.py
index 60e21a98..2e27df33 100644
--- a/src/merge/resources/ticketing/types/linked_account_status.py
+++ b/src/merge/resources/ticketing/types/linked_account_status.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class LinkedAccountStatus(pydantic_v1.BaseModel):
+class LinkedAccountStatus(UniversalBaseModel):
linked_account_status: str
can_make_request: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/meta_response.py b/src/merge/resources/ticketing/types/meta_response.py
index debaf4ef..44e57fde 100644
--- a/src/merge/resources/ticketing/types/meta_response.py
+++ b/src/merge/resources/ticketing/types/meta_response.py
@@ -1,34 +1,24 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .linked_account_status import LinkedAccountStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class MetaResponse(pydantic_v1.BaseModel):
- request_schema: typing.Dict[str, typing.Any]
- remote_field_classes: typing.Optional[typing.Dict[str, typing.Any]]
+class MetaResponse(UniversalBaseModel):
+ request_schema: typing.Dict[str, typing.Optional[typing.Any]]
+ remote_field_classes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
status: typing.Optional[LinkedAccountStatus]
has_conditional_params: bool
has_required_linked_account_params: bool
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/method_enum.py b/src/merge/resources/ticketing/types/method_enum.py
index c2418a83..e782e49c 100644
--- a/src/merge/resources/ticketing/types/method_enum.py
+++ b/src/merge/resources/ticketing/types/method_enum.py
@@ -1,51 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class MethodEnum(str, enum.Enum):
- """
- - `GET` - GET
- - `OPTIONS` - OPTIONS
- - `HEAD` - HEAD
- - `POST` - POST
- - `PUT` - PUT
- - `PATCH` - PATCH
- - `DELETE` - DELETE
- """
-
- GET = "GET"
- OPTIONS = "OPTIONS"
- HEAD = "HEAD"
- POST = "POST"
- PUT = "PUT"
- PATCH = "PATCH"
- DELETE = "DELETE"
-
- def visit(
- self,
- get: typing.Callable[[], T_Result],
- options: typing.Callable[[], T_Result],
- head: typing.Callable[[], T_Result],
- post: typing.Callable[[], T_Result],
- put: typing.Callable[[], T_Result],
- patch: typing.Callable[[], T_Result],
- delete: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is MethodEnum.GET:
- return get()
- if self is MethodEnum.OPTIONS:
- return options()
- if self is MethodEnum.HEAD:
- return head()
- if self is MethodEnum.POST:
- return post()
- if self is MethodEnum.PUT:
- return put()
- if self is MethodEnum.PATCH:
- return patch()
- if self is MethodEnum.DELETE:
- return delete()
+MethodEnum = typing.Union[typing.Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/model_operation.py b/src/merge/resources/ticketing/types/model_operation.py
index 0f4429ec..2a12b6d5 100644
--- a/src/merge/resources/ticketing/types/model_operation.py
+++ b/src/merge/resources/ticketing/types/model_operation.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelOperation(pydantic_v1.BaseModel):
+class ModelOperation(UniversalBaseModel):
"""
# The ModelOperation Object
@@ -25,20 +24,11 @@ class ModelOperation(pydantic_v1.BaseModel):
required_post_parameters: typing.List[str]
supported_fields: typing.List[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/model_permission_deserializer.py b/src/merge/resources/ticketing/types/model_permission_deserializer.py
index 5a6adf20..b6d813e4 100644
--- a/src/merge/resources/ticketing/types/model_permission_deserializer.py
+++ b/src/merge/resources/ticketing/types/model_permission_deserializer.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializer(pydantic_v1.BaseModel):
+class ModelPermissionDeserializer(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/model_permission_deserializer_request.py b/src/merge/resources/ticketing/types/model_permission_deserializer_request.py
index 3f72b9ac..5885627b 100644
--- a/src/merge/resources/ticketing/types/model_permission_deserializer_request.py
+++ b/src/merge/resources/ticketing/types/model_permission_deserializer_request.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ModelPermissionDeserializerRequest(pydantic_v1.BaseModel):
+class ModelPermissionDeserializerRequest(UniversalBaseModel):
is_enabled: typing.Optional[bool]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/multipart_form_field_request.py b/src/merge/resources/ticketing/types/multipart_form_field_request.py
index 9c8ffb21..80099016 100644
--- a/src/merge/resources/ticketing/types/multipart_form_field_request.py
+++ b/src/merge/resources/ticketing/types/multipart_form_field_request.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+import pydantic
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .multipart_form_field_request_encoding import MultipartFormFieldRequestEncoding
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class MultipartFormFieldRequest(pydantic_v1.BaseModel):
+class MultipartFormFieldRequest(UniversalBaseModel):
"""
# The MultipartFormField Object
@@ -21,17 +20,17 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
Create a `MultipartFormField` to define a multipart form entry.
"""
- name: str = pydantic_v1.Field()
+ name: str = pydantic.Field()
"""
The name of the form field
"""
- data: str = pydantic_v1.Field()
+ data: str = pydantic.Field()
"""
The data for the form field.
"""
- encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic_v1.Field()
+ encoding: typing.Optional[MultipartFormFieldRequestEncoding] = pydantic.Field()
"""
The encoding of the value of `data`. Defaults to `RAW` if not defined.
@@ -40,30 +39,21 @@ class MultipartFormFieldRequest(pydantic_v1.BaseModel):
- `GZIP_BASE64` - GZIP_BASE64
"""
- file_name: typing.Optional[str] = pydantic_v1.Field()
+ file_name: typing.Optional[str] = pydantic.Field()
"""
The file name of the form field, if the field is for a file.
"""
- content_type: typing.Optional[str] = pydantic_v1.Field()
+ content_type: typing.Optional[str] = pydantic.Field()
"""
The MIME type of the file, if the field is for a file.
"""
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/multipart_form_field_request_encoding.py b/src/merge/resources/ticketing/types/multipart_form_field_request_encoding.py
index c6513b6b..2b1db5ad 100644
--- a/src/merge/resources/ticketing/types/multipart_form_field_request_encoding.py
+++ b/src/merge/resources/ticketing/types/multipart_form_field_request_encoding.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .encoding_enum import EncodingEnum
MultipartFormFieldRequestEncoding = typing.Union[EncodingEnum, str]
diff --git a/src/merge/resources/ticketing/types/paginated_account_details_and_actions_list.py b/src/merge/resources/ticketing/types/paginated_account_details_and_actions_list.py
index 280100c4..a9128c76 100644
--- a/src/merge/resources/ticketing/types/paginated_account_details_and_actions_list.py
+++ b/src/merge/resources/ticketing/types/paginated_account_details_and_actions_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account_details_and_actions import AccountDetailsAndActions
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountDetailsAndActionsList(pydantic_v1.BaseModel):
+class PaginatedAccountDetailsAndActionsList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AccountDetailsAndActions]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_account_list.py b/src/merge/resources/ticketing/types/paginated_account_list.py
index 21d2cda1..b49c8fba 100644
--- a/src/merge/resources/ticketing/types/paginated_account_list.py
+++ b/src/merge/resources/ticketing/types/paginated_account_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .account import Account
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAccountList(pydantic_v1.BaseModel):
+class PaginatedAccountList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Account]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_attachment_list.py b/src/merge/resources/ticketing/types/paginated_attachment_list.py
index 52f28d1b..88a4d9cd 100644
--- a/src/merge/resources/ticketing/types/paginated_attachment_list.py
+++ b/src/merge/resources/ticketing/types/paginated_attachment_list.py
@@ -1,32 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .attachment import Attachment
+from .collection import Collection
+from .ticket import Ticket
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedAttachmentList(pydantic_v1.BaseModel):
+class PaginatedAttachmentList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Attachment]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, PaginatedAttachmentList=PaginatedAttachmentList)
+update_forward_refs(Collection, PaginatedAttachmentList=PaginatedAttachmentList)
+update_forward_refs(Ticket, PaginatedAttachmentList=PaginatedAttachmentList)
diff --git a/src/merge/resources/ticketing/types/paginated_audit_log_event_list.py b/src/merge/resources/ticketing/types/paginated_audit_log_event_list.py
index 1d4154d2..a50b7c75 100644
--- a/src/merge/resources/ticketing/types/paginated_audit_log_event_list.py
+++ b/src/merge/resources/ticketing/types/paginated_audit_log_event_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .audit_log_event import AuditLogEvent
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedAuditLogEventList(pydantic_v1.BaseModel):
+class PaginatedAuditLogEventList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[AuditLogEvent]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_collection_list.py b/src/merge/resources/ticketing/types/paginated_collection_list.py
index 28f19e7a..1a5fd591 100644
--- a/src/merge/resources/ticketing/types/paginated_collection_list.py
+++ b/src/merge/resources/ticketing/types/paginated_collection_list.py
@@ -1,32 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .collection import Collection
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedCollectionList(pydantic_v1.BaseModel):
+class PaginatedCollectionList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Collection]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Collection, PaginatedCollectionList=PaginatedCollectionList)
diff --git a/src/merge/resources/ticketing/types/paginated_comment_list.py b/src/merge/resources/ticketing/types/paginated_comment_list.py
index 73662dfc..6fb104d0 100644
--- a/src/merge/resources/ticketing/types/paginated_comment_list.py
+++ b/src/merge/resources/ticketing/types/paginated_comment_list.py
@@ -1,32 +1,32 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .attachment import Attachment
+from .collection import Collection
+from .ticket import Ticket
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .comment import Comment
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedCommentList(pydantic_v1.BaseModel):
+class PaginatedCommentList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Comment]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, PaginatedCommentList=PaginatedCommentList)
+update_forward_refs(Collection, PaginatedCommentList=PaginatedCommentList)
+update_forward_refs(Ticket, PaginatedCommentList=PaginatedCommentList)
diff --git a/src/merge/resources/ticketing/types/paginated_contact_list.py b/src/merge/resources/ticketing/types/paginated_contact_list.py
index dbe7c925..07c47744 100644
--- a/src/merge/resources/ticketing/types/paginated_contact_list.py
+++ b/src/merge/resources/ticketing/types/paginated_contact_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .contact import Contact
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedContactList(pydantic_v1.BaseModel):
+class PaginatedContactList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Contact]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_issue_list.py b/src/merge/resources/ticketing/types/paginated_issue_list.py
index 1016e29a..12b866d9 100644
--- a/src/merge/resources/ticketing/types/paginated_issue_list.py
+++ b/src/merge/resources/ticketing/types/paginated_issue_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .issue import Issue
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedIssueList(pydantic_v1.BaseModel):
+class PaginatedIssueList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Issue]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_project_list.py b/src/merge/resources/ticketing/types/paginated_project_list.py
index ee0990dd..2b4f6480 100644
--- a/src/merge/resources/ticketing/types/paginated_project_list.py
+++ b/src/merge/resources/ticketing/types/paginated_project_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .project import Project
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedProjectList(pydantic_v1.BaseModel):
+class PaginatedProjectList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Project]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_remote_field_class_list.py b/src/merge/resources/ticketing/types/paginated_remote_field_class_list.py
index 9105daee..1f51ab63 100644
--- a/src/merge/resources/ticketing/types/paginated_remote_field_class_list.py
+++ b/src/merge/resources/ticketing/types/paginated_remote_field_class_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_field_class import RemoteFieldClass
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedRemoteFieldClassList(pydantic_v1.BaseModel):
+class PaginatedRemoteFieldClassList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[RemoteFieldClass]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_role_list.py b/src/merge/resources/ticketing/types/paginated_role_list.py
index 162386fe..c69e65ca 100644
--- a/src/merge/resources/ticketing/types/paginated_role_list.py
+++ b/src/merge/resources/ticketing/types/paginated_role_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .role import Role
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedRoleList(pydantic_v1.BaseModel):
+class PaginatedRoleList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Role]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_sync_status_list.py b/src/merge/resources/ticketing/types/paginated_sync_status_list.py
index 6c88197e..f59f2c9a 100644
--- a/src/merge/resources/ticketing/types/paginated_sync_status_list.py
+++ b/src/merge/resources/ticketing/types/paginated_sync_status_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .sync_status import SyncStatus
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedSyncStatusList(pydantic_v1.BaseModel):
+class PaginatedSyncStatusList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[SyncStatus]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_tag_list.py b/src/merge/resources/ticketing/types/paginated_tag_list.py
index a41f1d61..9c632ec6 100644
--- a/src/merge/resources/ticketing/types/paginated_tag_list.py
+++ b/src/merge/resources/ticketing/types/paginated_tag_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .tag import Tag
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedTagList(pydantic_v1.BaseModel):
+class PaginatedTagList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Tag]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_team_list.py b/src/merge/resources/ticketing/types/paginated_team_list.py
index fdb9e669..50c12445 100644
--- a/src/merge/resources/ticketing/types/paginated_team_list.py
+++ b/src/merge/resources/ticketing/types/paginated_team_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .team import Team
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedTeamList(pydantic_v1.BaseModel):
+class PaginatedTeamList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Team]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/paginated_ticket_list.py b/src/merge/resources/ticketing/types/paginated_ticket_list.py
index 32ce26a9..c499fc45 100644
--- a/src/merge/resources/ticketing/types/paginated_ticket_list.py
+++ b/src/merge/resources/ticketing/types/paginated_ticket_list.py
@@ -1,32 +1,31 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .attachment import Attachment
+from .collection import Collection
from .ticket import Ticket
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class PaginatedTicketList(pydantic_v1.BaseModel):
+class PaginatedTicketList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[Ticket]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, PaginatedTicketList=PaginatedTicketList)
+update_forward_refs(Collection, PaginatedTicketList=PaginatedTicketList)
+update_forward_refs(Ticket, PaginatedTicketList=PaginatedTicketList)
diff --git a/src/merge/resources/ticketing/types/paginated_user_list.py b/src/merge/resources/ticketing/types/paginated_user_list.py
index 6faaf352..98e9b7e5 100644
--- a/src/merge/resources/ticketing/types/paginated_user_list.py
+++ b/src/merge/resources/ticketing/types/paginated_user_list.py
@@ -1,32 +1,22 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .user import User
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class PaginatedUserList(pydantic_v1.BaseModel):
+class PaginatedUserList(UniversalBaseModel):
next: typing.Optional[str]
previous: typing.Optional[str]
results: typing.Optional[typing.List[User]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/patched_ticket_request.py b/src/merge/resources/ticketing/types/patched_ticket_request.py
index 7dce49e3..d3cd3037 100644
--- a/src/merge/resources/ticketing/types/patched_ticket_request.py
+++ b/src/merge/resources/ticketing/types/patched_ticket_request.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .patched_ticket_request_priority import PatchedTicketRequestPriority
+import pydantic
+import datetime as dt
from .patched_ticket_request_status import PatchedTicketRequestStatus
+from .patched_ticket_request_priority import PatchedTicketRequestPriority
from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class PatchedTicketRequest(pydantic_v1.BaseModel):
+class PatchedTicketRequest(UniversalBaseModel):
"""
# The Ticket Object
@@ -23,23 +23,23 @@ class PatchedTicketRequest(pydantic_v1.BaseModel):
TODO
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The ticket's name.
"""
assignees: typing.Optional[typing.List[typing.Optional[str]]]
- creator: typing.Optional[str] = pydantic_v1.Field()
+ creator: typing.Optional[str] = pydantic.Field()
"""
The user who created this ticket.
"""
- due_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ due_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The ticket's due date.
"""
- status: typing.Optional[PatchedTicketRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[PatchedTicketRequestStatus] = pydantic.Field()
"""
The current status of the ticket.
@@ -49,44 +49,44 @@ class PatchedTicketRequest(pydantic_v1.BaseModel):
- `ON_HOLD` - ON_HOLD
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The ticketβs description. HTML version of description is mapped if supported by the third-party platform.
"""
collections: typing.Optional[typing.List[typing.Optional[str]]]
- ticket_type: typing.Optional[str] = pydantic_v1.Field()
+ ticket_type: typing.Optional[str] = pydantic.Field()
"""
The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do.
"""
- account: typing.Optional[str] = pydantic_v1.Field()
+ account: typing.Optional[str] = pydantic.Field()
"""
The account associated with the ticket.
"""
- contact: typing.Optional[str] = pydantic_v1.Field()
+ contact: typing.Optional[str] = pydantic.Field()
"""
The contact associated with the ticket.
"""
- parent_ticket: typing.Optional[str] = pydantic_v1.Field()
+ parent_ticket: typing.Optional[str] = pydantic.Field()
"""
The ticket's parent ticket.
"""
tags: typing.Optional[typing.List[typing.Optional[str]]]
- completed_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ completed_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the ticket was completed.
"""
- ticket_url: typing.Optional[str] = pydantic_v1.Field()
+ ticket_url: typing.Optional[str] = pydantic.Field()
"""
The 3rd party url of the Ticket.
"""
- priority: typing.Optional[PatchedTicketRequestPriority] = pydantic_v1.Field()
+ priority: typing.Optional[PatchedTicketRequestPriority] = pydantic.Field()
"""
The priority or urgency of the Ticket.
@@ -96,24 +96,15 @@ class PatchedTicketRequest(pydantic_v1.BaseModel):
- `LOW` - LOW
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/patched_ticket_request_priority.py b/src/merge/resources/ticketing/types/patched_ticket_request_priority.py
index 73651006..8dffd97f 100644
--- a/src/merge/resources/ticketing/types/patched_ticket_request_priority.py
+++ b/src/merge/resources/ticketing/types/patched_ticket_request_priority.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .priority_enum import PriorityEnum
PatchedTicketRequestPriority = typing.Union[PriorityEnum, str]
diff --git a/src/merge/resources/ticketing/types/patched_ticket_request_status.py b/src/merge/resources/ticketing/types/patched_ticket_request_status.py
index 190fd41f..67c89966 100644
--- a/src/merge/resources/ticketing/types/patched_ticket_request_status.py
+++ b/src/merge/resources/ticketing/types/patched_ticket_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket_status_enum import TicketStatusEnum
PatchedTicketRequestStatus = typing.Union[TicketStatusEnum, str]
diff --git a/src/merge/resources/ticketing/types/priority_enum.py b/src/merge/resources/ticketing/types/priority_enum.py
index 62f03f27..3a1f8c96 100644
--- a/src/merge/resources/ticketing/types/priority_enum.py
+++ b/src/merge/resources/ticketing/types/priority_enum.py
@@ -1,36 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class PriorityEnum(str, enum.Enum):
- """
- - `URGENT` - URGENT
- - `HIGH` - HIGH
- - `NORMAL` - NORMAL
- - `LOW` - LOW
- """
-
- URGENT = "URGENT"
- HIGH = "HIGH"
- NORMAL = "NORMAL"
- LOW = "LOW"
-
- def visit(
- self,
- urgent: typing.Callable[[], T_Result],
- high: typing.Callable[[], T_Result],
- normal: typing.Callable[[], T_Result],
- low: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is PriorityEnum.URGENT:
- return urgent()
- if self is PriorityEnum.HIGH:
- return high()
- if self is PriorityEnum.NORMAL:
- return normal()
- if self is PriorityEnum.LOW:
- return low()
+PriorityEnum = typing.Union[typing.Literal["URGENT", "HIGH", "NORMAL", "LOW"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/project.py b/src/merge/resources/ticketing/types/project.py
index d1744e87..d0bbf683 100644
--- a/src/merge/resources/ticketing/types/project.py
+++ b/src/merge/resources/ticketing/types/project.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Project(pydantic_v1.BaseModel):
+class Project(UniversalBaseModel):
"""
# The Project Object
@@ -22,53 +22,44 @@ class Project(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The project's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The project's description.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_data.py b/src/merge/resources/ticketing/types/remote_data.py
index 098f551b..27c2a5f2 100644
--- a/src/merge/resources/ticketing/types/remote_data.py
+++ b/src/merge/resources/ticketing/types/remote_data.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteData(pydantic_v1.BaseModel):
+class RemoteData(UniversalBaseModel):
path: str
- data: typing.Optional[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ data: typing.Optional[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_endpoint_info.py b/src/merge/resources/ticketing/types/remote_endpoint_info.py
index da6037bc..454688d0 100644
--- a/src/merge/resources/ticketing/types/remote_endpoint_info.py
+++ b/src/merge/resources/ticketing/types/remote_endpoint_info.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteEndpointInfo(pydantic_v1.BaseModel):
+class RemoteEndpointInfo(UniversalBaseModel):
method: str
url_path: str
- field_traversal_path: typing.List[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ field_traversal_path: typing.List[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_field.py b/src/merge/resources/ticketing/types/remote_field.py
index 6d504ed7..0d50d6c8 100644
--- a/src/merge/resources/ticketing/types/remote_field.py
+++ b/src/merge/resources/ticketing/types/remote_field.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .remote_field_remote_field_class import RemoteFieldRemoteFieldClass
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteField(pydantic_v1.BaseModel):
+class RemoteField(UniversalBaseModel):
remote_field_class: RemoteFieldRemoteFieldClass
- value: typing.Optional[typing.Any]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ value: typing.Optional[typing.Optional[typing.Any]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_field_api.py b/src/merge/resources/ticketing/types/remote_field_api.py
index ffa9299c..18f2421d 100644
--- a/src/merge/resources/ticketing/types/remote_field_api.py
+++ b/src/merge/resources/ticketing/types/remote_field_api.py
@@ -1,39 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .advanced_metadata import AdvancedMetadata
+import pydantic
from .remote_endpoint_info import RemoteEndpointInfo
+from .advanced_metadata import AdvancedMetadata
from .remote_field_api_coverage import RemoteFieldApiCoverage
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class RemoteFieldApi(pydantic_v1.BaseModel):
- schema_: typing.Dict[str, typing.Any] = pydantic_v1.Field(alias="schema")
+class RemoteFieldApi(UniversalBaseModel):
+ schema_: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field(alias="schema")
remote_key_name: str
remote_endpoint_info: RemoteEndpointInfo
- example_values: typing.Optional[typing.List[typing.Any]]
+ example_values: typing.Optional[typing.List[typing.Optional[typing.Any]]]
advanced_metadata: typing.Optional[AdvancedMetadata]
coverage: typing.Optional[RemoteFieldApiCoverage]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_field_api_response.py b/src/merge/resources/ticketing/types/remote_field_api_response.py
index 0b04afcf..d4f76a3e 100644
--- a/src/merge/resources/ticketing/types/remote_field_api_response.py
+++ b/src/merge/resources/ticketing/types/remote_field_api_response.py
@@ -1,42 +1,30 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .remote_field_api import RemoteFieldApi
-
-
-class RemoteFieldApiResponse(pydantic_v1.BaseModel):
- ticket: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Ticket")
- comment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Comment")
- project: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Project")
- collection: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Collection")
- user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="User")
- role: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Role")
- account: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Account")
- team: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Team")
- attachment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Attachment")
- tag: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Tag")
- contact: typing.Optional[typing.List[RemoteFieldApi]] = pydantic_v1.Field(alias="Contact")
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
-
- class Config:
- frozen = True
- smart_union = True
- allow_population_by_field_name = True
- populate_by_name = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class RemoteFieldApiResponse(UniversalBaseModel):
+ ticket: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Ticket")
+ comment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Comment")
+ project: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Project")
+ collection: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Collection")
+ user: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="User")
+ role: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Role")
+ account: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Account")
+ team: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Team")
+ attachment: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Attachment")
+ tag: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Tag")
+ contact: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Contact")
+
+ 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/merge/resources/ticketing/types/remote_field_class.py b/src/merge/resources/ticketing/types/remote_field_class.py
index d8f7a788..7abfc779 100644
--- a/src/merge/resources/ticketing/types/remote_field_class.py
+++ b/src/merge/resources/ticketing/types/remote_field_class.py
@@ -1,17 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .item_schema import ItemSchema
-from .remote_field_class_field_choices_item import RemoteFieldClassFieldChoicesItem
-from .remote_field_class_field_format import RemoteFieldClassFieldFormat
from .remote_field_class_field_type import RemoteFieldClassFieldType
+from .remote_field_class_field_format import RemoteFieldClassFieldFormat
+from .remote_field_class_field_choices_item import RemoteFieldClassFieldChoicesItem
+from .item_schema import ItemSchema
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteFieldClass(pydantic_v1.BaseModel):
+class RemoteFieldClass(UniversalBaseModel):
id: typing.Optional[str]
display_name: typing.Optional[str]
remote_key_name: typing.Optional[str]
@@ -23,20 +22,11 @@ class RemoteFieldClass(pydantic_v1.BaseModel):
field_choices: typing.Optional[typing.List[RemoteFieldClassFieldChoicesItem]]
item_schema: typing.Optional[ItemSchema]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_field_class_field_choices_item.py b/src/merge/resources/ticketing/types/remote_field_class_field_choices_item.py
index 19926fa0..8ae991ae 100644
--- a/src/merge/resources/ticketing/types/remote_field_class_field_choices_item.py
+++ b/src/merge/resources/ticketing/types/remote_field_class_field_choices_item.py
@@ -1,30 +1,20 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteFieldClassFieldChoicesItem(pydantic_v1.BaseModel):
- value: typing.Optional[typing.Any]
+class RemoteFieldClassFieldChoicesItem(UniversalBaseModel):
+ value: typing.Optional[typing.Optional[typing.Any]]
display_name: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_field_class_field_format.py b/src/merge/resources/ticketing/types/remote_field_class_field_format.py
index 1412d3b4..1442a203 100644
--- a/src/merge/resources/ticketing/types/remote_field_class_field_format.py
+++ b/src/merge/resources/ticketing/types/remote_field_class_field_format.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .field_format_enum import FieldFormatEnum
RemoteFieldClassFieldFormat = typing.Union[str, FieldFormatEnum]
diff --git a/src/merge/resources/ticketing/types/remote_field_class_field_type.py b/src/merge/resources/ticketing/types/remote_field_class_field_type.py
index 41a0b893..c5d32983 100644
--- a/src/merge/resources/ticketing/types/remote_field_class_field_type.py
+++ b/src/merge/resources/ticketing/types/remote_field_class_field_type.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .field_type_enum import FieldTypeEnum
RemoteFieldClassFieldType = typing.Union[str, FieldTypeEnum]
diff --git a/src/merge/resources/ticketing/types/remote_field_remote_field_class.py b/src/merge/resources/ticketing/types/remote_field_remote_field_class.py
index b7ab0ef6..c2c470c9 100644
--- a/src/merge/resources/ticketing/types/remote_field_remote_field_class.py
+++ b/src/merge/resources/ticketing/types/remote_field_remote_field_class.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_field_class import RemoteFieldClass
RemoteFieldRemoteFieldClass = typing.Union[str, RemoteFieldClass]
diff --git a/src/merge/resources/ticketing/types/remote_field_request.py b/src/merge/resources/ticketing/types/remote_field_request.py
index 84d08873..6483b16a 100644
--- a/src/merge/resources/ticketing/types/remote_field_request.py
+++ b/src/merge/resources/ticketing/types/remote_field_request.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .remote_field_request_remote_field_class import RemoteFieldRequestRemoteFieldClass
+import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteFieldRequest(pydantic_v1.BaseModel):
+class RemoteFieldRequest(UniversalBaseModel):
remote_field_class: RemoteFieldRequestRemoteFieldClass
value: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_field_request_remote_field_class.py b/src/merge/resources/ticketing/types/remote_field_request_remote_field_class.py
index 08797e5e..ebf56780 100644
--- a/src/merge/resources/ticketing/types/remote_field_request_remote_field_class.py
+++ b/src/merge/resources/ticketing/types/remote_field_request_remote_field_class.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .remote_field_class import RemoteFieldClass
RemoteFieldRequestRemoteFieldClass = typing.Union[str, RemoteFieldClass]
diff --git a/src/merge/resources/ticketing/types/remote_key.py b/src/merge/resources/ticketing/types/remote_key.py
index e0bec368..7a61c212 100644
--- a/src/merge/resources/ticketing/types/remote_key.py
+++ b/src/merge/resources/ticketing/types/remote_key.py
@@ -1,13 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class RemoteKey(pydantic_v1.BaseModel):
+class RemoteKey(UniversalBaseModel):
"""
# The RemoteKey Object
@@ -23,20 +22,11 @@ class RemoteKey(pydantic_v1.BaseModel):
name: str
key: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/remote_response.py b/src/merge/resources/ticketing/types/remote_response.py
index f39951ee..e2d1620d 100644
--- a/src/merge/resources/ticketing/types/remote_response.py
+++ b/src/merge/resources/ticketing/types/remote_response.py
@@ -1,14 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .response_type_enum import ResponseTypeEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class RemoteResponse(pydantic_v1.BaseModel):
+class RemoteResponse(UniversalBaseModel):
"""
# The RemoteResponse Object
@@ -24,25 +23,16 @@ class RemoteResponse(pydantic_v1.BaseModel):
method: str
path: str
status: int
- response: typing.Any
- response_headers: typing.Optional[typing.Dict[str, typing.Any]]
+ response: typing.Optional[typing.Any]
+ response_headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
response_type: typing.Optional[ResponseTypeEnum]
- headers: typing.Optional[typing.Dict[str, typing.Any]]
-
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ headers: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/request_format_enum.py b/src/merge/resources/ticketing/types/request_format_enum.py
index bf445b71..dc284f25 100644
--- a/src/merge/resources/ticketing/types/request_format_enum.py
+++ b/src/merge/resources/ticketing/types/request_format_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RequestFormatEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `XML` - XML
- - `MULTIPART` - MULTIPART
- """
-
- JSON = "JSON"
- XML = "XML"
- MULTIPART = "MULTIPART"
-
- def visit(
- self,
- json: typing.Callable[[], T_Result],
- xml: typing.Callable[[], T_Result],
- multipart: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RequestFormatEnum.JSON:
- return json()
- if self is RequestFormatEnum.XML:
- return xml()
- if self is RequestFormatEnum.MULTIPART:
- return multipart()
+RequestFormatEnum = typing.Union[typing.Literal["JSON", "XML", "MULTIPART"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/response_type_enum.py b/src/merge/resources/ticketing/types/response_type_enum.py
index 4b44d47d..7e4d5d30 100644
--- a/src/merge/resources/ticketing/types/response_type_enum.py
+++ b/src/merge/resources/ticketing/types/response_type_enum.py
@@ -1,22 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class ResponseTypeEnum(str, enum.Enum):
- """
- - `JSON` - JSON
- - `BASE64_GZIP` - BASE64_GZIP
- """
-
- JSON = "JSON"
- BASE_64_GZIP = "BASE64_GZIP"
-
- def visit(self, json: typing.Callable[[], T_Result], base_64_gzip: typing.Callable[[], T_Result]) -> T_Result:
- if self is ResponseTypeEnum.JSON:
- return json()
- if self is ResponseTypeEnum.BASE_64_GZIP:
- return base_64_gzip()
+ResponseTypeEnum = typing.Union[typing.Literal["JSON", "BASE64_GZIP"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/role.py b/src/merge/resources/ticketing/types/role.py
index acc9822f..14c12ded 100644
--- a/src/merge/resources/ticketing/types/role.py
+++ b/src/merge/resources/ticketing/types/role.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
-from .role_ticket_access import RoleTicketAccess
+import pydantic
+import datetime as dt
from .role_ticket_actions_item import RoleTicketActionsItem
+from .role_ticket_access import RoleTicketAccess
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Role(pydantic_v1.BaseModel):
+class Role(UniversalBaseModel):
"""
# The Role Object
@@ -24,32 +24,32 @@ class Role(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The name of the Role.
"""
- ticket_actions: typing.Optional[typing.List[typing.Optional[RoleTicketActionsItem]]] = pydantic_v1.Field()
+ ticket_actions: typing.Optional[typing.List[typing.Optional[RoleTicketActionsItem]]] = pydantic.Field()
"""
The set of actions that a User with this Role can perform. Possible enum values include: `VIEW`, `CREATE`, `EDIT`, `DELETE`, `CLOSE`, and `ASSIGN`.
"""
- ticket_access: typing.Optional[RoleTicketAccess] = pydantic_v1.Field()
+ ticket_access: typing.Optional[RoleTicketAccess] = pydantic.Field()
"""
The level of Ticket access that a User with this Role can perform.
@@ -58,28 +58,19 @@ class Role(pydantic_v1.BaseModel):
- `TEAM_ONLY` - TEAM_ONLY
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/role_enum.py b/src/merge/resources/ticketing/types/role_enum.py
index 05e09112..65066251 100644
--- a/src/merge/resources/ticketing/types/role_enum.py
+++ b/src/merge/resources/ticketing/types/role_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class RoleEnum(str, enum.Enum):
- """
- - `ADMIN` - ADMIN
- - `DEVELOPER` - DEVELOPER
- - `MEMBER` - MEMBER
- - `API` - API
- - `SYSTEM` - SYSTEM
- - `MERGE_TEAM` - MERGE_TEAM
- """
-
- ADMIN = "ADMIN"
- DEVELOPER = "DEVELOPER"
- MEMBER = "MEMBER"
- API = "API"
- SYSTEM = "SYSTEM"
- MERGE_TEAM = "MERGE_TEAM"
-
- def visit(
- self,
- admin: typing.Callable[[], T_Result],
- developer: typing.Callable[[], T_Result],
- member: typing.Callable[[], T_Result],
- api: typing.Callable[[], T_Result],
- system: typing.Callable[[], T_Result],
- merge_team: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is RoleEnum.ADMIN:
- return admin()
- if self is RoleEnum.DEVELOPER:
- return developer()
- if self is RoleEnum.MEMBER:
- return member()
- if self is RoleEnum.API:
- return api()
- if self is RoleEnum.SYSTEM:
- return system()
- if self is RoleEnum.MERGE_TEAM:
- return merge_team()
+RoleEnum = typing.Union[typing.Literal["ADMIN", "DEVELOPER", "MEMBER", "API", "SYSTEM", "MERGE_TEAM"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/role_ticket_access.py b/src/merge/resources/ticketing/types/role_ticket_access.py
index bf10da43..702cc475 100644
--- a/src/merge/resources/ticketing/types/role_ticket_access.py
+++ b/src/merge/resources/ticketing/types/role_ticket_access.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket_access_enum import TicketAccessEnum
RoleTicketAccess = typing.Union[str, TicketAccessEnum]
diff --git a/src/merge/resources/ticketing/types/role_ticket_actions_item.py b/src/merge/resources/ticketing/types/role_ticket_actions_item.py
index 4b136989..1c7f16df 100644
--- a/src/merge/resources/ticketing/types/role_ticket_actions_item.py
+++ b/src/merge/resources/ticketing/types/role_ticket_actions_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket_actions_enum import TicketActionsEnum
RoleTicketActionsItem = typing.Union[str, TicketActionsEnum]
diff --git a/src/merge/resources/ticketing/types/selective_sync_configurations_usage_enum.py b/src/merge/resources/ticketing/types/selective_sync_configurations_usage_enum.py
index 4de6df94..baa6f2bd 100644
--- a/src/merge/resources/ticketing/types/selective_sync_configurations_usage_enum.py
+++ b/src/merge/resources/ticketing/types/selective_sync_configurations_usage_enum.py
@@ -1,24 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SelectiveSyncConfigurationsUsageEnum(str, enum.Enum):
- """
- - `IN_NEXT_SYNC` - IN_NEXT_SYNC
- - `IN_LAST_SYNC` - IN_LAST_SYNC
- """
-
- IN_NEXT_SYNC = "IN_NEXT_SYNC"
- IN_LAST_SYNC = "IN_LAST_SYNC"
-
- def visit(
- self, in_next_sync: typing.Callable[[], T_Result], in_last_sync: typing.Callable[[], T_Result]
- ) -> T_Result:
- if self is SelectiveSyncConfigurationsUsageEnum.IN_NEXT_SYNC:
- return in_next_sync()
- if self is SelectiveSyncConfigurationsUsageEnum.IN_LAST_SYNC:
- return in_last_sync()
+SelectiveSyncConfigurationsUsageEnum = typing.Union[typing.Literal["IN_NEXT_SYNC", "IN_LAST_SYNC"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/sync_status.py b/src/merge/resources/ticketing/types/sync_status.py
index c6b7cbc4..f9a62229 100644
--- a/src/merge/resources/ticketing/types/sync_status.py
+++ b/src/merge/resources/ticketing/types/sync_status.py
@@ -1,15 +1,15 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+import datetime as dt
from .sync_status_status_enum import SyncStatusStatusEnum
+from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class SyncStatus(pydantic_v1.BaseModel):
+class SyncStatus(UniversalBaseModel):
"""
# The SyncStatus Object
@@ -30,20 +30,11 @@ class SyncStatus(pydantic_v1.BaseModel):
is_initial_sync: bool
selective_sync_configurations_usage: typing.Optional[SelectiveSyncConfigurationsUsageEnum]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/sync_status_status_enum.py b/src/merge/resources/ticketing/types/sync_status_status_enum.py
index e21e3285..92814990 100644
--- a/src/merge/resources/ticketing/types/sync_status_status_enum.py
+++ b/src/merge/resources/ticketing/types/sync_status_status_enum.py
@@ -1,46 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class SyncStatusStatusEnum(str, enum.Enum):
- """
- - `SYNCING` - SYNCING
- - `DONE` - DONE
- - `FAILED` - FAILED
- - `DISABLED` - DISABLED
- - `PAUSED` - PAUSED
- - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED
- """
-
- SYNCING = "SYNCING"
- DONE = "DONE"
- FAILED = "FAILED"
- DISABLED = "DISABLED"
- PAUSED = "PAUSED"
- PARTIALLY_SYNCED = "PARTIALLY_SYNCED"
-
- def visit(
- self,
- syncing: typing.Callable[[], T_Result],
- done: typing.Callable[[], T_Result],
- failed: typing.Callable[[], T_Result],
- disabled: typing.Callable[[], T_Result],
- paused: typing.Callable[[], T_Result],
- partially_synced: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is SyncStatusStatusEnum.SYNCING:
- return syncing()
- if self is SyncStatusStatusEnum.DONE:
- return done()
- if self is SyncStatusStatusEnum.FAILED:
- return failed()
- if self is SyncStatusStatusEnum.DISABLED:
- return disabled()
- if self is SyncStatusStatusEnum.PAUSED:
- return paused()
- if self is SyncStatusStatusEnum.PARTIALLY_SYNCED:
- return partially_synced()
+SyncStatusStatusEnum = typing.Union[
+ typing.Literal["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"], typing.Any
+]
diff --git a/src/merge/resources/ticketing/types/tag.py b/src/merge/resources/ticketing/types/tag.py
index 90883143..2de98a7c 100644
--- a/src/merge/resources/ticketing/types/tag.py
+++ b/src/merge/resources/ticketing/types/tag.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Tag(pydantic_v1.BaseModel):
+class Tag(UniversalBaseModel):
"""
# The Tag Object
@@ -21,49 +21,40 @@ class Tag(pydantic_v1.BaseModel):
TODO
"""
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
id: typing.Optional[str]
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The tag's name.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/team.py b/src/merge/resources/ticketing/types/team.py
index dfe0542e..e84f9efa 100644
--- a/src/merge/resources/ticketing/types/team.py
+++ b/src/merge/resources/ticketing/types/team.py
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+import pydantic
+import datetime as dt
from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class Team(pydantic_v1.BaseModel):
+class Team(UniversalBaseModel):
"""
# The Team Object
@@ -22,53 +22,44 @@ class Team(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The team's name.
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The team's description.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/ticket.py b/src/merge/resources/ticketing/types/ticket.py
index 110d25bd..2198ade8 100644
--- a/src/merge/resources/ticketing/types/ticket.py
+++ b/src/merge/resources/ticketing/types/ticket.py
@@ -1,24 +1,25 @@
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
-
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from .collection import Collection
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
-from .remote_field import RemoteField
-from .ticket_account import TicketAccount
+import pydantic
+import datetime as dt
from .ticket_assignees_item import TicketAssigneesItem
+from .ticket_creator import TicketCreator
+from .ticket_status import TicketStatus
from .ticket_collections_item import TicketCollectionsItem
+from .ticket_account import TicketAccount
from .ticket_contact import TicketContact
-from .ticket_creator import TicketCreator
from .ticket_priority import TicketPriority
-from .ticket_status import TicketStatus
+from .remote_data import RemoteData
+from .remote_field import RemoteField
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class Ticket(pydantic_v1.BaseModel):
+class Ticket(UniversalBaseModel):
"""
# The Ticket Object
@@ -32,38 +33,38 @@ class Ticket(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The ticket's name.
"""
assignees: typing.Optional[typing.List[typing.Optional[TicketAssigneesItem]]]
- creator: typing.Optional[TicketCreator] = pydantic_v1.Field()
+ creator: typing.Optional[TicketCreator] = pydantic.Field()
"""
The user who created this ticket.
"""
- due_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ due_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The ticket's due date.
"""
- status: typing.Optional[TicketStatus] = pydantic_v1.Field()
+ status: typing.Optional[TicketStatus] = pydantic.Field()
"""
The current status of the ticket.
@@ -73,56 +74,56 @@ class Ticket(pydantic_v1.BaseModel):
- `ON_HOLD` - ON_HOLD
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The ticketβs description. HTML version of description is mapped if supported by the third-party platform.
"""
collections: typing.Optional[typing.List[typing.Optional[TicketCollectionsItem]]]
- ticket_type: typing.Optional[str] = pydantic_v1.Field()
+ ticket_type: typing.Optional[str] = pydantic.Field()
"""
The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do.
"""
- account: typing.Optional[TicketAccount] = pydantic_v1.Field()
+ account: typing.Optional[TicketAccount] = pydantic.Field()
"""
The account associated with the ticket.
"""
- contact: typing.Optional[TicketContact] = pydantic_v1.Field()
+ contact: typing.Optional[TicketContact] = pydantic.Field()
"""
The contact associated with the ticket.
"""
- parent_ticket: typing.Optional[TicketParentTicket] = pydantic_v1.Field()
+ parent_ticket: typing.Optional["TicketParentTicket"] = pydantic.Field()
"""
The ticket's parent ticket.
"""
- attachments: typing.Optional[typing.List[typing.Optional[TicketAttachmentsItem]]]
+ attachments: typing.Optional[typing.List[typing.Optional["TicketAttachmentsItem"]]]
tags: typing.Optional[typing.List[typing.Optional[str]]]
- remote_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's ticket was created.
"""
- remote_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the third party's ticket was updated.
"""
- completed_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ completed_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the ticket was completed.
"""
remote_was_deleted: typing.Optional[bool]
- ticket_url: typing.Optional[str] = pydantic_v1.Field()
+ ticket_url: typing.Optional[str] = pydantic.Field()
"""
The 3rd party url of the Ticket.
"""
- priority: typing.Optional[TicketPriority] = pydantic_v1.Field()
+ priority: typing.Optional[TicketPriority] = pydantic.Field()
"""
The priority or urgency of the Ticket.
@@ -132,30 +133,24 @@ class Ticket(pydantic_v1.BaseModel):
- `LOW` - LOW
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
remote_fields: typing.Optional[typing.List[RemoteField]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
-
-
-from .ticket_attachments_item import TicketAttachmentsItem # noqa: E402
+from .attachment import Attachment # noqa: E402
from .ticket_parent_ticket import TicketParentTicket # noqa: E402
+from .ticket_attachments_item import TicketAttachmentsItem # noqa: E402
-Ticket.update_forward_refs()
+update_forward_refs(Collection, Ticket=Ticket)
+update_forward_refs(Attachment, Ticket=Ticket)
+update_forward_refs(Ticket)
diff --git a/src/merge/resources/ticketing/types/ticket_access_enum.py b/src/merge/resources/ticketing/types/ticket_access_enum.py
index 76fadc7f..47b747b8 100644
--- a/src/merge/resources/ticketing/types/ticket_access_enum.py
+++ b/src/merge/resources/ticketing/types/ticket_access_enum.py
@@ -1,31 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketAccessEnum(str, enum.Enum):
- """
- - `ALL` - ALL
- - `ASSIGNED_ONLY` - ASSIGNED_ONLY
- - `TEAM_ONLY` - TEAM_ONLY
- """
-
- ALL = "ALL"
- ASSIGNED_ONLY = "ASSIGNED_ONLY"
- TEAM_ONLY = "TEAM_ONLY"
-
- def visit(
- self,
- all_: typing.Callable[[], T_Result],
- assigned_only: typing.Callable[[], T_Result],
- team_only: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketAccessEnum.ALL:
- return all_()
- if self is TicketAccessEnum.ASSIGNED_ONLY:
- return assigned_only()
- if self is TicketAccessEnum.TEAM_ONLY:
- return team_only()
+TicketAccessEnum = typing.Union[typing.Literal["ALL", "ASSIGNED_ONLY", "TEAM_ONLY"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/ticket_account.py b/src/merge/resources/ticketing/types/ticket_account.py
index 735aff2e..b59f8477 100644
--- a/src/merge/resources/ticketing/types/ticket_account.py
+++ b/src/merge/resources/ticketing/types/ticket_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
TicketAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/ticketing/types/ticket_actions_enum.py b/src/merge/resources/ticketing/types/ticket_actions_enum.py
index bd93c296..82d58e1e 100644
--- a/src/merge/resources/ticketing/types/ticket_actions_enum.py
+++ b/src/merge/resources/ticketing/types/ticket_actions_enum.py
@@ -1,46 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketActionsEnum(str, enum.Enum):
- """
- - `VIEW` - VIEW
- - `CREATE` - CREATE
- - `EDIT` - EDIT
- - `DELETE` - DELETE
- - `CLOSE` - CLOSE
- - `ASSIGN` - ASSIGN
- """
-
- VIEW = "VIEW"
- CREATE = "CREATE"
- EDIT = "EDIT"
- DELETE = "DELETE"
- CLOSE = "CLOSE"
- ASSIGN = "ASSIGN"
-
- def visit(
- self,
- view: typing.Callable[[], T_Result],
- create: typing.Callable[[], T_Result],
- edit: typing.Callable[[], T_Result],
- delete: typing.Callable[[], T_Result],
- close: typing.Callable[[], T_Result],
- assign: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketActionsEnum.VIEW:
- return view()
- if self is TicketActionsEnum.CREATE:
- return create()
- if self is TicketActionsEnum.EDIT:
- return edit()
- if self is TicketActionsEnum.DELETE:
- return delete()
- if self is TicketActionsEnum.CLOSE:
- return close()
- if self is TicketActionsEnum.ASSIGN:
- return assign()
+TicketActionsEnum = typing.Union[typing.Literal["VIEW", "CREATE", "EDIT", "DELETE", "CLOSE", "ASSIGN"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/ticket_assignees_item.py b/src/merge/resources/ticketing/types/ticket_assignees_item.py
index 91bc713c..3f1db9ad 100644
--- a/src/merge/resources/ticketing/types/ticket_assignees_item.py
+++ b/src/merge/resources/ticketing/types/ticket_assignees_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
TicketAssigneesItem = typing.Union[str, User]
diff --git a/src/merge/resources/ticketing/types/ticket_attachments_item.py b/src/merge/resources/ticketing/types/ticket_attachments_item.py
index 80c2262f..7651aaf3 100644
--- a/src/merge/resources/ticketing/types/ticket_attachments_item.py
+++ b/src/merge/resources/ticketing/types/ticket_attachments_item.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .attachment import Attachment
-
-TicketAttachmentsItem = typing.Union[str, Attachment]
+if typing.TYPE_CHECKING:
+ from .attachment import Attachment
+TicketAttachmentsItem = typing.Union[str, "Attachment"]
diff --git a/src/merge/resources/ticketing/types/ticket_collections_item.py b/src/merge/resources/ticketing/types/ticket_collections_item.py
index ce728b10..ed291a11 100644
--- a/src/merge/resources/ticketing/types/ticket_collections_item.py
+++ b/src/merge/resources/ticketing/types/ticket_collections_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .collection import Collection
TicketCollectionsItem = typing.Union[str, Collection]
diff --git a/src/merge/resources/ticketing/types/ticket_contact.py b/src/merge/resources/ticketing/types/ticket_contact.py
index 22375e74..3e7ddabe 100644
--- a/src/merge/resources/ticketing/types/ticket_contact.py
+++ b/src/merge/resources/ticketing/types/ticket_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
TicketContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/ticketing/types/ticket_creator.py b/src/merge/resources/ticketing/types/ticket_creator.py
index 461faf42..c6fd1415 100644
--- a/src/merge/resources/ticketing/types/ticket_creator.py
+++ b/src/merge/resources/ticketing/types/ticket_creator.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
TicketCreator = typing.Union[str, User]
diff --git a/src/merge/resources/ticketing/types/ticket_parent_ticket.py b/src/merge/resources/ticketing/types/ticket_parent_ticket.py
index 798a1ff8..61dbd7c6 100644
--- a/src/merge/resources/ticketing/types/ticket_parent_ticket.py
+++ b/src/merge/resources/ticketing/types/ticket_parent_ticket.py
@@ -1,7 +1,9 @@
# This file was auto-generated by Fern from our API Definition.
+from __future__ import annotations
+import typing
import typing
-from .ticket import Ticket
-
-TicketParentTicket = typing.Union[str, Ticket]
+if typing.TYPE_CHECKING:
+ from .ticket import Ticket
+TicketParentTicket = typing.Union[str, "Ticket"]
diff --git a/src/merge/resources/ticketing/types/ticket_priority.py b/src/merge/resources/ticketing/types/ticket_priority.py
index aee1ed76..ca1e3635 100644
--- a/src/merge/resources/ticketing/types/ticket_priority.py
+++ b/src/merge/resources/ticketing/types/ticket_priority.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .priority_enum import PriorityEnum
TicketPriority = typing.Union[PriorityEnum, str]
diff --git a/src/merge/resources/ticketing/types/ticket_request.py b/src/merge/resources/ticketing/types/ticket_request.py
index d4b59f97..2e69d361 100644
--- a/src/merge/resources/ticketing/types/ticket_request.py
+++ b/src/merge/resources/ticketing/types/ticket_request.py
@@ -1,23 +1,28 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .collection import Collection
+from .attachment import Attachment
+from .ticket import Ticket
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_field_request import RemoteFieldRequest
-from .ticket_request_account import TicketRequestAccount
+import pydantic
from .ticket_request_assignees_item import TicketRequestAssigneesItem
-from .ticket_request_attachments_item import TicketRequestAttachmentsItem
+from .ticket_request_creator import TicketRequestCreator
+import datetime as dt
+from .ticket_request_status import TicketRequestStatus
from .ticket_request_collections_item import TicketRequestCollectionsItem
+from .ticket_request_account import TicketRequestAccount
from .ticket_request_contact import TicketRequestContact
-from .ticket_request_creator import TicketRequestCreator
from .ticket_request_parent_ticket import TicketRequestParentTicket
+from .ticket_request_attachments_item import TicketRequestAttachmentsItem
from .ticket_request_priority import TicketRequestPriority
-from .ticket_request_status import TicketRequestStatus
+from .remote_field_request import RemoteFieldRequest
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.pydantic_utilities import update_forward_refs
-class TicketRequest(pydantic_v1.BaseModel):
+class TicketRequest(UniversalBaseModel):
"""
# The Ticket Object
@@ -30,23 +35,23 @@ class TicketRequest(pydantic_v1.BaseModel):
TODO
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The ticket's name.
"""
assignees: typing.Optional[typing.List[typing.Optional[TicketRequestAssigneesItem]]]
- creator: typing.Optional[TicketRequestCreator] = pydantic_v1.Field()
+ creator: typing.Optional[TicketRequestCreator] = pydantic.Field()
"""
The user who created this ticket.
"""
- due_date: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ due_date: typing.Optional[dt.datetime] = pydantic.Field()
"""
The ticket's due date.
"""
- status: typing.Optional[TicketRequestStatus] = pydantic_v1.Field()
+ status: typing.Optional[TicketRequestStatus] = pydantic.Field()
"""
The current status of the ticket.
@@ -56,45 +61,45 @@ class TicketRequest(pydantic_v1.BaseModel):
- `ON_HOLD` - ON_HOLD
"""
- description: typing.Optional[str] = pydantic_v1.Field()
+ description: typing.Optional[str] = pydantic.Field()
"""
The ticketβs description. HTML version of description is mapped if supported by the third-party platform.
"""
collections: typing.Optional[typing.List[typing.Optional[TicketRequestCollectionsItem]]]
- ticket_type: typing.Optional[str] = pydantic_v1.Field()
+ ticket_type: typing.Optional[str] = pydantic.Field()
"""
The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do.
"""
- account: typing.Optional[TicketRequestAccount] = pydantic_v1.Field()
+ account: typing.Optional[TicketRequestAccount] = pydantic.Field()
"""
The account associated with the ticket.
"""
- contact: typing.Optional[TicketRequestContact] = pydantic_v1.Field()
+ contact: typing.Optional[TicketRequestContact] = pydantic.Field()
"""
The contact associated with the ticket.
"""
- parent_ticket: typing.Optional[TicketRequestParentTicket] = pydantic_v1.Field()
+ parent_ticket: typing.Optional[TicketRequestParentTicket] = pydantic.Field()
"""
The ticket's parent ticket.
"""
attachments: typing.Optional[typing.List[typing.Optional[TicketRequestAttachmentsItem]]]
tags: typing.Optional[typing.List[typing.Optional[str]]]
- completed_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ completed_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
When the ticket was completed.
"""
- ticket_url: typing.Optional[str] = pydantic_v1.Field()
+ ticket_url: typing.Optional[str] = pydantic.Field()
"""
The 3rd party url of the Ticket.
"""
- priority: typing.Optional[TicketRequestPriority] = pydantic_v1.Field()
+ priority: typing.Optional[TicketRequestPriority] = pydantic.Field()
"""
The priority or urgency of the Ticket.
@@ -104,24 +109,20 @@ class TicketRequest(pydantic_v1.BaseModel):
- `LOW` - LOW
"""
- integration_params: typing.Optional[typing.Dict[str, typing.Any]]
- linked_account_params: typing.Optional[typing.Dict[str, typing.Any]]
+ integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_fields: typing.Optional[typing.List[RemoteFieldRequest]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Collection, TicketRequest=TicketRequest)
+update_forward_refs(Attachment, TicketRequest=TicketRequest)
+update_forward_refs(Ticket, TicketRequest=TicketRequest)
diff --git a/src/merge/resources/ticketing/types/ticket_request_account.py b/src/merge/resources/ticketing/types/ticket_request_account.py
index 91596edc..8c5d8b47 100644
--- a/src/merge/resources/ticketing/types/ticket_request_account.py
+++ b/src/merge/resources/ticketing/types/ticket_request_account.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .account import Account
TicketRequestAccount = typing.Union[str, Account]
diff --git a/src/merge/resources/ticketing/types/ticket_request_assignees_item.py b/src/merge/resources/ticketing/types/ticket_request_assignees_item.py
index 3f14bdaa..8a903fd4 100644
--- a/src/merge/resources/ticketing/types/ticket_request_assignees_item.py
+++ b/src/merge/resources/ticketing/types/ticket_request_assignees_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
TicketRequestAssigneesItem = typing.Union[str, User]
diff --git a/src/merge/resources/ticketing/types/ticket_request_attachments_item.py b/src/merge/resources/ticketing/types/ticket_request_attachments_item.py
index 1e9bd3af..9114aa86 100644
--- a/src/merge/resources/ticketing/types/ticket_request_attachments_item.py
+++ b/src/merge/resources/ticketing/types/ticket_request_attachments_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .attachment import Attachment
TicketRequestAttachmentsItem = typing.Union[str, Attachment]
diff --git a/src/merge/resources/ticketing/types/ticket_request_collections_item.py b/src/merge/resources/ticketing/types/ticket_request_collections_item.py
index 9a87b09a..5129f88d 100644
--- a/src/merge/resources/ticketing/types/ticket_request_collections_item.py
+++ b/src/merge/resources/ticketing/types/ticket_request_collections_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .collection import Collection
TicketRequestCollectionsItem = typing.Union[str, Collection]
diff --git a/src/merge/resources/ticketing/types/ticket_request_contact.py b/src/merge/resources/ticketing/types/ticket_request_contact.py
index b1313c40..b0eb684b 100644
--- a/src/merge/resources/ticketing/types/ticket_request_contact.py
+++ b/src/merge/resources/ticketing/types/ticket_request_contact.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .contact import Contact
TicketRequestContact = typing.Union[str, Contact]
diff --git a/src/merge/resources/ticketing/types/ticket_request_creator.py b/src/merge/resources/ticketing/types/ticket_request_creator.py
index a6cbf7b9..58007f48 100644
--- a/src/merge/resources/ticketing/types/ticket_request_creator.py
+++ b/src/merge/resources/ticketing/types/ticket_request_creator.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .user import User
TicketRequestCreator = typing.Union[str, User]
diff --git a/src/merge/resources/ticketing/types/ticket_request_parent_ticket.py b/src/merge/resources/ticketing/types/ticket_request_parent_ticket.py
index f6943945..f7839161 100644
--- a/src/merge/resources/ticketing/types/ticket_request_parent_ticket.py
+++ b/src/merge/resources/ticketing/types/ticket_request_parent_ticket.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket import Ticket
TicketRequestParentTicket = typing.Union[str, Ticket]
diff --git a/src/merge/resources/ticketing/types/ticket_request_priority.py b/src/merge/resources/ticketing/types/ticket_request_priority.py
index 51ca6ef8..cfd1967b 100644
--- a/src/merge/resources/ticketing/types/ticket_request_priority.py
+++ b/src/merge/resources/ticketing/types/ticket_request_priority.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .priority_enum import PriorityEnum
TicketRequestPriority = typing.Union[PriorityEnum, str]
diff --git a/src/merge/resources/ticketing/types/ticket_request_status.py b/src/merge/resources/ticketing/types/ticket_request_status.py
index 583f2852..0cc0ef99 100644
--- a/src/merge/resources/ticketing/types/ticket_request_status.py
+++ b/src/merge/resources/ticketing/types/ticket_request_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket_status_enum import TicketStatusEnum
TicketRequestStatus = typing.Union[TicketStatusEnum, str]
diff --git a/src/merge/resources/ticketing/types/ticket_response.py b/src/merge/resources/ticketing/types/ticket_response.py
index ad1ea72e..90156ddd 100644
--- a/src/merge/resources/ticketing/types/ticket_response.py
+++ b/src/merge/resources/ticketing/types/ticket_response.py
@@ -1,36 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
+from .attachment import Attachment
+from .collection import Collection
from .ticket import Ticket
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class TicketResponse(pydantic_v1.BaseModel):
+class TicketResponse(UniversalBaseModel):
model: Ticket
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, TicketResponse=TicketResponse)
+update_forward_refs(Collection, TicketResponse=TicketResponse)
+update_forward_refs(Ticket, TicketResponse=TicketResponse)
diff --git a/src/merge/resources/ticketing/types/ticket_status.py b/src/merge/resources/ticketing/types/ticket_status.py
index ebcc3a42..ee72d657 100644
--- a/src/merge/resources/ticketing/types/ticket_status.py
+++ b/src/merge/resources/ticketing/types/ticket_status.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .ticket_status_enum import TicketStatusEnum
TicketStatus = typing.Union[TicketStatusEnum, str]
diff --git a/src/merge/resources/ticketing/types/ticket_status_enum.py b/src/merge/resources/ticketing/types/ticket_status_enum.py
index 31819089..15ef2914 100644
--- a/src/merge/resources/ticketing/types/ticket_status_enum.py
+++ b/src/merge/resources/ticketing/types/ticket_status_enum.py
@@ -1,36 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import enum
import typing
-T_Result = typing.TypeVar("T_Result")
-
-
-class TicketStatusEnum(str, enum.Enum):
- """
- - `OPEN` - OPEN
- - `CLOSED` - CLOSED
- - `IN_PROGRESS` - IN_PROGRESS
- - `ON_HOLD` - ON_HOLD
- """
-
- OPEN = "OPEN"
- CLOSED = "CLOSED"
- IN_PROGRESS = "IN_PROGRESS"
- ON_HOLD = "ON_HOLD"
-
- def visit(
- self,
- open: typing.Callable[[], T_Result],
- closed: typing.Callable[[], T_Result],
- in_progress: typing.Callable[[], T_Result],
- on_hold: typing.Callable[[], T_Result],
- ) -> T_Result:
- if self is TicketStatusEnum.OPEN:
- return open()
- if self is TicketStatusEnum.CLOSED:
- return closed()
- if self is TicketStatusEnum.IN_PROGRESS:
- return in_progress()
- if self is TicketStatusEnum.ON_HOLD:
- return on_hold()
+TicketStatusEnum = typing.Union[typing.Literal["OPEN", "CLOSED", "IN_PROGRESS", "ON_HOLD"], typing.Any]
diff --git a/src/merge/resources/ticketing/types/ticketing_attachment_response.py b/src/merge/resources/ticketing/types/ticketing_attachment_response.py
index cdf1d3e1..8d218cb4 100644
--- a/src/merge/resources/ticketing/types/ticketing_attachment_response.py
+++ b/src/merge/resources/ticketing/types/ticketing_attachment_response.py
@@ -1,36 +1,35 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from __future__ import annotations
+from ....core.pydantic_utilities import UniversalBaseModel
from .attachment import Attachment
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+from .collection import Collection
+from .ticket import Ticket
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+from ....core.pydantic_utilities import update_forward_refs
-class TicketingAttachmentResponse(pydantic_v1.BaseModel):
+class TicketingAttachmentResponse(UniversalBaseModel):
model: Attachment
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
- )
- class Config:
- frozen = True
- smart_union = True
- extra = pydantic_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+update_forward_refs(Attachment, TicketingAttachmentResponse=TicketingAttachmentResponse)
+update_forward_refs(Collection, TicketingAttachmentResponse=TicketingAttachmentResponse)
+update_forward_refs(Ticket, TicketingAttachmentResponse=TicketingAttachmentResponse)
diff --git a/src/merge/resources/ticketing/types/ticketing_contact_response.py b/src/merge/resources/ticketing/types/ticketing_contact_response.py
index b04f143b..59be72d9 100644
--- a/src/merge/resources/ticketing/types/ticketing_contact_response.py
+++ b/src/merge/resources/ticketing/types/ticketing_contact_response.py
@@ -1,36 +1,26 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
-import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from ....core.pydantic_utilities import UniversalBaseModel
from .contact import Contact
-from .debug_mode_log import DebugModeLog
-from .error_validation_problem import ErrorValidationProblem
+import typing
from .warning_validation_problem import WarningValidationProblem
+from .error_validation_problem import ErrorValidationProblem
+from .debug_mode_log import DebugModeLog
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class TicketingContactResponse(pydantic_v1.BaseModel):
+class TicketingContactResponse(UniversalBaseModel):
model: Contact
warnings: typing.List[WarningValidationProblem]
errors: typing.List[ErrorValidationProblem]
logs: typing.Optional[typing.List[DebugModeLog]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/user.py b/src/merge/resources/ticketing/types/user.py
index ed7ae3da..ce09db60 100644
--- a/src/merge/resources/ticketing/types/user.py
+++ b/src/merge/resources/ticketing/types/user.py
@@ -1,16 +1,16 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-from .remote_data import RemoteData
-from .user_roles_item import UserRolesItem
+import pydantic
+import datetime as dt
from .user_teams_item import UserTeamsItem
+from .user_roles_item import UserRolesItem
+from .remote_data import RemoteData
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
-class User(pydantic_v1.BaseModel):
+class User(UniversalBaseModel):
"""
# The User Object
@@ -24,65 +24,56 @@ class User(pydantic_v1.BaseModel):
"""
id: typing.Optional[str]
- remote_id: typing.Optional[str] = pydantic_v1.Field()
+ remote_id: typing.Optional[str] = pydantic.Field()
"""
The third-party API ID of the matching object.
"""
- created_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ created_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was created by Merge.
"""
- modified_at: typing.Optional[dt.datetime] = pydantic_v1.Field()
+ modified_at: typing.Optional[dt.datetime] = pydantic.Field()
"""
The datetime that this object was modified by Merge.
"""
- name: typing.Optional[str] = pydantic_v1.Field()
+ name: typing.Optional[str] = pydantic.Field()
"""
The user's name.
"""
- email_address: typing.Optional[str] = pydantic_v1.Field()
+ email_address: typing.Optional[str] = pydantic.Field()
"""
The user's email address.
"""
- is_active: typing.Optional[bool] = pydantic_v1.Field()
+ is_active: typing.Optional[bool] = pydantic.Field()
"""
Whether or not the user is active.
"""
teams: typing.Optional[typing.List[typing.Optional[UserTeamsItem]]]
roles: typing.Optional[typing.List[typing.Optional[UserRolesItem]]]
- avatar: typing.Optional[str] = pydantic_v1.Field()
+ avatar: typing.Optional[str] = pydantic.Field()
"""
The user's avatar picture.
"""
- remote_was_deleted: typing.Optional[bool] = pydantic_v1.Field()
+ remote_was_deleted: typing.Optional[bool] = pydantic.Field()
"""
Indicates whether or not this object has been deleted in the third party platform.
"""
- field_mappings: typing.Optional[typing.Dict[str, typing.Any]]
+ field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
remote_data: typing.Optional[typing.List[RemoteData]]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/user_roles_item.py b/src/merge/resources/ticketing/types/user_roles_item.py
index 8597ca2f..e24a9d09 100644
--- a/src/merge/resources/ticketing/types/user_roles_item.py
+++ b/src/merge/resources/ticketing/types/user_roles_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .role import Role
UserRolesItem = typing.Union[str, Role]
diff --git a/src/merge/resources/ticketing/types/user_teams_item.py b/src/merge/resources/ticketing/types/user_teams_item.py
index 55220039..71e423ac 100644
--- a/src/merge/resources/ticketing/types/user_teams_item.py
+++ b/src/merge/resources/ticketing/types/user_teams_item.py
@@ -1,7 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
import typing
-
from .team import Team
UserTeamsItem = typing.Union[str, Team]
diff --git a/src/merge/resources/ticketing/types/validation_problem_source.py b/src/merge/resources/ticketing/types/validation_problem_source.py
index fde15b40..d9a4a8fe 100644
--- a/src/merge/resources/ticketing/types/validation_problem_source.py
+++ b/src/merge/resources/ticketing/types/validation_problem_source.py
@@ -1,29 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
import typing
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class ValidationProblemSource(pydantic_v1.BaseModel):
+class ValidationProblemSource(UniversalBaseModel):
pointer: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/warning_validation_problem.py b/src/merge/resources/ticketing/types/warning_validation_problem.py
index 6baf9600..d508bb6d 100644
--- a/src/merge/resources/ticketing/types/warning_validation_problem.py
+++ b/src/merge/resources/ticketing/types/warning_validation_problem.py
@@ -1,33 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
-
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .validation_problem_source import ValidationProblemSource
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-class WarningValidationProblem(pydantic_v1.BaseModel):
+class WarningValidationProblem(UniversalBaseModel):
source: typing.Optional[ValidationProblemSource]
title: str
detail: str
problem_type: str
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/types/webhook_receiver.py b/src/merge/resources/ticketing/types/webhook_receiver.py
index 0544f256..e8cd17aa 100644
--- a/src/merge/resources/ticketing/types/webhook_receiver.py
+++ b/src/merge/resources/ticketing/types/webhook_receiver.py
@@ -1,31 +1,21 @@
# This file was auto-generated by Fern from our API Definition.
-import datetime as dt
+from ....core.pydantic_utilities import UniversalBaseModel
import typing
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
-from ....core.datetime_utils import serialize_datetime
-from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
-
-class WebhookReceiver(pydantic_v1.BaseModel):
+class WebhookReceiver(UniversalBaseModel):
event: str
is_active: bool
key: typing.Optional[str]
- def json(self, **kwargs: typing.Any) -> str:
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- return super().json(**kwargs_with_defaults)
-
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
- kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
- kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
-
- return deep_union_pydantic_dicts(
- super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_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_v1.Extra.allow
- json_encoders = {dt.datetime: serialize_datetime}
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/version.py b/src/merge/version.py
index d2651c75..702683e8 100644
--- a/src/merge/version.py
+++ b/src/merge/version.py
@@ -1,4 +1,3 @@
-
from importlib import metadata
__version__ = metadata.version("MergePythonClient")
diff --git a/tests/custom/test_client.py b/tests/custom/test_client.py
index 60a58e64..73f811f5 100644
--- a/tests/custom/test_client.py
+++ b/tests/custom/test_client.py
@@ -1,5 +1,6 @@
import pytest
+
# Get started with writing tests with pytest at https://docs.pytest.org
@pytest.mark.skip(reason="Unimplemented")
def test_client() -> None:
diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py
new file mode 100644
index 00000000..f3ea2659
--- /dev/null
+++ b/tests/utils/__init__.py
@@ -0,0 +1,2 @@
+# This file was auto-generated by Fern from our API Definition.
+
diff --git a/tests/utils/assets/models/__init__.py b/tests/utils/assets/models/__init__.py
new file mode 100644
index 00000000..3a1c852e
--- /dev/null
+++ b/tests/utils/assets/models/__init__.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+from .circle import CircleParams
+from .object_with_defaults import ObjectWithDefaultsParams
+from .object_with_optional_field import ObjectWithOptionalFieldParams
+from .shape import ShapeParams, Shape_CircleParams, Shape_SquareParams
+from .square import SquareParams
+from .undiscriminated_shape import UndiscriminatedShapeParams
+
+__all__ = [
+ "CircleParams",
+ "ObjectWithDefaultsParams",
+ "ObjectWithOptionalFieldParams",
+ "ShapeParams",
+ "Shape_CircleParams",
+ "Shape_SquareParams",
+ "SquareParams",
+ "UndiscriminatedShapeParams",
+]
diff --git a/tests/utils/assets/models/circle.py b/tests/utils/assets/models/circle.py
new file mode 100644
index 00000000..fe16b9e4
--- /dev/null
+++ b/tests/utils/assets/models/circle.py
@@ -0,0 +1,11 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing_extensions
+import typing_extensions
+from merge.core.serialization import FieldMetadata
+
+
+class CircleParams(typing_extensions.TypedDict):
+ radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")]
diff --git a/tests/utils/assets/models/color.py b/tests/utils/assets/models/color.py
new file mode 100644
index 00000000..2aa2c4c5
--- /dev/null
+++ b/tests/utils/assets/models/color.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+Color = typing.Union[typing.Literal["red", "blue"], typing.Any]
diff --git a/tests/utils/assets/models/object_with_defaults.py b/tests/utils/assets/models/object_with_defaults.py
new file mode 100644
index 00000000..ef14f7b2
--- /dev/null
+++ b/tests/utils/assets/models/object_with_defaults.py
@@ -0,0 +1,16 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing_extensions
+import typing_extensions
+
+
+class ObjectWithDefaultsParams(typing_extensions.TypedDict):
+ """
+ Defines properties with default values and validation rules.
+ """
+
+ decimal: typing_extensions.NotRequired[float]
+ string: typing_extensions.NotRequired[str]
+ required_string: str
diff --git a/tests/utils/assets/models/object_with_optional_field.py b/tests/utils/assets/models/object_with_optional_field.py
new file mode 100644
index 00000000..13ccc937
--- /dev/null
+++ b/tests/utils/assets/models/object_with_optional_field.py
@@ -0,0 +1,34 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing_extensions
+import typing
+import typing_extensions
+from merge.core.serialization import FieldMetadata
+import datetime as dt
+import uuid
+from .color import Color
+from .shape import ShapeParams
+from .undiscriminated_shape import UndiscriminatedShapeParams
+
+
+class ObjectWithOptionalFieldParams(typing_extensions.TypedDict):
+ literal: typing.Literal["lit_one"]
+ string: typing_extensions.NotRequired[str]
+ integer: typing_extensions.NotRequired[int]
+ long_: typing_extensions.NotRequired[typing_extensions.Annotated[int, FieldMetadata(alias="long")]]
+ double: typing_extensions.NotRequired[float]
+ bool_: typing_extensions.NotRequired[typing_extensions.Annotated[bool, FieldMetadata(alias="bool")]]
+ datetime: typing_extensions.NotRequired[dt.datetime]
+ date: typing_extensions.NotRequired[dt.date]
+ uuid_: typing_extensions.NotRequired[typing_extensions.Annotated[uuid.UUID, FieldMetadata(alias="uuid")]]
+ base_64: typing_extensions.NotRequired[typing_extensions.Annotated[str, FieldMetadata(alias="base64")]]
+ list_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Sequence[str], FieldMetadata(alias="list")]]
+ set_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Set[str], FieldMetadata(alias="set")]]
+ map_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Dict[int, str], FieldMetadata(alias="map")]]
+ enum: typing_extensions.NotRequired[Color]
+ union: typing_extensions.NotRequired[ShapeParams]
+ second_union: typing_extensions.NotRequired[ShapeParams]
+ undiscriminated_union: typing_extensions.NotRequired[UndiscriminatedShapeParams]
+ any: typing.Optional[typing.Any]
diff --git a/tests/utils/assets/models/shape.py b/tests/utils/assets/models/shape.py
new file mode 100644
index 00000000..cbc4fee1
--- /dev/null
+++ b/tests/utils/assets/models/shape.py
@@ -0,0 +1,26 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+from __future__ import annotations
+import typing_extensions
+import typing_extensions
+import typing
+from merge.core.serialization import FieldMetadata
+
+
+class Base(typing_extensions.TypedDict):
+ id: str
+
+
+class Shape_CircleParams(Base):
+ shape_type: typing_extensions.Annotated[typing.Literal["circle"], FieldMetadata(alias="shapeType")]
+ radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")]
+
+
+class Shape_SquareParams(Base):
+ shape_type: typing_extensions.Annotated[typing.Literal["square"], FieldMetadata(alias="shapeType")]
+ length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")]
+
+
+ShapeParams = typing.Union[Shape_CircleParams, Shape_SquareParams]
diff --git a/tests/utils/assets/models/square.py b/tests/utils/assets/models/square.py
new file mode 100644
index 00000000..813d3180
--- /dev/null
+++ b/tests/utils/assets/models/square.py
@@ -0,0 +1,11 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing_extensions
+import typing_extensions
+from merge.core.serialization import FieldMetadata
+
+
+class SquareParams(typing_extensions.TypedDict):
+ length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")]
diff --git a/tests/utils/assets/models/undiscriminated_shape.py b/tests/utils/assets/models/undiscriminated_shape.py
new file mode 100644
index 00000000..68876a23
--- /dev/null
+++ b/tests/utils/assets/models/undiscriminated_shape.py
@@ -0,0 +1,9 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from .circle import CircleParams
+from .square import SquareParams
+
+UndiscriminatedShapeParams = typing.Union[CircleParams, SquareParams]
diff --git a/tests/utils/test_http_client.py b/tests/utils/test_http_client.py
new file mode 100644
index 00000000..10910c68
--- /dev/null
+++ b/tests/utils/test_http_client.py
@@ -0,0 +1,61 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from merge.core.http_client import get_request_body
+from merge.core.request_options import RequestOptions
+
+
+def get_request_options() -> RequestOptions:
+ return {"additional_body_parameters": {"see you": "later"}}
+
+
+def test_get_json_request_body() -> None:
+ json_body, data_body = get_request_body(json={"hello": "world"}, data=None, request_options=None, omit=None)
+ assert json_body == {"hello": "world"}
+ assert data_body is None
+
+ json_body_extras, data_body_extras = get_request_body(
+ json={"goodbye": "world"}, data=None, request_options=get_request_options(), omit=None
+ )
+
+ assert json_body_extras == {"goodbye": "world", "see you": "later"}
+ assert data_body_extras is None
+
+
+def test_get_files_request_body() -> None:
+ json_body, data_body = get_request_body(json=None, data={"hello": "world"}, request_options=None, omit=None)
+ assert data_body == {"hello": "world"}
+ assert json_body is None
+
+ json_body_extras, data_body_extras = get_request_body(
+ json=None, data={"goodbye": "world"}, request_options=get_request_options(), omit=None
+ )
+
+ assert data_body_extras == {"goodbye": "world", "see you": "later"}
+ assert json_body_extras is None
+
+
+def test_get_none_request_body() -> None:
+ json_body, data_body = get_request_body(json=None, data=None, request_options=None, omit=None)
+ assert data_body is None
+ assert json_body is None
+
+ json_body_extras, data_body_extras = get_request_body(
+ json=None, data=None, request_options=get_request_options(), omit=None
+ )
+
+ assert json_body_extras == {"see you": "later"}
+ assert data_body_extras is None
+
+
+def test_get_empty_json_request_body() -> None:
+ unrelated_request_options: RequestOptions = {"max_retries": 3}
+ json_body, data_body = get_request_body(json=None, data=None, request_options=unrelated_request_options, omit=None)
+ assert json_body is None
+ assert data_body is None
+
+ json_body_extras, data_body_extras = get_request_body(
+ json={}, data=None, request_options=unrelated_request_options, omit=None
+ )
+
+ assert json_body_extras is None
+ assert data_body_extras is None
diff --git a/tests/utils/test_query_encoding.py b/tests/utils/test_query_encoding.py
new file mode 100644
index 00000000..18a81a1e
--- /dev/null
+++ b/tests/utils/test_query_encoding.py
@@ -0,0 +1,37 @@
+# This file was auto-generated by Fern from our API Definition.
+
+
+from merge.core.query_encoder import encode_query
+
+
+def test_query_encoding_deep_objects() -> None:
+ assert encode_query({"hello world": "hello world"}) == [("hello world", "hello world")]
+ assert encode_query({"hello_world": {"hello": "world"}}) == [("hello_world[hello]", "world")]
+ assert encode_query({"hello_world": {"hello": {"world": "today"}, "test": "this"}, "hi": "there"}) == [
+ ("hello_world[hello][world]", "today"),
+ ("hello_world[test]", "this"),
+ ("hi", "there"),
+ ]
+
+
+def test_query_encoding_deep_object_arrays() -> None:
+ assert encode_query({"objects": [{"key": "hello", "value": "world"}, {"key": "foo", "value": "bar"}]}) == [
+ ("objects[key]", "hello"),
+ ("objects[value]", "world"),
+ ("objects[key]", "foo"),
+ ("objects[value]", "bar"),
+ ]
+ assert encode_query(
+ {"users": [{"name": "string", "tags": ["string"]}, {"name": "string2", "tags": ["string2", "string3"]}]}
+ ) == [
+ ("users[name]", "string"),
+ ("users[tags]", "string"),
+ ("users[name]", "string2"),
+ ("users[tags]", "string2"),
+ ("users[tags]", "string3"),
+ ]
+
+
+def test_encode_query_with_none() -> None:
+ encoded = encode_query(None)
+ assert encoded == None
diff --git a/tests/utils/test_serialization.py b/tests/utils/test_serialization.py
new file mode 100644
index 00000000..824f7d05
--- /dev/null
+++ b/tests/utils/test_serialization.py
@@ -0,0 +1,72 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from typing import List, Any
+
+from merge.core.serialization import convert_and_respect_annotation_metadata
+from .assets.models import ShapeParams, ObjectWithOptionalFieldParams
+
+
+UNION_TEST: ShapeParams = {"radius_measurement": 1.0, "shape_type": "circle", "id": "1"}
+UNION_TEST_CONVERTED = {"shapeType": "circle", "radiusMeasurement": 1.0, "id": "1"}
+
+
+def test_convert_and_respect_annotation_metadata() -> None:
+ data: ObjectWithOptionalFieldParams = {
+ "string": "string",
+ "long_": 12345,
+ "bool_": True,
+ "literal": "lit_one",
+ "any": "any",
+ }
+ converted = convert_and_respect_annotation_metadata(
+ object_=data, annotation=ObjectWithOptionalFieldParams, direction="write"
+ )
+ assert converted == {"string": "string", "long": 12345, "bool": True, "literal": "lit_one", "any": "any"}
+
+
+def test_convert_and_respect_annotation_metadata_in_list() -> None:
+ data: List[ObjectWithOptionalFieldParams] = [
+ {"string": "string", "long_": 12345, "bool_": True, "literal": "lit_one", "any": "any"},
+ {"string": "another string", "long_": 67890, "list_": [], "literal": "lit_one", "any": "any"},
+ ]
+ converted = convert_and_respect_annotation_metadata(
+ object_=data, annotation=List[ObjectWithOptionalFieldParams], direction="write"
+ )
+
+ assert converted == [
+ {"string": "string", "long": 12345, "bool": True, "literal": "lit_one", "any": "any"},
+ {"string": "another string", "long": 67890, "list": [], "literal": "lit_one", "any": "any"},
+ ]
+
+
+def test_convert_and_respect_annotation_metadata_in_nested_object() -> None:
+ data: ObjectWithOptionalFieldParams = {
+ "string": "string",
+ "long_": 12345,
+ "union": UNION_TEST,
+ "literal": "lit_one",
+ "any": "any",
+ }
+ converted = convert_and_respect_annotation_metadata(
+ object_=data, annotation=ObjectWithOptionalFieldParams, direction="write"
+ )
+
+ assert converted == {
+ "string": "string",
+ "long": 12345,
+ "union": UNION_TEST_CONVERTED,
+ "literal": "lit_one",
+ "any": "any",
+ }
+
+
+def test_convert_and_respect_annotation_metadata_in_union() -> None:
+ converted = convert_and_respect_annotation_metadata(object_=UNION_TEST, annotation=ShapeParams, direction="write")
+
+ assert converted == UNION_TEST_CONVERTED
+
+
+def test_convert_and_respect_annotation_metadata_with_empty_object() -> None:
+ data: Any = {}
+ converted = convert_and_respect_annotation_metadata(object_=data, annotation=ShapeParams, direction="write")
+ assert converted == data