From a00332f1b0686edf3b842fff37ea28683a22ad4f Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 8 Jun 2026 20:53:30 +0000
Subject: [PATCH] [fern-generated] Update SDK
Generated by Fern
CLI Version: unknown
Generators:
- fernapi/fern-python-sdk: 4.29.1
---
.fern/replay.lock | 10 +
.fernignore | 5 +-
.gitattributes | 1 +
README.md | 1 +
poetry.lock | 12 +-
pyproject.toml | 2 +-
reference.md | 1041 ++++++++++++++---
src/merge/core/client_wrapper.py | 4 +-
src/merge/resources/accounting/__init__.py | 3 +
.../resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
.../resources/accounting/types/__init__.py | 3 +
.../resources/accounting/types/account.py | 5 +
.../accounting/types/account_details.py | 3 +
.../accounting/types/account_request.py | 5 +
.../accounting/types/accounting_period.py | 5 +
.../accounting/types/bank_feed_account.py | 5 +
.../types/bank_feed_account_request.py | 5 +
.../accounting/types/bank_feed_transaction.py | 5 +
.../accounting/types/company_info.py | 5 +
.../resources/accounting/types/contact.py | 5 +
.../accounting/types/contact_request.py | 5 +
.../resources/accounting/types/credit_note.py | 5 +
.../resources/accounting/types/employee.py | 5 +
.../accounting/types/expense_report.py | 5 +
.../types/expense_report_request.py | 5 +
.../resources/accounting/types/invoice.py | 5 +
src/merge/resources/accounting/types/item.py | 5 +
.../accounting/types/item_fulfillment.py | 5 +
.../accounting/types/journal_entry.py | 5 +
.../types/linked_account_patch_response.py | 21 +
.../types/patched_contact_request.py | 5 +
.../types/patched_payment_request.py | 5 +
.../types/patched_vendor_credit_request.py | 4 +
.../resources/accounting/types/payment.py | 5 +
.../accounting/types/payment_method.py | 5 +
.../accounting/types/payment_request.py | 5 +
.../accounting/types/payment_term.py | 5 +
.../resources/accounting/types/project.py | 5 +
.../accounting/types/purchase_order.py | 5 +
.../resources/accounting/types/sales_order.py | 5 +
.../accounting/types/tracking_category.py | 4 +
.../resources/accounting/types/transaction.py | 4 +
.../accounting/types/vendor_credit.py | 4 +
.../accounting/types/vendor_credit_request.py | 4 +
src/merge/resources/ats/__init__.py | 3 +
.../ats/resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
src/merge/resources/ats/types/__init__.py | 3 +
.../resources/ats/types/account_details.py | 3 +
.../types/linked_account_patch_response.py | 21 +
src/merge/resources/chat/__init__.py | 3 +
.../chat/resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
src/merge/resources/chat/types/__init__.py | 3 +
.../types/linked_account_patch_response.py | 21 +
src/merge/resources/crm/__init__.py | 3 +
.../crm/resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
src/merge/resources/crm/types/__init__.py | 3 +
.../resources/crm/types/account_details.py | 3 +
.../types/linked_account_patch_response.py | 21 +
src/merge/resources/email/__init__.py | 3 +
.../email/resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
src/merge/resources/email/types/__init__.py | 3 +
.../types/linked_account_patch_response.py | 21 +
src/merge/resources/filestorage/__init__.py | 3 +
.../resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
.../resources/filestorage/types/__init__.py | 3 +
.../filestorage/types/account_details.py | 3 +
.../types/linked_account_patch_response.py | 21 +
src/merge/resources/hris/__init__.py | 3 +
.../hris/resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
src/merge/resources/hris/types/__init__.py | 3 +
.../resources/hris/types/account_details.py | 3 +
src/merge/resources/hris/types/employee.py | 5 +
.../resources/hris/types/employee_request.py | 5 +
src/merge/resources/hris/types/group.py | 5 +
.../types/linked_account_patch_response.py | 21 +
src/merge/resources/knowledgebase/__init__.py | 3 +
.../resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
.../resources/knowledgebase/types/__init__.py | 3 +
.../types/linked_account_patch_response.py | 21 +
src/merge/resources/ticketing/__init__.py | 3 +
.../resources/linked_accounts/client.py | 94 ++
.../resources/linked_accounts/raw_client.py | 107 ++
.../resources/ticketing/types/__init__.py | 3 +
.../ticketing/types/account_details.py | 3 +
.../types/linked_account_patch_response.py | 21 +
93 files changed, 3136 insertions(+), 175 deletions(-)
create mode 100644 .fern/replay.lock
create mode 100644 .gitattributes
create mode 100644 src/merge/resources/accounting/types/linked_account_patch_response.py
create mode 100644 src/merge/resources/ats/types/linked_account_patch_response.py
create mode 100644 src/merge/resources/chat/types/linked_account_patch_response.py
create mode 100644 src/merge/resources/crm/types/linked_account_patch_response.py
create mode 100644 src/merge/resources/email/types/linked_account_patch_response.py
create mode 100644 src/merge/resources/filestorage/types/linked_account_patch_response.py
create mode 100644 src/merge/resources/hris/types/linked_account_patch_response.py
create mode 100644 src/merge/resources/knowledgebase/types/linked_account_patch_response.py
create mode 100644 src/merge/resources/ticketing/types/linked_account_patch_response.py
diff --git a/.fern/replay.lock b/.fern/replay.lock
new file mode 100644
index 00000000..ac345791
--- /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-06-08T20:53:28.134Z
+ 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..b20df215 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "MergePythonClient"
[tool.poetry]
name = "MergePythonClient"
-version = "3.0.1"
+version = "3.2.0a1"
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..eaa44007 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.2.0a1",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "MergePythonClient",
- "X-Fern-SDK-Version": "3.0.1",
+ "X-Fern-SDK-Version": "3.2.0a1",
**(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/account.py b/src/merge/resources/accounting/types/account.py
index 0c2f2c68..938cd441 100644
--- a/src/merge/resources/accounting/types/account.py
+++ b/src/merge/resources/accounting/types/account.py
@@ -31,6 +31,11 @@ class Account(UncheckedBaseModel):
Fetch from the `LIST Accounts` endpoint and view a company's accounts.
"""
+ account_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the account.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/account_details.py b/src/merge/resources/accounting/types/account_details.py
index 98923cd8..4d7bb370 100644
--- a/src/merge/resources/accounting/types/account_details.py
+++ b/src/merge/resources/accounting/types/account_details.py
@@ -30,6 +30,9 @@ class AccountDetails(UncheckedBaseModel):
The time at which account completes the linking flow.
"""
+ instance_id: typing.Optional[str] = None
+ instance_display_value: typing.Optional[str] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/merge/resources/accounting/types/account_request.py b/src/merge/resources/accounting/types/account_request.py
index 8c333e61..35be1e07 100644
--- a/src/merge/resources/accounting/types/account_request.py
+++ b/src/merge/resources/accounting/types/account_request.py
@@ -29,6 +29,11 @@ class AccountRequest(UncheckedBaseModel):
Fetch from the `LIST Accounts` endpoint and view a company's accounts.
"""
+ account_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the account.
+ """
+
name: typing.Optional[str] = pydantic.Field(default=None)
"""
The account's name.
diff --git a/src/merge/resources/accounting/types/accounting_period.py b/src/merge/resources/accounting/types/accounting_period.py
index eed33108..8bba15b0 100644
--- a/src/merge/resources/accounting/types/accounting_period.py
+++ b/src/merge/resources/accounting/types/accounting_period.py
@@ -20,6 +20,11 @@ class AccountingPeriod(UncheckedBaseModel):
Common models like `Invoice` and `Transaction` will have `AccountingPeriod` objects which will denote when they occurred.
"""
+ accounting_period_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the accounting period.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/bank_feed_account.py b/src/merge/resources/accounting/types/bank_feed_account.py
index be06f45e..9e7c035c 100644
--- a/src/merge/resources/accounting/types/bank_feed_account.py
+++ b/src/merge/resources/accounting/types/bank_feed_account.py
@@ -22,6 +22,11 @@ class BankFeedAccount(UncheckedBaseModel):
Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account.
"""
+ bank_feed_account_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the bank feed account.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/bank_feed_account_request.py b/src/merge/resources/accounting/types/bank_feed_account_request.py
index c87b7395..3f298bcb 100644
--- a/src/merge/resources/accounting/types/bank_feed_account_request.py
+++ b/src/merge/resources/accounting/types/bank_feed_account_request.py
@@ -21,6 +21,11 @@ class BankFeedAccountRequest(UncheckedBaseModel):
Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account.
"""
+ bank_feed_account_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the bank feed account.
+ """
+
source_account_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The unique identifier of the source account from our customerβs platform.
diff --git a/src/merge/resources/accounting/types/bank_feed_transaction.py b/src/merge/resources/accounting/types/bank_feed_transaction.py
index aace57db..3e55a253 100644
--- a/src/merge/resources/accounting/types/bank_feed_transaction.py
+++ b/src/merge/resources/accounting/types/bank_feed_transaction.py
@@ -20,6 +20,11 @@ class BankFeedTransaction(UncheckedBaseModel):
Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account.
"""
+ bank_feed_transaction_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the bank feed transaction.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/company_info.py b/src/merge/resources/accounting/types/company_info.py
index d4ed2d01..fea08c22 100644
--- a/src/merge/resources/accounting/types/company_info.py
+++ b/src/merge/resources/accounting/types/company_info.py
@@ -22,6 +22,11 @@ class CompanyInfo(UncheckedBaseModel):
Fetch from the `GET CompanyInfo` endpoint and view a company's information.
"""
+ company_info_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the company info.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/contact.py b/src/merge/resources/accounting/types/contact.py
index 1c549242..da851755 100644
--- a/src/merge/resources/accounting/types/contact.py
+++ b/src/merge/resources/accounting/types/contact.py
@@ -26,6 +26,11 @@ class Contact(UncheckedBaseModel):
Fetch from the `LIST Contacts` endpoint and view a company's contacts.
"""
+ contact_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the contact.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/contact_request.py b/src/merge/resources/accounting/types/contact_request.py
index e9daca97..979e04c7 100644
--- a/src/merge/resources/accounting/types/contact_request.py
+++ b/src/merge/resources/accounting/types/contact_request.py
@@ -24,6 +24,11 @@ class ContactRequest(UncheckedBaseModel):
Fetch from the `LIST Contacts` endpoint and view a company's contacts.
"""
+ contact_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the contact.
+ """
+
name: typing.Optional[str] = pydantic.Field(default=None)
"""
The contact's name.
diff --git a/src/merge/resources/accounting/types/credit_note.py b/src/merge/resources/accounting/types/credit_note.py
index 1b9909a1..6211e1f3 100644
--- a/src/merge/resources/accounting/types/credit_note.py
+++ b/src/merge/resources/accounting/types/credit_note.py
@@ -30,6 +30,11 @@ class CreditNote(UncheckedBaseModel):
Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes.
"""
+ credit_note_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the credit note.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/employee.py b/src/merge/resources/accounting/types/employee.py
index 145497c2..aeab0e44 100644
--- a/src/merge/resources/accounting/types/employee.py
+++ b/src/merge/resources/accounting/types/employee.py
@@ -23,6 +23,11 @@ class Employee(UncheckedBaseModel):
Fetch from the `LIST Employees` endpoint and view a company's employees.
"""
+ employee_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the employee.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/expense_report.py b/src/merge/resources/accounting/types/expense_report.py
index 696ff2d3..707c4104 100644
--- a/src/merge/resources/accounting/types/expense_report.py
+++ b/src/merge/resources/accounting/types/expense_report.py
@@ -27,6 +27,11 @@ class ExpenseReport(UncheckedBaseModel):
Fetch from the `GET ExpenseReport` endpoint to view details of expense reports and their line items.
"""
+ expense_report_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the expense report.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/accounting/types/expense_report_request.py b/src/merge/resources/accounting/types/expense_report_request.py
index 4eda8fa3..b3a7c343 100644
--- a/src/merge/resources/accounting/types/expense_report_request.py
+++ b/src/merge/resources/accounting/types/expense_report_request.py
@@ -25,6 +25,11 @@ class ExpenseReportRequest(UncheckedBaseModel):
Fetch from the `GET ExpenseReport` endpoint to view details of expense reports and their line items.
"""
+ expense_report_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the expense report.
+ """
+
report_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
"""
The date of the expense report.
diff --git a/src/merge/resources/accounting/types/invoice.py b/src/merge/resources/accounting/types/invoice.py
index 85d5dedf..2b060f8f 100644
--- a/src/merge/resources/accounting/types/invoice.py
+++ b/src/merge/resources/accounting/types/invoice.py
@@ -40,6 +40,11 @@ class Invoice(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ invoice_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the invoice.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
diff --git a/src/merge/resources/accounting/types/item.py b/src/merge/resources/accounting/types/item.py
index f42e396e..d894ccd5 100644
--- a/src/merge/resources/accounting/types/item.py
+++ b/src/merge/resources/accounting/types/item.py
@@ -27,6 +27,11 @@ class Item(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ item_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the item.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
diff --git a/src/merge/resources/accounting/types/item_fulfillment.py b/src/merge/resources/accounting/types/item_fulfillment.py
index 16a1c7e4..b61371b8 100644
--- a/src/merge/resources/accounting/types/item_fulfillment.py
+++ b/src/merge/resources/accounting/types/item_fulfillment.py
@@ -26,6 +26,11 @@ class ItemFulfillment(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ item_fulfillment_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the item fulfillment.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
diff --git a/src/merge/resources/accounting/types/journal_entry.py b/src/merge/resources/accounting/types/journal_entry.py
index d0c1fffe..547cb158 100644
--- a/src/merge/resources/accounting/types/journal_entry.py
+++ b/src/merge/resources/accounting/types/journal_entry.py
@@ -33,6 +33,11 @@ class JournalEntry(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ journal_entry_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the journal entry.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
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/accounting/types/patched_contact_request.py b/src/merge/resources/accounting/types/patched_contact_request.py
index d9399b72..806df980 100644
--- a/src/merge/resources/accounting/types/patched_contact_request.py
+++ b/src/merge/resources/accounting/types/patched_contact_request.py
@@ -24,6 +24,11 @@ class PatchedContactRequest(UncheckedBaseModel):
Fetch from the `LIST Contacts` endpoint and view a company's contacts.
"""
+ contact_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the contact.
+ """
+
name: typing.Optional[str] = pydantic.Field(default=None)
"""
The contact's name.
diff --git a/src/merge/resources/accounting/types/patched_payment_request.py b/src/merge/resources/accounting/types/patched_payment_request.py
index 4ac6bc63..19b730f9 100644
--- a/src/merge/resources/accounting/types/patched_payment_request.py
+++ b/src/merge/resources/accounting/types/patched_payment_request.py
@@ -28,6 +28,11 @@ class PatchedPaymentRequest(UncheckedBaseModel):
Fetch from the `GET Payment` endpoint and view an invoice's payment.
"""
+ payment_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the payment.
+ """
+
transaction_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
"""
The payment's transaction date.
diff --git a/src/merge/resources/accounting/types/patched_vendor_credit_request.py b/src/merge/resources/accounting/types/patched_vendor_credit_request.py
index 020ea6a5..b9ac7532 100644
--- a/src/merge/resources/accounting/types/patched_vendor_credit_request.py
+++ b/src/merge/resources/accounting/types/patched_vendor_credit_request.py
@@ -367,6 +367,10 @@ class PatchedVendorCreditRequest(UncheckedBaseModel):
tracking_categories: typing.Optional[typing.List[PatchedVendorCreditRequestTrackingCategoriesItem]] = None
integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ vendor_credit_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the vendor credit.
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/merge/resources/accounting/types/payment.py b/src/merge/resources/accounting/types/payment.py
index c005cf14..18e5f5fd 100644
--- a/src/merge/resources/accounting/types/payment.py
+++ b/src/merge/resources/accounting/types/payment.py
@@ -30,6 +30,11 @@ class Payment(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ payment_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the payment.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
diff --git a/src/merge/resources/accounting/types/payment_method.py b/src/merge/resources/accounting/types/payment_method.py
index 7d4483d9..4a1239b0 100644
--- a/src/merge/resources/accounting/types/payment_method.py
+++ b/src/merge/resources/accounting/types/payment_method.py
@@ -21,6 +21,11 @@ class PaymentMethod(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ payment_method_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the payment method.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
diff --git a/src/merge/resources/accounting/types/payment_request.py b/src/merge/resources/accounting/types/payment_request.py
index 9896b109..886e0531 100644
--- a/src/merge/resources/accounting/types/payment_request.py
+++ b/src/merge/resources/accounting/types/payment_request.py
@@ -28,6 +28,11 @@ class PaymentRequest(UncheckedBaseModel):
Fetch from the `GET Payment` endpoint and view an invoice's payment.
"""
+ payment_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the payment.
+ """
+
transaction_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
"""
The payment's transaction date.
diff --git a/src/merge/resources/accounting/types/payment_term.py b/src/merge/resources/accounting/types/payment_term.py
index 9c4209b4..3ff34540 100644
--- a/src/merge/resources/accounting/types/payment_term.py
+++ b/src/merge/resources/accounting/types/payment_term.py
@@ -22,6 +22,11 @@ class PaymentTerm(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ payment_term_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the payment term.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
diff --git a/src/merge/resources/accounting/types/project.py b/src/merge/resources/accounting/types/project.py
index 6cc2cbf1..1bf9cab0 100644
--- a/src/merge/resources/accounting/types/project.py
+++ b/src/merge/resources/accounting/types/project.py
@@ -23,6 +23,11 @@ class Project(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ project_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the project.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
diff --git a/src/merge/resources/accounting/types/purchase_order.py b/src/merge/resources/accounting/types/purchase_order.py
index 6d0e5e07..2b5bd281 100644
--- a/src/merge/resources/accounting/types/purchase_order.py
+++ b/src/merge/resources/accounting/types/purchase_order.py
@@ -32,6 +32,11 @@ class PurchaseOrder(UncheckedBaseModel):
"""
id: typing.Optional[str] = None
+ purchase_order_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the purchase order.
+ """
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The third-party API ID of the matching object.
diff --git a/src/merge/resources/accounting/types/sales_order.py b/src/merge/resources/accounting/types/sales_order.py
index 2b4ccc27..c7df3bdb 100644
--- a/src/merge/resources/accounting/types/sales_order.py
+++ b/src/merge/resources/accounting/types/sales_order.py
@@ -371,6 +371,11 @@ class SalesOrder(UncheckedBaseModel):
The subsidiary associated with the order.
"""
+ sales_order_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the sales order.
+ """
+
status: typing.Optional[SalesOrderStatus] = pydantic.Field(default=None)
"""
The status of the sales order.
diff --git a/src/merge/resources/accounting/types/tracking_category.py b/src/merge/resources/accounting/types/tracking_category.py
index f4d2e0ba..19bc0364 100644
--- a/src/merge/resources/accounting/types/tracking_category.py
+++ b/src/merge/resources/accounting/types/tracking_category.py
@@ -70,6 +70,10 @@ class TrackingCategory(UncheckedBaseModel):
"""
field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ tracking_category_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the tracking category.
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/merge/resources/accounting/types/transaction.py b/src/merge/resources/accounting/types/transaction.py
index fe5a54b2..6c06bac6 100644
--- a/src/merge/resources/accounting/types/transaction.py
+++ b/src/merge/resources/accounting/types/transaction.py
@@ -420,6 +420,10 @@ class Transaction(UncheckedBaseModel):
field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
remote_data: typing.Optional[typing.List[RemoteData]] = None
+ transaction_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the transaction.
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/merge/resources/accounting/types/vendor_credit.py b/src/merge/resources/accounting/types/vendor_credit.py
index b99c8e41..d40294e3 100644
--- a/src/merge/resources/accounting/types/vendor_credit.py
+++ b/src/merge/resources/accounting/types/vendor_credit.py
@@ -411,6 +411,10 @@ class VendorCredit(UncheckedBaseModel):
field_mappings: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
remote_data: typing.Optional[typing.List[RemoteData]] = None
+ vendor_credit_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the vendor credit.
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/merge/resources/accounting/types/vendor_credit_request.py b/src/merge/resources/accounting/types/vendor_credit_request.py
index d8b7d4dd..12dad306 100644
--- a/src/merge/resources/accounting/types/vendor_credit_request.py
+++ b/src/merge/resources/accounting/types/vendor_credit_request.py
@@ -388,6 +388,10 @@ class VendorCreditRequest(UncheckedBaseModel):
integration_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
linked_account_params: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ vendor_credit_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the vendor credit.
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
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/account_details.py b/src/merge/resources/ats/types/account_details.py
index 98923cd8..4d7bb370 100644
--- a/src/merge/resources/ats/types/account_details.py
+++ b/src/merge/resources/ats/types/account_details.py
@@ -30,6 +30,9 @@ class AccountDetails(UncheckedBaseModel):
The time at which account completes the linking flow.
"""
+ instance_id: typing.Optional[str] = None
+ instance_display_value: typing.Optional[str] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
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/account_details.py b/src/merge/resources/crm/types/account_details.py
index 98923cd8..4d7bb370 100644
--- a/src/merge/resources/crm/types/account_details.py
+++ b/src/merge/resources/crm/types/account_details.py
@@ -30,6 +30,9 @@ class AccountDetails(UncheckedBaseModel):
The time at which account completes the linking flow.
"""
+ instance_id: typing.Optional[str] = None
+ instance_display_value: typing.Optional[str] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
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/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/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/account_details.py b/src/merge/resources/filestorage/types/account_details.py
index 98923cd8..4d7bb370 100644
--- a/src/merge/resources/filestorage/types/account_details.py
+++ b/src/merge/resources/filestorage/types/account_details.py
@@ -30,6 +30,9 @@ class AccountDetails(UncheckedBaseModel):
The time at which account completes the linking flow.
"""
+ instance_id: typing.Optional[str] = None
+ instance_display_value: typing.Optional[str] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
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/account_details.py b/src/merge/resources/hris/types/account_details.py
index 98923cd8..4d7bb370 100644
--- a/src/merge/resources/hris/types/account_details.py
+++ b/src/merge/resources/hris/types/account_details.py
@@ -30,6 +30,9 @@ class AccountDetails(UncheckedBaseModel):
The time at which account completes the linking flow.
"""
+ instance_id: typing.Optional[str] = None
+ instance_display_value: typing.Optional[str] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/merge/resources/hris/types/employee.py b/src/merge/resources/hris/types/employee.py
index 2c7d8d1c..8de1927d 100644
--- a/src/merge/resources/hris/types/employee.py
+++ b/src/merge/resources/hris/types/employee.py
@@ -31,6 +31,11 @@ class Employee(UncheckedBaseModel):
Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees.
"""
+ employee_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the employee.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
diff --git a/src/merge/resources/hris/types/employee_request.py b/src/merge/resources/hris/types/employee_request.py
index 47c055f1..0476ab6b 100644
--- a/src/merge/resources/hris/types/employee_request.py
+++ b/src/merge/resources/hris/types/employee_request.py
@@ -42,6 +42,11 @@ class EmployeeRequest(UncheckedBaseModel):
The ID of the employee's company.
"""
+ employee_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the employee.
+ """
+
first_name: typing.Optional[str] = pydantic.Field(default=None)
"""
The employee's first name.
diff --git a/src/merge/resources/hris/types/group.py b/src/merge/resources/hris/types/group.py
index d52c68d4..1e694fa9 100644
--- a/src/merge/resources/hris/types/group.py
+++ b/src/merge/resources/hris/types/group.py
@@ -20,6 +20,11 @@ class Group(UncheckedBaseModel):
Fetch from the `LIST Employee` endpoint and expand groups to view an employee's groups.
"""
+ group_url: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The 3rd party URL of the group.
+ """
+
id: typing.Optional[str] = None
remote_id: typing.Optional[str] = pydantic.Field(default=None)
"""
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/account_details.py b/src/merge/resources/ticketing/types/account_details.py
index 98923cd8..4d7bb370 100644
--- a/src/merge/resources/ticketing/types/account_details.py
+++ b/src/merge/resources/ticketing/types/account_details.py
@@ -30,6 +30,9 @@ class AccountDetails(UncheckedBaseModel):
The time at which account completes the linking flow.
"""
+ instance_id: typing.Optional[str] = None
+ instance_display_value: typing.Optional[str] = None
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
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