diff --git a/.fern/replay.lock b/.fern/replay.lock
new file mode 100644
index 00000000..8a3ee2f4
--- /dev/null
+++ b/.fern/replay.lock
@@ -0,0 +1,10 @@
+# DO NOT EDIT MANUALLY - Managed by Fern Replay
+version: "1.0"
+generations:
+ - commit_sha: 23865bb996fac07fb520d04361b78c4f2e0dc25f
+ tree_hash: 4112cf01c9a321bab1cd8a35c3ea89b992b8a99a
+ timestamp: 2026-05-20T22:53:08.636Z
+ cli_version: unknown
+ generator_versions: {}
+current_generation: 23865bb996fac07fb520d04361b78c4f2e0dc25f
+patches: []
diff --git a/.fernignore b/.fernignore
index 27fee6f8..5a4699af 100644
--- a/.fernignore
+++ b/.fernignore
@@ -21,4 +21,7 @@ tests/custom/test_datetime_filters.py
tests/custom/test_error_response_handling.py
tests/custom/test_query_encoder_edges.py
tests/custom/test_enum_forward_compat_response.py
-tests/custom/test_enum_forward_compat_query.py
\ No newline at end of file
+tests/custom/test_enum_forward_compat_query.py
+.fern/replay.lock
+.fern/replay.yml
+.gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..74928d6a
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+.fern/replay.lock linguist-generated=true
diff --git a/README.md b/README.md
index 54d94648..cc6b143c 100644
--- a/README.md
+++ b/README.md
@@ -257,3 +257,4 @@ while response.next is not None:
+
diff --git a/poetry.lock b/poetry.lock
index 46f7b7b8..627e4d7c 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2026.4.22"
+version = "2026.5.20"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.7"
files = [
- {file = "certifi-2026.4.22-py3-none-any.whl", hash = "sha256:3cb2210c8f88ba2318d29b0388d1023c8492ff72ecdde4ebdaddbb13a31b1c4a"},
- {file = "certifi-2026.4.22.tar.gz", hash = "sha256:8d455352a37b71bf76a79caa83a3d6c25afee4a385d632127b6afb3963f1c580"},
+ {file = "certifi-2026.5.20-py3-none-any.whl", hash = "sha256:3c52e209ba0a4ad7aebe60436a4ab349c39e1e602e8c134221e546902ad25897"},
+ {file = "certifi-2026.5.20.tar.gz", hash = "sha256:69dea482ab64caa7b9f6aba1c6bf48bb6a5448d1c0f1b17ab42ad8c763a5344d"},
]
[[package]]
@@ -133,13 +133,13 @@ zstd = ["zstandard (>=0.18.0)"]
[[package]]
name = "idna"
-version = "3.14"
+version = "3.15"
description = "Internationalized Domain Names in Applications (IDNA)"
optional = false
python-versions = ">=3.8"
files = [
- {file = "idna-3.14-py3-none-any.whl", hash = "sha256:e677eaf072e290f7b725f9acf0b3a2bd55f9fd6f7c70abe5f0e34823d0accf69"},
- {file = "idna-3.14.tar.gz", hash = "sha256:466d810d7a2cc1022bea9b037c39728d51ae7dad40d480fc9b7d7ecf98ba8ee3"},
+ {file = "idna-3.15-py3-none-any.whl", hash = "sha256:048adeaf8c2d788c40fee287673ccaa74c24ffd8dcf09ffa555a2fbb59f10ac8"},
+ {file = "idna-3.15.tar.gz", hash = "sha256:ca962446ea538f7092a95e057da437618e886f4d349216d2b1e294abfdb65fdc"},
]
[package.extras]
diff --git a/pyproject.toml b/pyproject.toml
index 6cfdd25e..9c2e2de3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "MergePythonClient"
[tool.poetry]
name = "MergePythonClient"
-version = "3.0.1"
+version = "3.0.2"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index d46addad..b8cacd4f 100644
--- a/reference.md
+++ b/reference.md
@@ -6505,6 +6505,85 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+
+
+
+client.ats.linked_accounts.partial_update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ats.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**linked_account_id:** `str`
+
+
+
+
+
+-
+
+**ekm_enabled:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -21225,8 +21304,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-## Accounting Passthrough
-client.accounting.passthrough.create(...)
+client.accounting.linked_accounts.partial_update(...)
-
@@ -21238,7 +21316,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-
-Pull data from an endpoint not currently supported by Merge.
+Update a linked account.
@@ -21254,93 +21332,13 @@ Pull data from an endpoint not currently supported by Merge.
```python
from merge import Merge
-from merge.resources.accounting import DataPassthroughRequest, MethodEnum
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
-client.accounting.passthrough.create(
- request=DataPassthroughRequest(
- method=MethodEnum.GET,
- path="/scooters",
- ),
-)
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**request:** `DataPassthroughRequest`
-
-
-
-
-
--
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
-
-
-
-
-
-
-
-
-## Accounting PaymentMethods
-client.accounting.payment_methods.list(...)
-
--
-
-#### 📝 Description
-
-
--
-
-
--
-
-Returns a list of `PaymentMethod` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```python
-from merge import Merge
-
-client = Merge(
- account_token="YOUR_ACCOUNT_TOKEN",
- api_key="YOUR_API_KEY",
-)
-client.accounting.payment_methods.list(
- cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
- include_deleted_data=True,
- include_remote_data=True,
- include_shell_data=True,
- page_size=1,
+client.accounting.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
)
```
@@ -21357,31 +21355,7 @@ client.accounting.payment_methods.list(
-
-**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).
+**linked_account_id:** `str`
@@ -21389,7 +21363,7 @@ client.accounting.payment_methods.list(
-
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
+**ekm_enabled:** `typing.Optional[bool]`
@@ -21409,7 +21383,8 @@ client.accounting.payment_methods.list(
-client.accounting.payment_methods.retrieve(...)
+## Accounting Passthrough
+client.accounting.passthrough.create(...)
-
@@ -21421,7 +21396,7 @@ client.accounting.payment_methods.list(
-
-Returns a `PaymentMethod` object with the given `id`.
+Pull data from an endpoint not currently supported by Merge.
@@ -21437,15 +21412,17 @@ Returns a `PaymentMethod` object with the given `id`.
```python
from merge import Merge
+from merge.resources.accounting import DataPassthroughRequest, MethodEnum
client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
-client.accounting.payment_methods.retrieve(
- id="id",
- include_remote_data=True,
- include_shell_data=True,
+client.accounting.passthrough.create(
+ request=DataPassthroughRequest(
+ method=MethodEnum.GET,
+ path="/scooters",
+ ),
)
```
@@ -21462,23 +21439,7 @@ client.accounting.payment_methods.retrieve(
-
-**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_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).
+**request:** `DataPassthroughRequest`
@@ -21498,8 +21459,8 @@ client.accounting.payment_methods.retrieve(
-## Accounting PaymentTerms
-client.accounting.payment_terms.list(...)
+## Accounting PaymentMethods
+client.accounting.payment_methods.list(...)
-
@@ -21511,7 +21472,7 @@ client.accounting.payment_methods.retrieve(
-
-Returns a list of `PaymentTerm` objects.
+Returns a list of `PaymentMethod` objects.
@@ -21532,7 +21493,7 @@ client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
-client.accounting.payment_terms.list(
+client.accounting.payment_methods.list(
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
include_deleted_data=True,
include_remote_data=True,
@@ -21562,18 +21523,6 @@ client.accounting.payment_terms.list(
-
-**expand:** `typing.Optional[
- typing.Union[
- typing.Literal["company"], typing.Sequence[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/).
@@ -21618,7 +21567,7 @@ client.accounting.payment_terms.list(
-client.accounting.payment_terms.retrieve(...)
+client.accounting.payment_methods.retrieve(...)
-
@@ -21630,7 +21579,7 @@ client.accounting.payment_terms.list(
-
-Returns a `PaymentTerm` object with the given `id`.
+Returns a `PaymentMethod` object with the given `id`.
@@ -21651,7 +21600,7 @@ client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
-client.accounting.payment_terms.retrieve(
+client.accounting.payment_methods.retrieve(
id="id",
include_remote_data=True,
include_shell_data=True,
@@ -21679,18 +21628,227 @@ client.accounting.payment_terms.retrieve(
-
-**expand:** `typing.Optional[
- typing.Union[
- typing.Literal["company"], typing.Sequence[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.
+
+
+
+
+
+-
+
+**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).
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Accounting PaymentTerms
+client.accounting.payment_terms.list(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns a list of `PaymentTerm` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.accounting.payment_terms.list(
+ cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
+ include_deleted_data=True,
+ include_remote_data=True,
+ include_shell_data=True,
+ page_size=1,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**cursor:** `typing.Optional[str]` — The pagination cursor value.
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[
+ typing.Union[
+ typing.Literal["company"], typing.Sequence[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).
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.accounting.payment_terms.retrieve(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns a `PaymentTerm` 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.payment_terms.retrieve(
+ id="id",
+ include_remote_data=True,
+ include_shell_data=True,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `str`
+
+
+
+
+
+-
+
+**expand:** `typing.Optional[
+ typing.Union[
+ typing.Literal["company"], typing.Sequence[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.
@@ -33927,6 +34085,85 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+
+
+
+client.crm.linked_accounts.partial_update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.crm.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**linked_account_id:** `str`
+
+
+
+
+
+-
+
+**ekm_enabled:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -42803,6 +43040,85 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+
+
+
+client.hris.linked_accounts.partial_update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.hris.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**linked_account_id:** `str`
+
+
+
+
+
+-
+
+**ekm_enabled:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -49976,6 +50292,85 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+
+
+
+client.ticketing.linked_accounts.partial_update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.ticketing.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**linked_account_id:** `str`
+
+
+
+
+
+-
+
+**ekm_enabled:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -55922,6 +56317,85 @@ client.chat.linked_accounts.list(
+
+
+
+
+client.chat.linked_accounts.partial_update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.chat.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**linked_account_id:** `str`
+
+
+
+
+
+-
+
+**ekm_enabled:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -60107,6 +60581,85 @@ client.email.linked_accounts.list(
+
+
+
+
+client.email.linked_accounts.partial_update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.email.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**linked_account_id:** `str`
+
+
+
+
+
+-
+
+**ekm_enabled:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -65338,6 +65891,85 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing`
+
+
+
+
+client.filestorage.linked_accounts.partial_update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.filestorage.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**linked_account_id:** `str`
+
+
+
+
+
+-
+
+**ekm_enabled:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -69414,6 +70046,85 @@ client.knowledgebase.linked_accounts.list(
+
+
+
+
+client.knowledgebase.linked_accounts.partial_update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from merge import Merge
+
+client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+)
+client.knowledgebase.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**linked_account_id:** `str`
+
+
+
+
+
+-
+
+**ekm_enabled:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
diff --git a/src/merge/core/client_wrapper.py b/src/merge/core/client_wrapper.py
index b15f414b..73a02e52 100644
--- a/src/merge/core/client_wrapper.py
+++ b/src/merge/core/client_wrapper.py
@@ -24,10 +24,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "MergePythonClient/3.0.1",
+ "User-Agent": "MergePythonClient/3.0.2",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "MergePythonClient",
- "X-Fern-SDK-Version": "3.0.1",
+ "X-Fern-SDK-Version": "3.0.2",
**(self.get_custom_headers() or {}),
}
if self._account_token is not None:
diff --git a/src/merge/resources/accounting/__init__.py b/src/merge/resources/accounting/__init__.py
index f7dd2938..9a306948 100644
--- a/src/merge/resources/accounting/__init__.py
+++ b/src/merge/resources/accounting/__init__.py
@@ -391,6 +391,7 @@
LanguageEnum,
LastSyncResultEnum,
LinkToken,
+ LinkedAccountPatchResponse,
LinkedAccountStatus,
MetaResponse,
MethodEnum,
@@ -1161,6 +1162,7 @@
"LanguageEnum": ".types",
"LastSyncResultEnum": ".types",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountStatus": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"MetaResponse": ".types",
@@ -1912,6 +1914,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"LinkedAccountsListRequestCategory",
"MetaResponse",
diff --git a/src/merge/resources/accounting/resources/linked_accounts/client.py b/src/merge/resources/accounting/resources/linked_accounts/client.py
index d178f711..537be369 100644
--- a/src/merge/resources/accounting/resources/linked_accounts/client.py
+++ b/src/merge/resources/accounting/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -150,6 +154,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.accounting.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -299,3 +344,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/accounting/resources/linked_accounts/raw_client.py b/src/merge/resources/accounting/resources/linked_accounts/raw_client.py
index e4c24854..d9b77971 100644
--- a/src/merge/resources/accounting/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/accounting/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -132,6 +137,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"accounting/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -252,3 +308,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"accounting/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/accounting/types/__init__.py b/src/merge/resources/accounting/types/__init__.py
index f4086c27..f88ed369 100644
--- a/src/merge/resources/accounting/types/__init__.py
+++ b/src/merge/resources/accounting/types/__init__.py
@@ -400,6 +400,7 @@
from .language_enum import LanguageEnum
from .last_sync_result_enum import LastSyncResultEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .linked_account_status import LinkedAccountStatus
from .meta_response import MetaResponse
from .method_enum import MethodEnum
@@ -1029,6 +1030,7 @@
"LanguageEnum": ".language_enum",
"LastSyncResultEnum": ".last_sync_result_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"LinkedAccountStatus": ".linked_account_status",
"MetaResponse": ".meta_response",
"MethodEnum": ".method_enum",
@@ -1678,6 +1680,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"MetaResponse",
"MethodEnum",
diff --git a/src/merge/resources/accounting/types/linked_account_patch_response.py b/src/merge/resources/accounting/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/accounting/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ats/__init__.py b/src/merge/resources/ats/__init__.py
index 53301946..07441545 100644
--- a/src/merge/resources/ats/__init__.py
+++ b/src/merge/resources/ats/__init__.py
@@ -125,6 +125,7 @@
LanguageEnum,
LastSyncResultEnum,
LinkToken,
+ LinkedAccountPatchResponse,
LinkedAccountStatus,
MetaResponse,
MethodEnum,
@@ -436,6 +437,7 @@
"LanguageEnum": ".types",
"LastSyncResultEnum": ".types",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountStatus": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"MetaResponse": ".types",
@@ -744,6 +746,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"LinkedAccountsListRequestCategory",
"MetaResponse",
diff --git a/src/merge/resources/ats/resources/linked_accounts/client.py b/src/merge/resources/ats/resources/linked_accounts/client.py
index 0e6d19ba..91ca9c65 100644
--- a/src/merge/resources/ats/resources/linked_accounts/client.py
+++ b/src/merge/resources/ats/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -146,6 +150,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.ats.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -291,3 +336,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.ats.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/ats/resources/linked_accounts/raw_client.py b/src/merge/resources/ats/resources/linked_accounts/raw_client.py
index 24f3b5ac..c3728061 100644
--- a/src/merge/resources/ats/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/ats/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -128,6 +133,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"ats/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -244,3 +300,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"ats/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/ats/types/__init__.py b/src/merge/resources/ats/types/__init__.py
index bd98b22f..189607e9 100644
--- a/src/merge/resources/ats/types/__init__.py
+++ b/src/merge/resources/ats/types/__init__.py
@@ -126,6 +126,7 @@
from .language_enum import LanguageEnum
from .last_sync_result_enum import LastSyncResultEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .linked_account_status import LinkedAccountStatus
from .meta_response import MetaResponse
from .method_enum import MethodEnum
@@ -351,6 +352,7 @@
"LanguageEnum": ".language_enum",
"LastSyncResultEnum": ".last_sync_result_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"LinkedAccountStatus": ".linked_account_status",
"MetaResponse": ".meta_response",
"MethodEnum": ".method_enum",
@@ -598,6 +600,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"MetaResponse",
"MethodEnum",
diff --git a/src/merge/resources/ats/types/linked_account_patch_response.py b/src/merge/resources/ats/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/ats/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/chat/__init__.py b/src/merge/resources/chat/__init__.py
index d4abb34d..75b23cf3 100644
--- a/src/merge/resources/chat/__init__.py
+++ b/src/merge/resources/chat/__init__.py
@@ -61,6 +61,7 @@
LanguageEnum,
LastSyncResultEnum,
LinkToken,
+ LinkedAccountPatchResponse,
Member,
MemberFieldMappings,
MemberGroup,
@@ -198,6 +199,7 @@
"LanguageEnum": ".types",
"LastSyncResultEnum": ".types",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"Member": ".types",
"MemberFieldMappings": ".types",
@@ -349,6 +351,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountsListRequestCategory",
"Member",
"MemberFieldMappings",
diff --git a/src/merge/resources/chat/resources/linked_accounts/client.py b/src/merge/resources/chat/resources/linked_accounts/client.py
index ec8e46ae..2ff2c8d9 100644
--- a/src/merge/resources/chat/resources/linked_accounts/client.py
+++ b/src/merge/resources/chat/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -138,6 +142,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.chat.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -275,3 +320,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.chat.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/chat/resources/linked_accounts/raw_client.py b/src/merge/resources/chat/resources/linked_accounts/raw_client.py
index dc0b1eb3..27eefa75 100644
--- a/src/merge/resources/chat/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/chat/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -120,6 +125,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"chat/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -228,3 +284,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"chat/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/chat/types/__init__.py b/src/merge/resources/chat/types/__init__.py
index ce79b882..9aa6579f 100644
--- a/src/merge/resources/chat/types/__init__.py
+++ b/src/merge/resources/chat/types/__init__.py
@@ -62,6 +62,7 @@
from .language_enum import LanguageEnum
from .last_sync_result_enum import LastSyncResultEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .member import Member
from .member_field_mappings import MemberFieldMappings
from .member_group import MemberGroup
@@ -162,6 +163,7 @@
"LanguageEnum": ".language_enum",
"LastSyncResultEnum": ".last_sync_result_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"Member": ".member",
"MemberFieldMappings": ".member_field_mappings",
"MemberGroup": ".member_group",
@@ -284,6 +286,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"Member",
"MemberFieldMappings",
"MemberGroup",
diff --git a/src/merge/resources/chat/types/linked_account_patch_response.py b/src/merge/resources/chat/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/chat/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/crm/__init__.py b/src/merge/resources/crm/__init__.py
index 07d3d95a..7d8bd46b 100644
--- a/src/merge/resources/crm/__init__.py
+++ b/src/merge/resources/crm/__init__.py
@@ -123,6 +123,7 @@
LeadStatus,
LeadStatusEnum,
LinkToken,
+ LinkedAccountPatchResponse,
LinkedAccountStatus,
MetaResponse,
MethodEnum,
@@ -426,6 +427,7 @@
"LeadsListRequestExpandItem": ".resources",
"LeadsRetrieveRequestExpandItem": ".resources",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountStatus": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"MetaResponse": ".types",
@@ -739,6 +741,7 @@ def __dir__():
"LeadsListRequestExpandItem",
"LeadsRetrieveRequestExpandItem",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"LinkedAccountsListRequestCategory",
"MetaResponse",
diff --git a/src/merge/resources/crm/resources/linked_accounts/client.py b/src/merge/resources/crm/resources/linked_accounts/client.py
index 27c56425..c0691965 100644
--- a/src/merge/resources/crm/resources/linked_accounts/client.py
+++ b/src/merge/resources/crm/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -146,6 +150,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.crm.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -291,3 +336,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.crm.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/crm/resources/linked_accounts/raw_client.py b/src/merge/resources/crm/resources/linked_accounts/raw_client.py
index 443e75e0..b8f9df7e 100644
--- a/src/merge/resources/crm/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/crm/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -128,6 +133,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"crm/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -244,3 +300,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"crm/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/crm/types/__init__.py b/src/merge/resources/crm/types/__init__.py
index 45eaff6a..d809061b 100644
--- a/src/merge/resources/crm/types/__init__.py
+++ b/src/merge/resources/crm/types/__init__.py
@@ -126,6 +126,7 @@
from .lead_status import LeadStatus
from .lead_status_enum import LeadStatusEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .linked_account_status import LinkedAccountStatus
from .meta_response import MetaResponse
from .method_enum import MethodEnum
@@ -371,6 +372,7 @@
"LeadStatus": ".lead_status",
"LeadStatusEnum": ".lead_status_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"LinkedAccountStatus": ".linked_account_status",
"MetaResponse": ".meta_response",
"MethodEnum": ".method_enum",
@@ -636,6 +638,7 @@ def __dir__():
"LeadStatus",
"LeadStatusEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"MetaResponse",
"MethodEnum",
diff --git a/src/merge/resources/crm/types/linked_account_patch_response.py b/src/merge/resources/crm/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/crm/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/email/__init__.py b/src/merge/resources/email/__init__.py
index 94abbf81..2bfebb9a 100644
--- a/src/merge/resources/email/__init__.py
+++ b/src/merge/resources/email/__init__.py
@@ -62,6 +62,7 @@
LanguageEnum,
LastSyncResultEnum,
LinkToken,
+ LinkedAccountPatchResponse,
Mailbox,
MailboxFieldMappings,
MailboxType,
@@ -220,6 +221,7 @@
"LanguageEnum": ".types",
"LastSyncResultEnum": ".types",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"Mailbox": ".types",
"MailboxFieldMappings": ".types",
@@ -387,6 +389,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountsListRequestCategory",
"Mailbox",
"MailboxFieldMappings",
diff --git a/src/merge/resources/email/resources/linked_accounts/client.py b/src/merge/resources/email/resources/linked_accounts/client.py
index 3170bb97..149d5fd2 100644
--- a/src/merge/resources/email/resources/linked_accounts/client.py
+++ b/src/merge/resources/email/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -138,6 +142,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.email.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -275,3 +320,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.email.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/email/resources/linked_accounts/raw_client.py b/src/merge/resources/email/resources/linked_accounts/raw_client.py
index a72a3011..15373605 100644
--- a/src/merge/resources/email/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/email/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -120,6 +125,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"email/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -228,3 +284,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"email/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/email/resources/messages/types/messages_list_request_expand_item.py b/src/merge/resources/email/resources/messages/types/messages_list_request_expand_item.py
index 3db2be07..3355289d 100644
--- a/src/merge/resources/email/resources/messages/types/messages_list_request_expand_item.py
+++ b/src/merge/resources/email/resources/messages/types/messages_list_request_expand_item.py
@@ -9,7 +9,7 @@
class MessagesListRequestExpandItem(str, enum.Enum):
BCC = "bcc"
CC = "cc"
- FOLDERS = "folders"
+ FOLDER = "folder"
FROM_ADDRESS = "from_address"
MAILBOXES = "mailboxes"
PERMISSIONS = "permissions"
@@ -20,7 +20,7 @@ def visit(
self,
bcc: typing.Callable[[], T_Result],
cc: typing.Callable[[], T_Result],
- folders: typing.Callable[[], T_Result],
+ folder: typing.Callable[[], T_Result],
from_address: typing.Callable[[], T_Result],
mailboxes: typing.Callable[[], T_Result],
permissions: typing.Callable[[], T_Result],
@@ -31,8 +31,8 @@ def visit(
return bcc()
if self is MessagesListRequestExpandItem.CC:
return cc()
- if self is MessagesListRequestExpandItem.FOLDERS:
- return folders()
+ if self is MessagesListRequestExpandItem.FOLDER:
+ return folder()
if self is MessagesListRequestExpandItem.FROM_ADDRESS:
return from_address()
if self is MessagesListRequestExpandItem.MAILBOXES:
diff --git a/src/merge/resources/email/resources/messages/types/messages_retrieve_request_expand_item.py b/src/merge/resources/email/resources/messages/types/messages_retrieve_request_expand_item.py
index e321b86f..0ca4389f 100644
--- a/src/merge/resources/email/resources/messages/types/messages_retrieve_request_expand_item.py
+++ b/src/merge/resources/email/resources/messages/types/messages_retrieve_request_expand_item.py
@@ -9,7 +9,7 @@
class MessagesRetrieveRequestExpandItem(str, enum.Enum):
BCC = "bcc"
CC = "cc"
- FOLDERS = "folders"
+ FOLDER = "folder"
FROM_ADDRESS = "from_address"
MAILBOXES = "mailboxes"
PERMISSIONS = "permissions"
@@ -20,7 +20,7 @@ def visit(
self,
bcc: typing.Callable[[], T_Result],
cc: typing.Callable[[], T_Result],
- folders: typing.Callable[[], T_Result],
+ folder: typing.Callable[[], T_Result],
from_address: typing.Callable[[], T_Result],
mailboxes: typing.Callable[[], T_Result],
permissions: typing.Callable[[], T_Result],
@@ -31,8 +31,8 @@ def visit(
return bcc()
if self is MessagesRetrieveRequestExpandItem.CC:
return cc()
- if self is MessagesRetrieveRequestExpandItem.FOLDERS:
- return folders()
+ if self is MessagesRetrieveRequestExpandItem.FOLDER:
+ return folder()
if self is MessagesRetrieveRequestExpandItem.FROM_ADDRESS:
return from_address()
if self is MessagesRetrieveRequestExpandItem.MAILBOXES:
diff --git a/src/merge/resources/email/types/__init__.py b/src/merge/resources/email/types/__init__.py
index 0a3239df..601f2f05 100644
--- a/src/merge/resources/email/types/__init__.py
+++ b/src/merge/resources/email/types/__init__.py
@@ -63,6 +63,7 @@
from .language_enum import LanguageEnum
from .last_sync_result_enum import LastSyncResultEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .mailbox import Mailbox
from .mailbox_field_mappings import MailboxFieldMappings
from .mailbox_type import MailboxType
@@ -168,6 +169,7 @@
"LanguageEnum": ".language_enum",
"LastSyncResultEnum": ".last_sync_result_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"Mailbox": ".mailbox",
"MailboxFieldMappings": ".mailbox_field_mappings",
"MailboxType": ".mailbox_type",
@@ -295,6 +297,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"Mailbox",
"MailboxFieldMappings",
"MailboxType",
diff --git a/src/merge/resources/email/types/linked_account_patch_response.py b/src/merge/resources/email/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/email/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/email/types/mailbox.py b/src/merge/resources/email/types/mailbox.py
index 3fb7b6e3..4159c457 100644
--- a/src/merge/resources/email/types/mailbox.py
+++ b/src/merge/resources/email/types/mailbox.py
@@ -47,6 +47,11 @@ class Mailbox(UncheckedBaseModel):
The mailbox's type.
"""
+ type_native: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Remote field for type.
+ """
+
folders: typing.Optional[typing.List[typing.Optional[str]]] = None
groups: typing.Optional[typing.List[typing.Optional[str]]] = None
users: typing.Optional[typing.List[typing.Optional[str]]] = None
diff --git a/src/merge/resources/email/types/message.py b/src/merge/resources/email/types/message.py
index 88da9a02..7797c47c 100644
--- a/src/merge/resources/email/types/message.py
+++ b/src/merge/resources/email/types/message.py
@@ -79,7 +79,11 @@ class Message(UncheckedBaseModel):
bcc: typing.Optional[typing.List[typing.Optional[str]]] = None
mailboxes: typing.Optional[typing.List[typing.Optional[str]]] = None
permissions: typing.Optional[typing.List[Permission]] = None
- folders: typing.Optional[typing.List[typing.Optional[str]]] = None
+ folder: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The folder that the message belongs to.
+ """
+
remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None)
"""
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/).
diff --git a/src/merge/resources/email/types/user.py b/src/merge/resources/email/types/user.py
index 9392ca2c..a6c96cab 100644
--- a/src/merge/resources/email/types/user.py
+++ b/src/merge/resources/email/types/user.py
@@ -46,6 +46,11 @@ class User(UncheckedBaseModel):
The user's type.
"""
+ type_native: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Remote field for type.
+ """
+
remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
"""
When the third party's user was created.
diff --git a/src/merge/resources/filestorage/__init__.py b/src/merge/resources/filestorage/__init__.py
index 123c50fb..ce1e022c 100644
--- a/src/merge/resources/filestorage/__init__.py
+++ b/src/merge/resources/filestorage/__init__.py
@@ -78,6 +78,7 @@
LanguageEnum,
LastSyncResultEnum,
LinkToken,
+ LinkedAccountPatchResponse,
LinkedAccountStatus,
MetaResponse,
MethodEnum,
@@ -247,6 +248,7 @@
"LanguageEnum": ".types",
"LastSyncResultEnum": ".types",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountStatus": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"MetaResponse": ".types",
@@ -425,6 +427,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"LinkedAccountsListRequestCategory",
"MetaResponse",
diff --git a/src/merge/resources/filestorage/resources/linked_accounts/client.py b/src/merge/resources/filestorage/resources/linked_accounts/client.py
index 3f6c9a99..2b952ab7 100644
--- a/src/merge/resources/filestorage/resources/linked_accounts/client.py
+++ b/src/merge/resources/filestorage/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -146,6 +150,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.filestorage.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -291,3 +336,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.filestorage.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/filestorage/resources/linked_accounts/raw_client.py b/src/merge/resources/filestorage/resources/linked_accounts/raw_client.py
index d0e67c0f..cf577368 100644
--- a/src/merge/resources/filestorage/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/filestorage/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -128,6 +133,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"filestorage/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -244,3 +300,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"filestorage/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/filestorage/types/__init__.py b/src/merge/resources/filestorage/types/__init__.py
index 129f24c9..3c59a4cc 100644
--- a/src/merge/resources/filestorage/types/__init__.py
+++ b/src/merge/resources/filestorage/types/__init__.py
@@ -79,6 +79,7 @@
from .language_enum import LanguageEnum
from .last_sync_result_enum import LastSyncResultEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .linked_account_status import LinkedAccountStatus
from .meta_response import MetaResponse
from .method_enum import MethodEnum
@@ -202,6 +203,7 @@
"LanguageEnum": ".language_enum",
"LastSyncResultEnum": ".last_sync_result_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"LinkedAccountStatus": ".linked_account_status",
"MetaResponse": ".meta_response",
"MethodEnum": ".method_enum",
@@ -347,6 +349,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"MetaResponse",
"MethodEnum",
diff --git a/src/merge/resources/filestorage/types/linked_account_patch_response.py b/src/merge/resources/filestorage/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/filestorage/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/hris/__init__.py b/src/merge/resources/hris/__init__.py
index c03d5493..a7f3323a 100644
--- a/src/merge/resources/hris/__init__.py
+++ b/src/merge/resources/hris/__init__.py
@@ -117,6 +117,7 @@
LanguageEnum,
LastSyncResultEnum,
LinkToken,
+ LinkedAccountPatchResponse,
LinkedAccountStatus,
Location,
LocationCountry,
@@ -421,6 +422,7 @@
"LanguageEnum": ".types",
"LastSyncResultEnum": ".types",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountStatus": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"Location": ".types",
@@ -722,6 +724,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"LinkedAccountsListRequestCategory",
"Location",
diff --git a/src/merge/resources/hris/resources/linked_accounts/client.py b/src/merge/resources/hris/resources/linked_accounts/client.py
index ada41b71..f7ee3f05 100644
--- a/src/merge/resources/hris/resources/linked_accounts/client.py
+++ b/src/merge/resources/hris/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -146,6 +150,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.hris.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -291,3 +336,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.hris.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/hris/resources/linked_accounts/raw_client.py b/src/merge/resources/hris/resources/linked_accounts/raw_client.py
index cd2639e5..819b8873 100644
--- a/src/merge/resources/hris/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/hris/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -128,6 +133,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"hris/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -244,3 +300,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"hris/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/hris/types/__init__.py b/src/merge/resources/hris/types/__init__.py
index 78d9efdc..829b90d8 100644
--- a/src/merge/resources/hris/types/__init__.py
+++ b/src/merge/resources/hris/types/__init__.py
@@ -118,6 +118,7 @@
from .language_enum import LanguageEnum
from .last_sync_result_enum import LastSyncResultEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .linked_account_status import LinkedAccountStatus
from .location import Location
from .location_country import LocationCountry
@@ -321,6 +322,7 @@
"LanguageEnum": ".language_enum",
"LastSyncResultEnum": ".last_sync_result_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"LinkedAccountStatus": ".linked_account_status",
"Location": ".location",
"LocationCountry": ".location_country",
@@ -546,6 +548,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"Location",
"LocationCountry",
diff --git a/src/merge/resources/hris/types/linked_account_patch_response.py b/src/merge/resources/hris/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/hris/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/knowledgebase/__init__.py b/src/merge/resources/knowledgebase/__init__.py
index 4e37f26c..9b9c8654 100644
--- a/src/merge/resources/knowledgebase/__init__.py
+++ b/src/merge/resources/knowledgebase/__init__.py
@@ -80,6 +80,7 @@
LanguageEnum,
LastSyncResultEnum,
LinkToken,
+ LinkedAccountPatchResponse,
MethodEnum,
ModelOperation,
ModelPermissionDeserializer,
@@ -251,6 +252,7 @@
"LanguageEnum": ".types",
"LastSyncResultEnum": ".types",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"MethodEnum": ".types",
"ModelOperation": ".types",
@@ -429,6 +431,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountsListRequestCategory",
"MethodEnum",
"ModelOperation",
diff --git a/src/merge/resources/knowledgebase/resources/linked_accounts/client.py b/src/merge/resources/knowledgebase/resources/linked_accounts/client.py
index 8b389f48..8973b7b6 100644
--- a/src/merge/resources/knowledgebase/resources/linked_accounts/client.py
+++ b/src/merge/resources/knowledgebase/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -138,6 +142,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.knowledgebase.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -275,3 +320,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.knowledgebase.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/knowledgebase/resources/linked_accounts/raw_client.py b/src/merge/resources/knowledgebase/resources/linked_accounts/raw_client.py
index 991575d6..c828d000 100644
--- a/src/merge/resources/knowledgebase/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/knowledgebase/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -120,6 +125,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"knowledgebase/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -228,3 +284,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"knowledgebase/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/knowledgebase/types/__init__.py b/src/merge/resources/knowledgebase/types/__init__.py
index cb392a79..0a8fa1d8 100644
--- a/src/merge/resources/knowledgebase/types/__init__.py
+++ b/src/merge/resources/knowledgebase/types/__init__.py
@@ -81,6 +81,7 @@
from .language_enum import LanguageEnum
from .last_sync_result_enum import LastSyncResultEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .method_enum import MethodEnum
from .model_operation import ModelOperation
from .model_permission_deserializer import ModelPermissionDeserializer
@@ -202,6 +203,7 @@
"LanguageEnum": ".language_enum",
"LastSyncResultEnum": ".last_sync_result_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"MethodEnum": ".method_enum",
"ModelOperation": ".model_operation",
"ModelPermissionDeserializer": ".model_permission_deserializer",
@@ -345,6 +347,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"MethodEnum",
"ModelOperation",
"ModelPermissionDeserializer",
diff --git a/src/merge/resources/knowledgebase/types/linked_account_patch_response.py b/src/merge/resources/knowledgebase/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/knowledgebase/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/merge/resources/ticketing/__init__.py b/src/merge/resources/ticketing/__init__.py
index 6bd3327c..01865f55 100644
--- a/src/merge/resources/ticketing/__init__.py
+++ b/src/merge/resources/ticketing/__init__.py
@@ -83,6 +83,7 @@
LanguageEnum,
LastSyncResultEnum,
LinkToken,
+ LinkedAccountPatchResponse,
LinkedAccountStatus,
MetaResponse,
MethodEnum,
@@ -334,6 +335,7 @@
"LanguageEnum": ".types",
"LastSyncResultEnum": ".types",
"LinkToken": ".types",
+ "LinkedAccountPatchResponse": ".types",
"LinkedAccountStatus": ".types",
"LinkedAccountsListRequestCategory": ".resources",
"MetaResponse": ".types",
@@ -595,6 +597,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"LinkedAccountsListRequestCategory",
"MetaResponse",
diff --git a/src/merge/resources/ticketing/resources/linked_accounts/client.py b/src/merge/resources/ticketing/resources/linked_accounts/client.py
index 59ed7936..669af215 100644
--- a/src/merge/resources/ticketing/resources/linked_accounts/client.py
+++ b/src/merge/resources/ticketing/resources/linked_accounts/client.py
@@ -4,10 +4,14 @@
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .raw_client import AsyncRawLinkedAccountsClient, RawLinkedAccountsClient
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class LinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -146,6 +150,47 @@ def list(
)
return _response.data
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ Examples
+ --------
+ from merge import Merge
+
+ client = Merge(
+ account_token="YOUR_ACCOUNT_TOKEN",
+ api_key="YOUR_API_KEY",
+ )
+ client.ticketing.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+ """
+ _response = self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
+
class AsyncLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -291,3 +336,52 @@ async def main() -> None:
request_options=request_options,
)
return _response.data
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> LinkedAccountPatchResponse:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ LinkedAccountPatchResponse
+
+
+ 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.ticketing.linked_accounts.partial_update(
+ linked_account_id="linked_account_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.partial_update(
+ linked_account_id, ekm_enabled=ekm_enabled, request_options=request_options
+ )
+ return _response.data
diff --git a/src/merge/resources/ticketing/resources/linked_accounts/raw_client.py b/src/merge/resources/ticketing/resources/linked_accounts/raw_client.py
index 5526d4f8..f3e0b26d 100644
--- a/src/merge/resources/ticketing/resources/linked_accounts/raw_client.py
+++ b/src/merge/resources/ticketing/resources/linked_accounts/raw_client.py
@@ -6,11 +6,16 @@
from .....core.api_error import ApiError
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.http_response import AsyncHttpResponse, HttpResponse
+from .....core.jsonable_encoder import jsonable_encoder
from .....core.request_options import RequestOptions
from .....core.unchecked_base_model import construct_type
+from ...types.linked_account_patch_response import LinkedAccountPatchResponse
from ...types.paginated_account_details_and_actions_list import PaginatedAccountDetailsAndActionsList
from .types.linked_accounts_list_request_category import LinkedAccountsListRequestCategory
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
class RawLinkedAccountsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -128,6 +133,57 @@ def list(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"ticketing/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
class AsyncRawLinkedAccountsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -244,3 +300,54 @@ async def list(
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def partial_update(
+ self,
+ linked_account_id: str,
+ *,
+ ekm_enabled: typing.Optional[bool] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[LinkedAccountPatchResponse]:
+ """
+ Update a linked account.
+
+ Parameters
+ ----------
+ linked_account_id : str
+
+ ekm_enabled : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[LinkedAccountPatchResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"ticketing/v1/linked-accounts/{jsonable_encoder(linked_account_id)}",
+ method="PATCH",
+ json={
+ "ekm_enabled": ekm_enabled,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ LinkedAccountPatchResponse,
+ construct_type(
+ type_=LinkedAccountPatchResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/merge/resources/ticketing/types/__init__.py b/src/merge/resources/ticketing/types/__init__.py
index 1fe855e6..6874c967 100644
--- a/src/merge/resources/ticketing/types/__init__.py
+++ b/src/merge/resources/ticketing/types/__init__.py
@@ -84,6 +84,7 @@
from .language_enum import LanguageEnum
from .last_sync_result_enum import LastSyncResultEnum
from .link_token import LinkToken
+ from .linked_account_patch_response import LinkedAccountPatchResponse
from .linked_account_status import LinkedAccountStatus
from .meta_response import MetaResponse
from .method_enum import MethodEnum
@@ -271,6 +272,7 @@
"LanguageEnum": ".language_enum",
"LastSyncResultEnum": ".last_sync_result_enum",
"LinkToken": ".link_token",
+ "LinkedAccountPatchResponse": ".linked_account_patch_response",
"LinkedAccountStatus": ".linked_account_status",
"MetaResponse": ".meta_response",
"MethodEnum": ".method_enum",
@@ -480,6 +482,7 @@ def __dir__():
"LanguageEnum",
"LastSyncResultEnum",
"LinkToken",
+ "LinkedAccountPatchResponse",
"LinkedAccountStatus",
"MetaResponse",
"MethodEnum",
diff --git a/src/merge/resources/ticketing/types/linked_account_patch_response.py b/src/merge/resources/ticketing/types/linked_account_patch_response.py
new file mode 100644
index 00000000..ef604b94
--- /dev/null
+++ b/src/merge/resources/ticketing/types/linked_account_patch_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ....core.pydantic_utilities import IS_PYDANTIC_V2
+from ....core.unchecked_base_model import UncheckedBaseModel
+
+
+class LinkedAccountPatchResponse(UncheckedBaseModel):
+ id: str
+ ekm_enabled: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow