diff --git a/.mock/definition/chat/__package__.yml b/.mock/definition/chat/__package__.yml index c8391721..8b785b13 100644 --- a/.mock/definition/chat/__package__.yml +++ b/.mock/definition/chat/__package__.yml @@ -660,6 +660,12 @@ types: * `PUBLIC_INTERNAL` - PUBLIC_INTERNAL * `PUBLIC_EXTERNAL` - PUBLIC_EXTERNAL members: optional>> + remote_created_at: + type: optional + docs: When the third party's conversation was created. + remote_updated_at: + type: optional + docs: When the third party's conversation was updated. remote_was_deleted: type: optional docs: >- @@ -1060,6 +1066,12 @@ types: docs: The name of the Group validation: maxLength: 254 + remote_created_at: + type: optional + docs: When the third party's group was created. + remote_updated_at: + type: optional + docs: When the third party's group was updated. remote_was_deleted: type: optional docs: >- @@ -1216,6 +1228,12 @@ types: member is a group. validation: format: uuid + remote_created_at: + type: optional + docs: When the third party's conversation was created. + remote_updated_at: + type: optional + docs: When the third party's conversation was updated. remote_was_deleted: type: optional docs: >- @@ -1290,6 +1308,12 @@ types: validation: format: uri maxLength: 500 + remote_created_at: + type: optional + docs: When the third party's conversation was created. + remote_updated_at: + type: optional + docs: When the third party's conversation was updated. remote_was_deleted: type: optional docs: >- @@ -1298,6 +1322,7 @@ types: Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only source: openapi: openapi/openapi.yml MethodEnum: @@ -1757,6 +1782,12 @@ types: validation: format: uri maxLength: 2000 + remote_created_at: + type: optional + docs: When the third party's user was created. + remote_updated_at: + type: optional + docs: When the third party's user was updated. remote_was_deleted: type: optional docs: >- diff --git a/.mock/definition/chat/conversations.yml b/.mock/definition/chat/conversations.yml index 50209f74..8a8ebc9b 100644 --- a/.mock/definition/chat/conversations.yml +++ b/.mock/definition/chat/conversations.yml @@ -99,6 +99,8 @@ service: type: PRIVATE_INTERNAL members: - null + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: @@ -178,6 +180,8 @@ service: modified_at: '2021-10-16T00:00:00Z' user: a1234567-89ab-cdef-0123-456789abcdef group: group + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: @@ -241,6 +245,8 @@ service: type: PRIVATE_INTERNAL members: - members + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: diff --git a/.mock/definition/chat/groups.yml b/.mock/definition/chat/groups.yml index a6683848..dbc7d4da 100644 --- a/.mock/definition/chat/groups.yml +++ b/.mock/definition/chat/groups.yml @@ -88,6 +88,8 @@ service: created_at: '2021-09-15T00:00:00Z' modified_at: '2021-10-16T00:00:00Z' name: Engineering + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: @@ -140,6 +142,8 @@ service: created_at: '2021-09-15T00:00:00Z' modified_at: '2021-10-16T00:00:00Z' name: Engineering + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: diff --git a/.mock/definition/chat/messages.yml b/.mock/definition/chat/messages.yml index ee4c5b13..75208260 100644 --- a/.mock/definition/chat/messages.yml +++ b/.mock/definition/chat/messages.yml @@ -1,3 +1,20 @@ +types: + MessagesListRequestOrderBy: + enum: + - value: '-remote_created_at' + name: RemoteCreatedAtDescending + - value: remote_created_at + name: RemoteCreatedAtAscending + source: + openapi: openapi/openapi.yml + MessagesRepliesListRequestOrderBy: + enum: + - value: '-remote_created_at' + name: RemoteCreatedAtDescending + - value: remote_created_at + name: RemoteCreatedAtAscending + source: + openapi: openapi/openapi.yml imports: root: __package__.yml service: @@ -54,12 +71,22 @@ service: docs: >- If provided, only objects synced by Merge before this date time will be returned. + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: remote_created_at, -remote_created_at. page_size: type: optional docs: Number of results to return per page. The maximum limit is 100. remote_id: type: optional docs: The API provider's ID for the given object. + root_message: + type: optional + docs: >- + If provided as 'true', will only return root messages (messages + without a parent message). response: docs: '' type: root.PaginatedMessageList @@ -74,8 +101,10 @@ service: include_shell_data: true modified_after: '2024-01-15T09:30:00Z' modified_before: '2024-01-15T09:30:00Z' + order_by: '-remote_created_at' page_size: 1 remote_id: remote_id + root_message: root_message headers: X-Account-Token: X-Account-Token response: @@ -93,6 +122,8 @@ service: subject_line: Hello World root_message_id: a1234567-89ab-cdef-0123-456789abcdef url: https://example.com/messages/mem-001 + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true retrieve: path: /chat/v1/messages/{id} @@ -141,6 +172,8 @@ service: subject_line: Hello World root_message_id: a1234567-89ab-cdef-0123-456789abcdef url: https://example.com/messages/mem-001 + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true repliesList: path: /chat/v1/messages/{message_id}/replies @@ -176,6 +209,11 @@ service: docs: >- Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: remote_created_at, -remote_created_at. page_size: type: optional docs: Number of results to return per page. The maximum limit is 100. @@ -191,6 +229,7 @@ service: include_deleted_data: true include_remote_data: true include_shell_data: true + order_by: '-remote_created_at' page_size: 1 headers: X-Account-Token: X-Account-Token @@ -209,6 +248,8 @@ service: subject_line: Hello World root_message_id: a1234567-89ab-cdef-0123-456789abcdef url: https://example.com/messages/mem-001 + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true source: openapi: openapi/openapi.yml diff --git a/.mock/definition/chat/users.yml b/.mock/definition/chat/users.yml index b3415a86..843f74e6 100644 --- a/.mock/definition/chat/users.yml +++ b/.mock/definition/chat/users.yml @@ -101,6 +101,8 @@ service: groups: - groups avatar: https://merge.dev/user_profile_pic.png + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: @@ -166,6 +168,8 @@ service: groups: - groups avatar: https://merge.dev/user_profile_pic.png + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: diff --git a/README.md b/README.md index 7ee7e37d..74e4002c 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,25 @@ The Merge Python library provides convenient access to the Merge APIs from Python. +## Table of Contents + +- [Documentation](#documentation) +- [Installation](#installation) +- [Reference](#reference) +- [Usage](#usage) +- [Instantiation](#instantiation) +- [Categories](#categories) +- [Async Client](#async-client) +- [Exception Handling](#exception-handling) +- [Advanced](#advanced) + - [Access Raw Response Data](#access-raw-response-data) + - [Retries](#retries) + - [Timeouts](#timeouts) + - [Custom Client](#custom-client) +- [Contributing](#contributing) +- [File Download](#file-download) +- [Pagination](#pagination) + ## Documentation API reference documentation is available [here](https://docs.merge.dev/). @@ -240,3 +259,4 @@ while response.next is not None: + diff --git a/poetry.lock b/poetry.lock index fef37956..794340bd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"] [[package]] name = "certifi" -version = "2025.10.5" +version = "2025.11.12" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"}, - {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"}, + {file = "certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b"}, + {file = "certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 00c30a0c..147dd02e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "MergePythonClient" [tool.poetry] name = "MergePythonClient" -version = "2.5.0" +version = "2.6.0" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 44fd8a5b..548074e8 100644 --- a/reference.md +++ b/reference.md @@ -11118,6 +11118,7 @@ Returns a list of `Message` objects. import datetime from merge import Merge +from merge.resources.chat.resources.messages import MessagesListRequestOrderBy client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -11140,8 +11141,10 @@ client.chat.messages.list( modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + order_by=MessagesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, page_size=1, remote_id="remote_id", + root_message="root_message", ) ``` @@ -11222,6 +11225,14 @@ client.chat.messages.list(
+**order_by:** `typing.Optional[MessagesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + +
+
+ +
+
+ **page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -11238,6 +11249,14 @@ client.chat.messages.list(
+**root_message:** `typing.Optional[str]` — If provided as 'true', will only return root messages (messages without a parent message). + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -11367,6 +11386,9 @@ Returns a list of `Message` objects. ```python from merge import Merge +from merge.resources.chat.resources.messages import ( + MessagesRepliesListRequestOrderBy, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -11378,6 +11400,7 @@ client.chat.messages.replies_list( include_deleted_data=True, include_remote_data=True, include_shell_data=True, + order_by=MessagesRepliesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, page_size=1, ) @@ -11435,6 +11458,14 @@ client.chat.messages.replies_list(
+**order_by:** `typing.Optional[MessagesRepliesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + +
+
+ +
+
+ **page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -27124,8 +27155,8 @@ client.filestorage.webhook_receivers.create(
-## Hris AccountDetails -
client.hris.account_details.retrieve() +## Knowledgebase AccountDetails +
client.knowledgebase.account_details.retrieve()
@@ -27158,7 +27189,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.account_details.retrieve() +client.knowledgebase.account_details.retrieve() ```
@@ -27186,8 +27217,8 @@ client.hris.account_details.retrieve()
-## Hris AccountToken -
client.hris.account_token.retrieve(...) +## Knowledgebase AccountToken +
client.knowledgebase.account_token.retrieve(...)
@@ -27220,7 +27251,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.account_token.retrieve( +client.knowledgebase.account_token.retrieve( public_token="public_token", ) @@ -27258,8 +27289,8 @@ client.hris.account_token.retrieve(
-## Hris AsyncPassthrough -
client.hris.async_passthrough.create(...) +## Knowledgebase Articles +
client.knowledgebase.articles.list(...)
@@ -27271,7 +27302,7 @@ client.hris.account_token.retrieve(
-Asynchronously pull data from an endpoint not currently supported by Merge. +Returns a list of `Article` objects.
@@ -27286,18 +27317,43 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```python +import datetime + from merge import Merge -from merge.resources.hris import DataPassthroughRequest, MethodEnum +from merge.resources.knowledgebase.resources.articles import ( + ArticlesListRequestExpand, + ArticlesListRequestType, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.async_passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", +client.knowledgebase.articles.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ArticlesListRequestExpand.ATTACHMENTS, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", ), + page_size=1, + parent_article_id="parent_article_id", + parent_container_id="parent_container_id", + remote_id="remote_id", + root_container_id="root_container_id", + status="status", + type=ArticlesListRequestType.EMPTY, ) ``` @@ -27314,7 +27370,7 @@ client.hris.async_passthrough.create(
-**request:** `DataPassthroughRequest` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -27322,70 +27378,119 @@ client.hris.async_passthrough.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. +
+
+
+**expand:** `typing.Optional[ArticlesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
-
-
client.hris.async_passthrough.retrieve(...)
-#### 📝 Description +**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. + +
+
+
-Retrieves data from earlier async-passthrough POST request +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). +
+ +
+
+ +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
-#### 🔌 Usage +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+
-```python -from merge import Merge +**parent_article_id:** `typing.Optional[str]` — If provided, will only return sub articles of the parent_article_id. + +
+
-client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.async_passthrough.retrieve( - async_passthrough_receipt_id="async_passthrough_receipt_id", -) +
+
-``` +**parent_container_id:** `typing.Optional[str]` — If provided, will only return sub articles of the parent_container_id. +
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +
-#### ⚙️ Parameters +
+
+ +**root_container_id:** `typing.Optional[str]` — If provided, will only return sub articles of the root_container_id. + +
+
+**status:** `typing.Optional[str]` — If provided, will only return articles of the given status; multiple statuses can be separated by commas. + +
+
+
-**async_passthrough_receipt_id:** `str` +**type:** `typing.Optional[ArticlesListRequestType]` — If provided, will only return articles of the given type.
@@ -27405,8 +27510,7 @@ client.hris.async_passthrough.retrieve(
-## Hris AuditTrail -
client.hris.audit_trail.list(...) +
client.knowledgebase.articles.retrieve(...)
@@ -27418,7 +27522,7 @@ client.hris.async_passthrough.retrieve(
-Gets a list of audit trail events. +Returns an `Article` object with the given `id`.
@@ -27434,18 +27538,19 @@ Gets a list of audit trail events. ```python from merge import Merge +from merge.resources.knowledgebase.resources.articles import ( + ArticlesRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.audit_trail.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - event_type="event_type", - page_size=1, - start_date="start_date", - user_email="user_email", +client.knowledgebase.articles.retrieve( + id="id", + expand=ArticlesRetrieveRequestExpand.ATTACHMENTS, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -27462,23 +27567,7 @@ client.hris.audit_trail.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time - -
-
- -
-
- -**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` +**id:** `str`
@@ -27486,7 +27575,7 @@ client.hris.audit_trail.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**expand:** `typing.Optional[ArticlesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -27494,7 +27583,7 @@ client.hris.audit_trail.list(
-**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -27502,7 +27591,7 @@ client.hris.audit_trail.list(
-**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. +**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).
@@ -27522,8 +27611,8 @@ client.hris.audit_trail.list(
-## Hris AvailableActions -
client.hris.available_actions.retrieve() +## Knowledgebase AsyncPassthrough +
client.knowledgebase.async_passthrough.create(...)
@@ -27535,7 +27624,7 @@ client.hris.audit_trail.list(
-Returns a list of models and actions available for an account. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -27551,12 +27640,18 @@ Returns a list of models and actions available for an account. ```python from merge import Merge +from merge.resources.knowledgebase import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.available_actions.retrieve() +client.knowledgebase.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), +) ``` @@ -27572,6 +27667,14 @@ client.hris.available_actions.retrieve()
+**request:** `DataPassthroughRequest` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -27584,8 +27687,7 @@ client.hris.available_actions.retrieve()
-## Hris BankInfo -
client.hris.bank_info.list(...) +
client.knowledgebase.async_passthrough.retrieve(...)
@@ -27597,7 +27699,7 @@ client.hris.available_actions.retrieve()
-Returns a list of `BankInfo` objects. +Retrieves data from earlier async-passthrough POST request
@@ -27612,41 +27714,14 @@ Returns a list of `BankInfo` objects.
```python -import datetime - from merge import Merge -from merge.resources.hris.resources.bank_info import ( - BankInfoListRequestAccountType, - BankInfoListRequestOrderBy, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.bank_info.list( - account_type=BankInfoListRequestAccountType.CHECKING, - bank_name="bank_name", - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - employee_id="employee_id", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - order_by=BankInfoListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, - page_size=1, - remote_id="remote_id", +client.knowledgebase.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", ) ``` @@ -27663,12 +27738,7 @@ client.hris.bank_info.list(
-**account_type:** `typing.Optional[BankInfoListRequestAccountType]` - -If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING') - -* `SAVINGS` - SAVINGS -* `CHECKING` - CHECKING +**async_passthrough_receipt_id:** `str`
@@ -27676,55 +27746,90 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**bank_name:** `typing.Optional[str]` — If provided, will only return BankInfo's with this bank name. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. -
+
+## Knowledgebase Attachments +
client.knowledgebase.attachments.list(...)
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
+#### 📝 Description
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
-
-**employee_id:** `typing.Optional[str]` — If provided, will only return bank accounts for this employee. - +Returns a list of `Attachment` objects. +
+
+#### 🔌 Usage +
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - +
+
+ +```python +import datetime + +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.attachments.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) + +``` +
+
+#### ⚙️ Parameters +
-**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/). +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -27732,7 +27837,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -27740,7 +27845,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**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). +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -27748,7 +27853,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**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/).
@@ -27756,7 +27861,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -27764,7 +27869,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**order_by:** `typing.Optional[BankInfoListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. +**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).
@@ -27772,7 +27877,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -27780,7 +27885,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` — Deprecated. Use show_enum_origins. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -27788,7 +27893,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -27796,7 +27901,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-**show_enum_origins:** `typing.Optional[typing.Literal["account_type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -27816,7 +27921,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-
client.hris.bank_info.retrieve(...) +
client.knowledgebase.attachments.retrieve(...)
@@ -27828,7 +27933,7 @@ If provided, will only return BankInfo's with this account type. Options: ('SAVI
-Returns a `BankInfo` object with the given `id`. +Returns an `Attachment` object with the given `id`.
@@ -27849,7 +27954,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.bank_info.retrieve( +client.knowledgebase.attachments.retrieve( id="id", include_remote_data=True, include_shell_data=True, @@ -27877,14 +27982,6 @@ client.hris.bank_info.retrieve(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -27901,22 +27998,6 @@ client.hris.bank_info.retrieve(
-**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` — Deprecated. Use show_enum_origins. - -
-
- -
-
- -**show_enum_origins:** `typing.Optional[typing.Literal["account_type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -27929,8 +28010,8 @@ client.hris.bank_info.retrieve(
-## Hris Benefits -
client.hris.benefits.list(...) +## Knowledgebase AuditTrail +
client.knowledgebase.audit_trail.list(...)
@@ -27942,7 +28023,7 @@ client.hris.bank_info.retrieve(
-Returns a list of `Benefit` objects. +Gets a list of audit trail events.
@@ -27957,34 +28038,19 @@ Returns a list of `Benefit` objects.
```python -import datetime - from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.benefits.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), +client.knowledgebase.audit_trail.list( cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - employee_id="employee_id", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), + end_date="end_date", + event_type="event_type", page_size=1, - remote_id="remote_id", + start_date="start_date", + user_email="user_email", ) ``` @@ -28001,22 +28067,6 @@ client.hris.benefits.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- **cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -28025,39 +28075,7 @@ client.hris.benefits.list(
-**employee_id:** `typing.Optional[str]` — If provided, will return the benefits associated with the employee. - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — 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). +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time
@@ -28065,7 +28083,7 @@ client.hris.benefits.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
@@ -28073,7 +28091,7 @@ client.hris.benefits.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -28081,7 +28099,7 @@ client.hris.benefits.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time
@@ -28089,7 +28107,7 @@ client.hris.benefits.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
@@ -28109,7 +28127,8 @@ client.hris.benefits.list(
-
client.hris.benefits.retrieve(...) +## Knowledgebase AvailableActions +
client.knowledgebase.available_actions.retrieve()
@@ -28121,7 +28140,7 @@ client.hris.benefits.list(
-Returns a `Benefit` object with the given `id`. +Returns a list of models and actions available for an account.
@@ -28142,11 +28161,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.benefits.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, -) +client.knowledgebase.available_actions.retrieve() ``` @@ -28162,56 +28177,24 @@ client.hris.benefits.retrieve(
-**id:** `str` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. -
-
-
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. -
+
+## Knowledgebase Containers +
client.knowledgebase.containers.list(...)
-**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. - -
-
- - - - - - -
- -## Hris Companies -
client.hris.companies.list(...) -
-
- -#### 📝 Description +#### 📝 Description
@@ -28219,7 +28202,7 @@ client.hris.benefits.retrieve(
-Returns a list of `Company` objects. +Returns a list of `Container` objects.
@@ -28237,12 +28220,16 @@ Returns a list of `Company` objects. import datetime from merge import Merge +from merge.resources.knowledgebase.resources.containers import ( + ContainersListRequestExpand, + ContainersListRequestType, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.companies.list( +client.knowledgebase.containers.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -28250,6 +28237,7 @@ client.hris.companies.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + expand=ContainersListRequestExpand.PARENT_ARTICLE, include_deleted_data=True, include_remote_data=True, include_shell_data=True, @@ -28260,7 +28248,10 @@ client.hris.companies.list( "2024-01-15 09:30:00+00:00", ), page_size=1, + parent_article_id="parent_article_id", + parent_container_id="parent_container_id", remote_id="remote_id", + type=ContainersListRequestType.EMPTY, ) ``` @@ -28301,6 +28292,14 @@ client.hris.companies.list(
+**expand:** `typing.Optional[ContainersListRequestExpand]` — 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/).
@@ -28349,6 +28348,22 @@ client.hris.companies.list(
+**parent_article_id:** `typing.Optional[str]` — If provided, will only return sub containers of the parent_article_id. + +
+
+ +
+
+ +**parent_container_id:** `typing.Optional[str]` — If provided, will only return sub containers of the parent_container_id. + +
+
+ +
+
+ **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -28357,6 +28372,14 @@ client.hris.companies.list(
+**type:** `typing.Optional[ContainersListRequestType]` — If provided, will only return containers of the given type. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -28369,7 +28392,7 @@ client.hris.companies.list(
-
client.hris.companies.retrieve(...) +
client.knowledgebase.containers.retrieve(...)
@@ -28381,7 +28404,7 @@ client.hris.companies.list(
-Returns a `Company` object with the given `id`. +Returns a `Container` object with the given `id`.
@@ -28397,13 +28420,17 @@ Returns a `Company` object with the given `id`. ```python from merge import Merge +from merge.resources.knowledgebase.resources.containers import ( + ContainersRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.companies.retrieve( +client.knowledgebase.containers.retrieve( id="id", + expand=ContainersRetrieveRequestExpand.PARENT_ARTICLE, include_remote_data=True, include_shell_data=True, ) @@ -28430,6 +28457,14 @@ client.hris.companies.retrieve(
+**expand:** `typing.Optional[ContainersRetrieveRequestExpand]` — 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.
@@ -28458,8 +28493,8 @@ client.hris.companies.retrieve(
-## Hris Scopes -
client.hris.scopes.default_scopes_retrieve() +## Knowledgebase Scopes +
client.knowledgebase.scopes.default_scopes_retrieve()
@@ -28492,7 +28527,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.scopes.default_scopes_retrieve() +client.knowledgebase.scopes.default_scopes_retrieve() ```
@@ -28520,7 +28555,7 @@ client.hris.scopes.default_scopes_retrieve()
-
client.hris.scopes.linked_account_scopes_retrieve() +
client.knowledgebase.scopes.linked_account_scopes_retrieve()
@@ -28553,7 +28588,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.scopes.linked_account_scopes_retrieve() +client.knowledgebase.scopes.linked_account_scopes_retrieve() ```
@@ -28581,7 +28616,7 @@ client.hris.scopes.linked_account_scopes_retrieve()
-
client.hris.scopes.linked_account_scopes_create(...) +
client.knowledgebase.scopes.linked_account_scopes_create(...)
@@ -28609,7 +28644,7 @@ Update permissions for any Common Model or field for a single Linked Account. An ```python from merge import Merge -from merge.resources.hris import ( +from merge.resources.knowledgebase import ( FieldPermissionDeserializerRequest, IndividualCommonModelScopeDeserializerRequest, ModelPermissionDeserializerRequest, @@ -28619,7 +28654,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.scopes.linked_account_scopes_create( +client.knowledgebase.scopes.linked_account_scopes_create( common_models=[ IndividualCommonModelScopeDeserializerRequest( model_name="Employee", @@ -28681,8 +28716,8 @@ client.hris.scopes.linked_account_scopes_create(
-## Hris DeleteAccount -
client.hris.delete_account.delete() +## Knowledgebase DeleteAccount +
client.knowledgebase.delete_account.delete()
@@ -28715,7 +28750,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.delete_account.delete() +client.knowledgebase.delete_account.delete() ```
@@ -28743,8 +28778,8 @@ client.hris.delete_account.delete()
-## Hris Dependents -
client.hris.dependents.list(...) +## Knowledgebase FieldMapping +
client.knowledgebase.field_mapping.field_mappings_retrieve(...)
@@ -28756,7 +28791,7 @@ client.hris.delete_account.delete()
-Returns a list of `Dependent` objects. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -28771,35 +28806,14 @@ Returns a list of `Dependent` objects.
```python -import datetime - from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.dependents.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - employee_id="employee_id", - include_deleted_data=True, - include_remote_data=True, - include_sensitive_fields=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", +client.knowledgebase.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, ) ``` @@ -28816,7 +28830,7 @@ client.hris.dependents.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations.
@@ -28824,31 +28838,76 @@ client.hris.dependents.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + + + +
+
client.knowledgebase.field_mapping.field_mappings_create(...)
-**cursor:** `typing.Optional[str]` — The pagination cursor value. - +#### 📝 Description + +
+
+ +
+
+ +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+ +#### 🔌 Usage
-**employee_id:** `typing.Optional[str]` — If provided, will only return dependents for this employee. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", +) + +``` +
+
+#### ⚙️ Parameters +
-**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/). +
+
+ +**target_field_name:** `str` — The name of the target field you want this remote field to map to.
@@ -28856,7 +28915,7 @@ client.hris.dependents.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**target_field_description:** `str` — The description of the target field you want this remote field to map to.
@@ -28864,7 +28923,7 @@ client.hris.dependents.list(
-**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. +**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -28872,7 +28931,7 @@ client.hris.dependents.list(
-**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). +**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from.
@@ -28880,7 +28939,7 @@ client.hris.dependents.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from.
@@ -28888,7 +28947,7 @@ client.hris.dependents.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category.
@@ -28896,7 +28955,7 @@ client.hris.dependents.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations.
@@ -28904,7 +28963,7 @@ client.hris.dependents.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -28924,7 +28983,7 @@ client.hris.dependents.list(
-
client.hris.dependents.retrieve(...) +
client.knowledgebase.field_mapping.field_mappings_destroy(...)
@@ -28936,7 +28995,7 @@ client.hris.dependents.list(
-Returns a `Dependent` object with the given `id`. +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -28957,11 +29016,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.dependents.retrieve( - id="id", - include_remote_data=True, - include_sensitive_fields=True, - include_shell_data=True, +client.knowledgebase.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", ) ``` @@ -28978,31 +29034,7 @@ client.hris.dependents.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_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. - -
-
- -
-
- -**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). +**field_mapping_id:** `str`
@@ -29022,8 +29054,7 @@ client.hris.dependents.retrieve(
-## Hris EmployeePayrollRuns -
client.hris.employee_payroll_runs.list(...) +
client.knowledgebase.field_mapping.field_mappings_partial_update(...)
@@ -29035,7 +29066,7 @@ client.hris.dependents.retrieve(
-Returns a list of `EmployeePayrollRun` objects. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -29050,51 +29081,14 @@ Returns a list of `EmployeePayrollRun` objects.
```python -import datetime - from merge import Merge -from merge.resources.hris.resources.employee_payroll_runs import ( - EmployeePayrollRunsListRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employee_payroll_runs.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - employee_id="employee_id", - ended_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - ended_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - expand=EmployeePayrollRunsListRequestExpand.EMPLOYEE, - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - payroll_run_id="payroll_run_id", - remote_id="remote_id", - started_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - started_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), +client.knowledgebase.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", ) ``` @@ -29111,7 +29105,7 @@ client.hris.employee_payroll_runs.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**field_mapping_id:** `str`
@@ -29119,7 +29113,7 @@ client.hris.employee_payroll_runs.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -29127,7 +29121,7 @@ client.hris.employee_payroll_runs.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from.
@@ -29135,7 +29129,7 @@ client.hris.employee_payroll_runs.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return employee payroll runs for this employee. +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from.
@@ -29143,7 +29137,7 @@ client.hris.employee_payroll_runs.list(
-**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs ended after this datetime. +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -29151,87 +29145,71 @@ client.hris.employee_payroll_runs.list(
-**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs ended before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**expand:** `typing.Optional[EmployeePayrollRunsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. -
-
-
-**include_deleted_data:** `typing.Optional[bool]` — 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/). -
+
+
client.knowledgebase.field_mapping.remote_fields_retrieve(...)
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
+#### 📝 Description
-**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
-
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. -
+#### 🔌 Usage +
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. - -
-
-
-**payroll_run_id:** `typing.Optional[str]` — If provided, will only return employee payroll runs for this employee. - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", +) + +``` +
+
+#### ⚙️ Parameters +
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
-
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs started after this datetime. +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
@@ -29239,7 +29217,7 @@ client.hris.employee_payroll_runs.list(
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs started before this datetime. +**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
@@ -29259,7 +29237,7 @@ client.hris.employee_payroll_runs.list(
-
client.hris.employee_payroll_runs.retrieve(...) +
client.knowledgebase.field_mapping.target_fields_retrieve()
@@ -29271,7 +29249,7 @@ client.hris.employee_payroll_runs.list(
-Returns an `EmployeePayrollRun` object with the given `id`. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -29287,20 +29265,12 @@ Returns an `EmployeePayrollRun` object with the given `id`. ```python from merge import Merge -from merge.resources.hris.resources.employee_payroll_runs import ( - EmployeePayrollRunsRetrieveRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employee_payroll_runs.retrieve( - id="id", - expand=EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE, - include_remote_data=True, - include_shell_data=True, -) +client.knowledgebase.field_mapping.target_fields_retrieve() ``` @@ -29316,31 +29286,71 @@ client.hris.employee_payroll_runs.retrieve(
-**id:** `str` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+## Knowledgebase GenerateKey +
client.knowledgebase.generate_key.create(...)
-**expand:** `typing.Optional[EmployeePayrollRunsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. +
+
+#### 🔌 Usage +
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.generate_key.create( + name="Remote Deployment Key 1", +) + +```
+
+
+ +#### ⚙️ Parameters
-**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). +
+
+ +**name:** `str` — The name of the remote key
@@ -29360,8 +29370,8 @@ client.hris.employee_payroll_runs.retrieve(
-## Hris Employees -
client.hris.employees.list(...) +## Knowledgebase Groups +
client.knowledgebase.groups.list(...)
@@ -29373,7 +29383,7 @@ client.hris.employee_payroll_runs.retrieve(
-Returns a list of `Employee` objects. +Returns a list of `Group` objects.
@@ -29391,19 +29401,15 @@ Returns a list of `Employee` objects. import datetime from merge import Merge -from merge.resources.hris.resources.employees import ( - EmployeesListRequestEmploymentStatus, - EmployeesListRequestExpand, - EmployeesListRequestRemoteFields, - EmployeesListRequestShowEnumOrigins, +from merge.resources.knowledgebase.resources.groups import ( + GroupsListRequestExpand, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.list( - company_id="company_id", +client.knowledgebase.groups.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -29411,21 +29417,10 @@ client.hris.employees.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - display_full_name="display_full_name", - employee_number="employee_number", - employment_status=EmployeesListRequestEmploymentStatus.ACTIVE, - employment_type="employment_type", - expand=EmployeesListRequestExpand.COMPANY, - first_name="first_name", - groups="groups", - home_location_id="home_location_id", + expand=GroupsListRequestExpand.PARENT_GROUP, include_deleted_data=True, include_remote_data=True, - include_sensitive_fields=True, include_shell_data=True, - job_title="job_title", - last_name="last_name", - manager_id="manager_id", modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -29433,26 +29428,7 @@ client.hris.employees.list( "2024-01-15 09:30:00+00:00", ), page_size=1, - pay_group_id="pay_group_id", - personal_email="personal_email", - remote_fields=EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS, remote_id="remote_id", - show_enum_origins=EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS, - started_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - started_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - team_id="team_id", - terminated_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - terminated_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - work_email="work_email", - work_location_id="work_location_id", ) ``` @@ -29469,7 +29445,7 @@ client.hris.employees.list(
-**company_id:** `typing.Optional[str]` — If provided, will only return employees for this company. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -29477,7 +29453,7 @@ client.hris.employees.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -29485,7 +29461,7 @@ client.hris.employees.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -29493,7 +29469,7 @@ client.hris.employees.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**expand:** `typing.Optional[GroupsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -29501,7 +29477,7 @@ client.hris.employees.list(
-**display_full_name:** `typing.Optional[str]` — If provided, will only return employees with this display name. +**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/).
@@ -29509,7 +29485,7 @@ client.hris.employees.list(
-**employee_number:** `typing.Optional[str]` — If provided, will only return employees with this employee number. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -29517,13 +29493,7 @@ client.hris.employees.list(
-**employment_status:** `typing.Optional[EmployeesListRequestEmploymentStatus]` - -If provided, will only return employees with this employment status. - -* `ACTIVE` - ACTIVE -* `PENDING` - PENDING -* `INACTIVE` - INACTIVE +**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).
@@ -29531,7 +29501,7 @@ If provided, will only return employees with this employment status.
-**employment_type:** `typing.Optional[str]` — If provided, will only return employees that have an employment of the specified employment type. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -29539,7 +29509,7 @@ If provided, will only return employees with this employment status.
-**expand:** `typing.Optional[EmployeesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -29547,7 +29517,7 @@ If provided, will only return employees with this employment status.
-**first_name:** `typing.Optional[str]` — If provided, will only return employees with this first name. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -29555,7 +29525,7 @@ If provided, will only return employees with this employment status.
-**groups:** `typing.Optional[str]` — If provided, will only return employees matching the group ids; multiple groups can be separated by commas. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -29563,31 +29533,76 @@ If provided, will only return employees with this employment status.
-**home_location_id:** `typing.Optional[str]` — If provided, will only return employees for this home location. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.knowledgebase.groups.retrieve(...)
-**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/). - +#### 📝 Description + +
+
+ +
+
+ +Returns a `Group` object with the given `id`. +
+
+#### 🔌 Usage +
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - +
+
+ +```python +from merge import Merge +from merge.resources.knowledgebase.resources.groups import ( + GroupsRetrieveRequestExpand, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.groups.retrieve( + id="id", + expand=GroupsRetrieveRequestExpand.PARENT_GROUP, + include_remote_data=True, + include_shell_data=True, +) + +``` +
+
+#### ⚙️ Parameters +
-**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. +
+
+ +**id:** `str`
@@ -29595,7 +29610,7 @@ If provided, will only return employees with this employment status.
-**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). +**expand:** `typing.Optional[GroupsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -29603,7 +29618,7 @@ If provided, will only return employees with this employment status.
-**job_title:** `typing.Optional[str]` — If provided, will only return employees that have an employment of the specified job title. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -29611,7 +29626,7 @@ If provided, will only return employees with this employment status.
-**last_name:** `typing.Optional[str]` — If provided, will only return employees with this last name. +**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).
@@ -29619,23 +29634,97 @@ If provided, will only return employees with this employment status.
-**manager_id:** `typing.Optional[str]` — If provided, will only return employees for this manager. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+## Knowledgebase Issues +
client.knowledgebase.issues.list(...)
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. +
+
+#### 🔌 Usage +
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +
+
+ +```python +import datetime + +from merge import Merge +from merge.resources.knowledgebase.resources.issues import ( + IssuesListRequestStatus, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_token:** `typing.Optional[str]`
@@ -29643,7 +29732,7 @@ If provided, will only return employees with this employment status.
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -29651,7 +29740,7 @@ If provided, will only return employees with this employment status.
-**pay_group_id:** `typing.Optional[str]` — If provided, will only return employees for this pay group +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time
@@ -29659,7 +29748,7 @@ If provided, will only return employees with this employment status.
-**personal_email:** `typing.Optional[str]` — If provided, will only return Employees with this personal email +**end_user_organization_name:** `typing.Optional[str]`
@@ -29667,7 +29756,7 @@ If provided, will only return employees with this employment status.
-**remote_fields:** `typing.Optional[EmployeesListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime.
@@ -29675,7 +29764,7 @@ If provided, will only return employees with this employment status.
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime.
@@ -29683,7 +29772,7 @@ If provided, will only return employees with this employment status.
-**show_enum_origins:** `typing.Optional[EmployeesListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**include_muted:** `typing.Optional[str]` — If true, will include muted issues
@@ -29691,7 +29780,7 @@ If provided, will only return employees with this employment status.
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that started after this datetime. +**integration_name:** `typing.Optional[str]`
@@ -29699,7 +29788,7 @@ If provided, will only return employees with this employment status.
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return employees that started before this datetime. +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime.
@@ -29707,7 +29796,7 @@ If provided, will only return employees with this employment status.
-**team_id:** `typing.Optional[str]` — If provided, will only return employees for this team. +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime.
@@ -29715,7 +29804,7 @@ If provided, will only return employees with this employment status.
-**terminated_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that were terminated after this datetime. +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in.
@@ -29723,7 +29812,7 @@ If provided, will only return employees with this employment status.
-**terminated_before:** `typing.Optional[dt.datetime]` — If provided, will only return employees that were terminated before this datetime. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -29731,7 +29820,7 @@ If provided, will only return employees with this employment status.
-**work_email:** `typing.Optional[str]` — If provided, will only return Employees with this work email +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time
@@ -29739,7 +29828,12 @@ If provided, will only return employees with this employment status.
-**work_location_id:** `typing.Optional[str]` — If provided, will only return employees for this location. +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED
@@ -29759,7 +29853,7 @@ If provided, will only return employees with this employment status.
-
client.hris.employees.create(...) +
client.knowledgebase.issues.retrieve(...)
@@ -29771,7 +29865,7 @@ If provided, will only return employees with this employment status.
-Creates an `Employee` object with the given values. +Get a specific issue.
@@ -29787,16 +29881,13 @@ Creates an `Employee` object with the given values. ```python from merge import Merge -from merge.resources.hris import EmployeeRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.create( - is_debug_mode=True, - run_async=True, - model=EmployeeRequest(), +client.knowledgebase.issues.retrieve( + id="id", ) ``` @@ -29813,23 +29904,7 @@ client.hris.employees.create(
-**model:** `EmployeeRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. - -
-
- -
-
- -**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**id:** `str`
@@ -29849,7 +29924,8 @@ client.hris.employees.create(
-
client.hris.employees.retrieve(...) +## Knowledgebase LinkToken +
client.knowledgebase.link_token.create(...)
@@ -29861,7 +29937,7 @@ client.hris.employees.create(
-Returns an `Employee` object with the given `id`. +Creates a link token to be used when linking a new end user.
@@ -29877,24 +29953,17 @@ Returns an `Employee` object with the given `id`. ```python from merge import Merge -from merge.resources.hris.resources.employees import ( - EmployeesRetrieveRequestExpand, - EmployeesRetrieveRequestRemoteFields, - EmployeesRetrieveRequestShowEnumOrigins, -) +from merge.resources.knowledgebase import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.retrieve( - id="id", - expand=EmployeesRetrieveRequestExpand.COMPANY, - include_remote_data=True, - include_sensitive_fields=True, - include_shell_data=True, - remote_fields=EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS, - show_enum_origins=EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS, +client.knowledgebase.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -29911,7 +29980,7 @@ client.hris.employees.retrieve(
-**id:** `str` +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -29919,7 +29988,7 @@ client.hris.employees.retrieve(
-**expand:** `typing.Optional[EmployeesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**end_user_organization_name:** `str` — Your end user's organization.
@@ -29927,7 +29996,7 @@ client.hris.employees.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
@@ -29935,7 +30004,7 @@ client.hris.employees.retrieve(
-**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link.
@@ -29943,7 +30012,7 @@ client.hris.employees.retrieve(
-**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). +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
@@ -29951,7 +30020,7 @@ client.hris.employees.retrieve(
-**remote_fields:** `typing.Optional[EmployeesRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
@@ -29959,7 +30028,7 @@ client.hris.employees.retrieve(
-**show_enum_origins:** `typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -29967,72 +30036,51 @@ client.hris.employees.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
- -
+
+
+**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. +
-
-
client.hris.employees.ignore_create(...)
-#### 📝 Description - -
-
- -
-
- -Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. -
-
+**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. +
-#### 🔌 Usage -
-
-
- -```python -from merge import Merge -from merge.resources.hris import ReasonEnum +**language:** `typing.Optional[EndUserDetailsRequestLanguage]` -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.employees.ignore_create( - model_id="model_id", - reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, -) +The following subset of IETF language tags can be used to configure localization. -``` -
-
+* `en` - en +* `de` - de +
-#### ⚙️ Parameters -
-
-
- -**model_id:** `str` +**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled.
@@ -30040,7 +30088,7 @@ client.hris.employees.ignore_create(
-**reason:** `IgnoreCommonModelRequestReason` +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options.
@@ -30048,7 +30096,11 @@ client.hris.employees.ignore_create(
-**message:** `typing.Optional[str]` +**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` + +When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. + +* `SELECTIVE_SYNC` - SELECTIVE_SYNC
@@ -30068,7 +30120,8 @@ client.hris.employees.ignore_create(
-
client.hris.employees.meta_post_retrieve() +## Knowledgebase LinkedAccounts +
client.knowledgebase.linked_accounts.list(...)
@@ -30080,7 +30133,7 @@ client.hris.employees.ignore_create(
-Returns metadata for `Employee` POSTs. +List linked accounts for your organization.
@@ -30096,12 +30149,29 @@ Returns metadata for `Employee` POSTs. ```python from merge import Merge +from merge.resources.knowledgebase.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employees.meta_post_retrieve() +client.knowledgebase.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", + page_size=1, + status="status", +) ``` @@ -30117,90 +30187,42 @@ client.hris.employees.meta_post_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
- -
+**category:** `typing.Optional[LinkedAccountsListRequestCategory]` +Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage +* `knowledgebase` - knowledgebase + -
- -## Hris EmployerBenefits -
client.hris.employer_benefits.list(...) -
-
- -#### 📝 Description - -
-
-Returns a list of `EmployerBenefit` objects. -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-#### 🔌 Usage -
-
-
- -```python -import datetime - -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.employer_benefits.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", -) - -``` -
-
+**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. +
-#### ⚙️ Parameters -
-
-
- -**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name.
@@ -30208,7 +30230,7 @@ client.hris.employer_benefits.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID.
@@ -30216,7 +30238,7 @@ client.hris.employer_benefits.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
@@ -30224,7 +30246,7 @@ client.hris.employer_benefits.list(
-**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/). +**id:** `typing.Optional[str]`
@@ -30232,7 +30254,7 @@ client.hris.employer_benefits.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.
@@ -30240,7 +30262,7 @@ client.hris.employer_benefits.list(
-**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). +**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account.
@@ -30248,7 +30270,7 @@ client.hris.employer_benefits.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name.
@@ -30256,7 +30278,7 @@ client.hris.employer_benefits.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts.
@@ -30272,7 +30294,7 @@ client.hris.employer_benefits.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED`
@@ -30292,7 +30314,8 @@ client.hris.employer_benefits.list(
-
client.hris.employer_benefits.retrieve(...) +## Knowledgebase Passthrough +
client.knowledgebase.passthrough.create(...)
@@ -30304,7 +30327,7 @@ client.hris.employer_benefits.list(
-Returns an `EmployerBenefit` object with the given `id`. +Pull data from an endpoint not currently supported by Merge.
@@ -30320,15 +30343,17 @@ Returns an `EmployerBenefit` object with the given `id`. ```python from merge import Merge +from merge.resources.knowledgebase import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employer_benefits.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, +client.knowledgebase.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), ) ``` @@ -30345,23 +30370,7 @@ client.hris.employer_benefits.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`
@@ -30381,8 +30390,8 @@ client.hris.employer_benefits.retrieve(
-## Hris Employments -
client.hris.employments.list(...) +## Knowledgebase RegenerateKey +
client.knowledgebase.regenerate_key.create(...)
@@ -30394,7 +30403,7 @@ client.hris.employer_benefits.retrieve(
-Returns a list of `Employment` objects. +Exchange remote keys.
@@ -30409,44 +30418,14 @@ Returns a list of `Employment` objects.
```python -import datetime - from merge import Merge -from merge.resources.hris.resources.employments import ( - EmploymentsListRequestExpand, - EmploymentsListRequestOrderBy, - EmploymentsListRequestRemoteFields, - EmploymentsListRequestShowEnumOrigins, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employments.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - employee_id="employee_id", - expand=EmploymentsListRequestExpand.EMPLOYEE, - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - order_by=EmploymentsListRequestOrderBy.EFFECTIVE_DATE_DESCENDING, - page_size=1, - remote_fields=EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE, - remote_id="remote_id", - show_enum_origins=EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE, +client.knowledgebase.regenerate_key.create( + name="Remote Deployment Key 1", ) ``` @@ -30463,7 +30442,7 @@ client.hris.employments.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**name:** `str` — The name of the remote key
@@ -30471,63 +30450,72 @@ client.hris.employments.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**cursor:** `typing.Optional[str]` — The pagination cursor value. -
+
+## Knowledgebase SyncStatus +
client.knowledgebase.sync_status.list(...)
-**employee_id:** `typing.Optional[str]` — If provided, will only return employments for this employee. - -
-
+#### 📝 Description
-**expand:** `typing.Optional[EmploymentsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
-
-**include_deleted_data:** `typing.Optional[bool]` — 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/). - +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+ + + +#### 🔌 Usage
-**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). - +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, +) + +```
+ + + +#### ⚙️ Parameters
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -30535,7 +30523,7 @@ client.hris.employments.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -30543,42 +30531,64 @@ client.hris.employments.list(
-**order_by:** `typing.Optional[EmploymentsListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. -
+
+## Knowledgebase ForceResync +
client.knowledgebase.force_resync.sync_status_resync_create()
-**remote_fields:** `typing.Optional[EmploymentsListRequestRemoteFields]` — Deprecated. Use show_enum_origins. - -
-
+#### 📝 Description
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - +
+
+ +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +
+
+#### 🔌 Usage +
-**show_enum_origins:** `typing.Optional[EmploymentsListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.force_resync.sync_status_resync_create() + +```
+
+
+ +#### ⚙️ Parameters + +
+
@@ -30595,7 +30605,8 @@ client.hris.employments.list(
-
client.hris.employments.retrieve(...) +## Knowledgebase Users +
client.knowledgebase.users.list(...)
@@ -30607,7 +30618,7 @@ client.hris.employments.list(
-Returns an `Employment` object with the given `id`. +Returns a list of `User` objects.
@@ -30622,24 +30633,33 @@ Returns an `Employment` object with the given `id`.
```python +import datetime + from merge import Merge -from merge.resources.hris.resources.employments import ( - EmploymentsRetrieveRequestExpand, - EmploymentsRetrieveRequestRemoteFields, - EmploymentsRetrieveRequestShowEnumOrigins, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.employments.retrieve( - id="id", - expand=EmploymentsRetrieveRequestExpand.EMPLOYEE, +client.knowledgebase.users.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, include_remote_data=True, include_shell_data=True, - remote_fields=EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE, - show_enum_origins=EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -30656,7 +30676,7 @@ client.hris.employments.retrieve(
-**id:** `str` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -30664,7 +30684,23 @@ client.hris.employments.retrieve(
-**expand:** `typing.Optional[EmploymentsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
@@ -30688,7 +30724,7 @@ client.hris.employments.retrieve(
-**remote_fields:** `typing.Optional[EmploymentsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -30696,7 +30732,23 @@ client.hris.employments.retrieve(
-**show_enum_origins:** `typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -30716,8 +30768,7 @@ client.hris.employments.retrieve(
-## Hris FieldMapping -
client.hris.field_mapping.field_mappings_retrieve(...) +
client.knowledgebase.users.retrieve(...)
@@ -30729,7 +30780,7 @@ client.hris.employments.retrieve(
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Returns a `User` object with the given `id`.
@@ -30750,8 +30801,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.field_mappings_retrieve( - exclude_remote_field_metadata=True, +client.knowledgebase.users.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -30768,7 +30821,23 @@ client.hris.field_mapping.field_mappings_retrieve(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**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).
@@ -30788,7 +30857,8 @@ client.hris.field_mapping.field_mappings_retrieve(
-
client.hris.field_mapping.field_mappings_create(...) +## Knowledgebase WebhookReceivers +
client.knowledgebase.webhook_receivers.list()
@@ -30800,7 +30870,7 @@ client.hris.field_mapping.field_mappings_retrieve(
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of `WebhookReceiver` objects.
@@ -30821,15 +30891,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.field_mappings_create( - exclude_remote_field_metadata=True, - target_field_name="example_target_field_name", - target_field_description="this is a example description of the target field", - remote_field_traversal_path=["example_remote_field"], - remote_method="GET", - remote_url_path="/example-url-path", - common_model_name="ExampleCommonModel", -) +client.knowledgebase.webhook_receivers.list() ``` @@ -30845,63 +30907,87 @@ client.hris.field_mapping.field_mappings_create(
-**target_field_name:** `str` — The name of the target field you want this remote field to map to. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**target_field_description:** `str` — The description of the target field you want this remote field to map to. -
-
-
-**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. -
+
+
client.knowledgebase.webhook_receivers.create(...)
-**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. - -
-
+#### 📝 Description
-**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. - -
-
-
-**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. - +Creates a `WebhookReceiver` object with the given values.
- -
-
- -**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. -
+#### 🔌 Usage +
-**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.knowledgebase.webhook_receivers.create( + event="event", + is_active=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**event:** `str` + +
+
+ +
+
+ +**is_active:** `bool` + +
+
+ +
+
+ +**key:** `typing.Optional[str]`
@@ -30921,7 +31007,8 @@ client.hris.field_mapping.field_mappings_create(
-
client.hris.field_mapping.field_mappings_destroy(...) +## Hris AccountDetails +
client.hris.account_details.retrieve()
@@ -30933,7 +31020,7 @@ client.hris.field_mapping.field_mappings_create(
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Get details for a linked account.
@@ -30954,9 +31041,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.field_mappings_destroy( - field_mapping_id="field_mapping_id", -) +client.hris.account_details.retrieve() ``` @@ -30972,14 +31057,6 @@ client.hris.field_mapping.field_mappings_destroy(
-**field_mapping_id:** `str` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -30992,7 +31069,8 @@ client.hris.field_mapping.field_mappings_destroy(
-
client.hris.field_mapping.field_mappings_partial_update(...) +## Hris AccountToken +
client.hris.account_token.retrieve(...)
@@ -31004,7 +31082,7 @@ client.hris.field_mapping.field_mappings_destroy(
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns the account token for the end user with the provided public token.
@@ -31025,8 +31103,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.field_mappings_partial_update( - field_mapping_id="field_mapping_id", +client.hris.account_token.retrieve( + public_token="public_token", ) ``` @@ -31043,7 +31121,7 @@ client.hris.field_mapping.field_mappings_partial_update(
-**field_mapping_id:** `str` +**public_token:** `str`
@@ -31051,31 +31129,75 @@ client.hris.field_mapping.field_mappings_partial_update(
-**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+## Hris AsyncPassthrough +
client.hris.async_passthrough.create(...)
-**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. - +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. +
+
+#### 🔌 Usage +
-**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. - +
+
+ +```python +from merge import Merge +from merge.resources.hris import DataPassthroughRequest, MethodEnum + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.async_passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), +) + +``` +
+
+#### ⚙️ Parameters +
-**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. +
+
+ +**request:** `DataPassthroughRequest`
@@ -31095,7 +31217,7 @@ client.hris.field_mapping.field_mappings_partial_update(
-
client.hris.field_mapping.remote_fields_retrieve(...) +
client.hris.async_passthrough.retrieve(...)
@@ -31107,7 +31229,7 @@ client.hris.field_mapping.field_mappings_partial_update(
-Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Retrieves data from earlier async-passthrough POST request
@@ -31128,9 +31250,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.remote_fields_retrieve( - common_models="common_models", - include_example_values="include_example_values", +client.hris.async_passthrough.retrieve( + async_passthrough_receipt_id="async_passthrough_receipt_id", ) ``` @@ -31147,15 +31268,7 @@ client.hris.field_mapping.remote_fields_retrieve(
-**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - -
-
- -
-
- -**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. +**async_passthrough_receipt_id:** `str`
@@ -31175,7 +31288,8 @@ client.hris.field_mapping.remote_fields_retrieve(
-
client.hris.field_mapping.target_fields_retrieve() +## Hris AuditTrail +
client.hris.audit_trail.list(...)
@@ -31187,7 +31301,7 @@ client.hris.field_mapping.remote_fields_retrieve(
-Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). +Gets a list of audit trail events.
@@ -31208,7 +31322,14 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.field_mapping.target_fields_retrieve() +client.hris.audit_trail.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + event_type="event_type", + page_size=1, + start_date="start_date", + user_email="user_email", +) ``` @@ -31224,6 +31345,54 @@ client.hris.field_mapping.target_fields_retrieve()
+**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time + +
+
+ +
+
+ +**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. + +
+
+ +
+
+ +**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time + +
+
+ +
+
+ +**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -31236,8 +31405,8 @@ client.hris.field_mapping.target_fields_retrieve()
-## Hris GenerateKey -
client.hris.generate_key.create(...) +## Hris AvailableActions +
client.hris.available_actions.retrieve()
@@ -31249,7 +31418,7 @@ client.hris.field_mapping.target_fields_retrieve()
-Create a remote key. +Returns a list of models and actions available for an account.
@@ -31270,9 +31439,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.generate_key.create( - name="Remote Deployment Key 1", -) +client.hris.available_actions.retrieve() ``` @@ -31288,14 +31455,6 @@ client.hris.generate_key.create(
-**name:** `str` — The name of the remote key - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -31308,8 +31467,8 @@ client.hris.generate_key.create(
-## Hris Groups -
client.hris.groups.list(...) +## Hris BankInfo +
client.hris.bank_info.list(...)
@@ -31321,7 +31480,7 @@ client.hris.generate_key.create(
-Returns a list of `Group` objects. +Returns a list of `BankInfo` objects.
@@ -31339,12 +31498,18 @@ Returns a list of `Group` objects. import datetime from merge import Merge +from merge.resources.hris.resources.bank_info import ( + BankInfoListRequestAccountType, + BankInfoListRequestOrderBy, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.groups.list( +client.hris.bank_info.list( + account_type=BankInfoListRequestAccountType.CHECKING, + bank_name="bank_name", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -31352,20 +31517,19 @@ client.hris.groups.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", include_deleted_data=True, include_remote_data=True, include_shell_data=True, - is_commonly_used_as_team="is_commonly_used_as_team", modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - names="names", + order_by=BankInfoListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, page_size=1, remote_id="remote_id", - types="types", ) ``` @@ -31382,7 +31546,28 @@ client.hris.groups.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**account_type:** `typing.Optional[BankInfoListRequestAccountType]` + +If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING') + +* `SAVINGS` - SAVINGS +* `CHECKING` - CHECKING + +
+
+ +
+
+ +**bank_name:** `typing.Optional[str]` — If provided, will only return BankInfo's with this bank name. + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -31406,7 +31591,7 @@ client.hris.groups.list(
-**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/). +**employee_id:** `typing.Optional[str]` — If provided, will only return bank accounts for this employee.
@@ -31414,7 +31599,7 @@ client.hris.groups.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -31422,7 +31607,7 @@ client.hris.groups.list(
-**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). +**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/).
@@ -31430,7 +31615,7 @@ client.hris.groups.list(
-**is_commonly_used_as_team:** `typing.Optional[str]` — If provided, specifies whether to return only Group objects which refer to a team in the third party platform. Note that this is an opinionated view based on how a team may be represented in the third party platform. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -31438,7 +31623,7 @@ client.hris.groups.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**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).
@@ -31446,7 +31631,7 @@ client.hris.groups.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -31454,7 +31639,7 @@ client.hris.groups.list(
-**names:** `typing.Optional[str]` — If provided, will only return groups with these names. Multiple values can be separated by commas. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -31462,7 +31647,7 @@ client.hris.groups.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**order_by:** `typing.Optional[BankInfoListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at.
@@ -31470,7 +31655,7 @@ client.hris.groups.list(
-**remote_fields:** `typing.Optional[typing.Literal["type"]]` — Deprecated. Use show_enum_origins. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -31478,7 +31663,7 @@ client.hris.groups.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` — Deprecated. Use show_enum_origins.
@@ -31486,7 +31671,7 @@ client.hris.groups.list(
-**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -31494,7 +31679,7 @@ client.hris.groups.list(
-**types:** `typing.Optional[str]` — If provided, will only return groups of these types. Multiple values can be separated by commas. +**show_enum_origins:** `typing.Optional[typing.Literal["account_type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -31514,7 +31699,7 @@ client.hris.groups.list(
-
client.hris.groups.retrieve(...) +
client.hris.bank_info.retrieve(...)
@@ -31526,7 +31711,7 @@ client.hris.groups.list(
-Returns a `Group` object with the given `id`. +Returns a `BankInfo` object with the given `id`.
@@ -31547,7 +31732,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.groups.retrieve( +client.hris.bank_info.retrieve( id="id", include_remote_data=True, include_shell_data=True, @@ -31575,6 +31760,14 @@ client.hris.groups.retrieve(
+**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -31591,7 +31784,7 @@ client.hris.groups.retrieve(
-**remote_fields:** `typing.Optional[typing.Literal["type"]]` — Deprecated. Use show_enum_origins. +**remote_fields:** `typing.Optional[typing.Literal["account_type"]]` — Deprecated. Use show_enum_origins.
@@ -31599,7 +31792,7 @@ client.hris.groups.retrieve(
-**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**show_enum_origins:** `typing.Optional[typing.Literal["account_type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -31619,8 +31812,8 @@ client.hris.groups.retrieve(
-## Hris Issues -
client.hris.issues.list(...) +## Hris Benefits +
client.hris.benefits.list(...)
@@ -31632,7 +31825,7 @@ client.hris.groups.retrieve(
-Gets all issues for Organization. +Returns a list of `Benefit` objects.
@@ -31650,35 +31843,31 @@ Gets all issues for Organization. import datetime from merge import Merge -from merge.resources.hris.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.issues.list( - account_token="account_token", - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - end_user_organization_name="end_user_organization_name", - first_incident_time_after=datetime.datetime.fromisoformat( +client.hris.benefits.list( + created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - first_incident_time_before=datetime.datetime.fromisoformat( + created_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - include_muted="include_muted", - integration_name="integration_name", - last_incident_time_after=datetime.datetime.fromisoformat( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - last_incident_time_before=datetime.datetime.fromisoformat( + modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - linked_account_id="linked_account_id", page_size=1, - start_date="start_date", - status=IssuesListRequestStatus.ONGOING, + remote_id="remote_id", ) ``` @@ -31695,15 +31884,7 @@ client.hris.issues.list(
-**account_token:** `typing.Optional[str]` - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -31711,7 +31892,7 @@ client.hris.issues.list(
-**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -31719,7 +31900,7 @@ client.hris.issues.list(
-**end_user_organization_name:** `typing.Optional[str]` +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -31727,7 +31908,7 @@ client.hris.issues.list(
-**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +**employee_id:** `typing.Optional[str]` — If provided, will return the benefits associated with the employee.
@@ -31735,7 +31916,7 @@ client.hris.issues.list(
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -31743,7 +31924,7 @@ client.hris.issues.list(
-**include_muted:** `typing.Optional[str]` — If true, will include muted issues +**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/).
@@ -31751,7 +31932,7 @@ client.hris.issues.list(
-**integration_name:** `typing.Optional[str]` +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -31759,7 +31940,7 @@ client.hris.issues.list(
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. +**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).
@@ -31767,7 +31948,7 @@ client.hris.issues.list(
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -31775,7 +31956,7 @@ client.hris.issues.list(
-**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -31791,20 +31972,7 @@ client.hris.issues.list(
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time - -
-
- -
-
- -**status:** `typing.Optional[IssuesListRequestStatus]` - -Status of the issue. Options: ('ONGOING', 'RESOLVED') - -* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -31824,7 +31992,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-
client.hris.issues.retrieve(...) +
client.hris.benefits.retrieve(...)
@@ -31836,7 +32004,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-Get a specific issue. +Returns a `Benefit` object with the given `id`.
@@ -31857,8 +32025,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.issues.retrieve( +client.hris.benefits.retrieve( id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -31883,6 +32053,30 @@ client.hris.issues.retrieve(
+**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**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.
@@ -31895,8 +32089,8 @@ client.hris.issues.retrieve(
-## Hris LinkToken -
client.hris.link_token.create(...) +## Hris Companies +
client.hris.companies.list(...)
@@ -31908,7 +32102,7 @@ client.hris.issues.retrieve(
-Creates a link token to be used when linking a new end user. +Returns a list of `Company` objects.
@@ -31923,18 +32117,33 @@ Creates a link token to be used when linking a new end user.
```python +import datetime + from merge import Merge -from merge.resources.hris import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], +client.hris.companies.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", ) ``` @@ -31951,7 +32160,7 @@ client.hris.link_token.create(
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -31959,7 +32168,7 @@ client.hris.link_token.create(
-**end_user_organization_name:** `str` — Your end user's organization. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -31967,7 +32176,7 @@ client.hris.link_token.create(
-**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -31975,7 +32184,7 @@ client.hris.link_token.create(
-**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. +**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/).
@@ -31983,7 +32192,7 @@ client.hris.link_token.create(
-**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -31991,7 +32200,7 @@ client.hris.link_token.create(
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. +**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).
@@ -31999,7 +32208,7 @@ client.hris.link_token.create(
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -32007,7 +32216,7 @@ client.hris.link_token.create(
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -32015,7 +32224,7 @@ client.hris.link_token.create(
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -32023,14 +32232,7 @@ client.hris.link_token.create(
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -32038,268 +32240,33 @@ client.hris.link_token.create(
-**language:** `typing.Optional[EndUserDetailsRequestLanguage]` - -The following subset of IETF language tags can be used to configure localization. - -* `en` - en -* `de` - de +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. -
+
+
client.hris.companies.retrieve(...)
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. - -
-
+#### 📝 Description
-**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` - -When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. +
+
-* `SELECTIVE_SYNC` - SELECTIVE_SYNC - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - - - -
- -## Hris LinkedAccounts -
client.hris.linked_accounts.list(...) -
-
- -#### 📝 Description - -
-
- -
-
- -List linked accounts for your organization. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from merge import Merge -from merge.resources.hris.resources.linked_accounts import ( - LinkedAccountsListRequestCategory, -) - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_user_email_address="end_user_email_address", - end_user_organization_name="end_user_organization_name", - end_user_origin_id="end_user_origin_id", - end_user_origin_ids="end_user_origin_ids", - id="id", - ids="ids", - include_duplicates=True, - integration_name="integration_name", - is_test_account="is_test_account", - page_size=1, - status="status", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**category:** `typing.Optional[LinkedAccountsListRequestCategory]` - -Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - -* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. - -
-
- -
-
- -**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. - -
-
- -
-
- -**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. - -
-
- -
-
- -**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - -
-
- -
-
- -**id:** `typing.Optional[str]` - -
-
- -
-
- -**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - -
-
- -
-
- -**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - -
-
- -
-
- -**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. - -
-
- -
-
- -**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. - -
-
- -
-
- -**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- -## Hris Locations -
client.hris.locations.list(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a list of `Location` objects. -
-
+Returns a `Company` object with the given `id`. +
+
@@ -32311,144 +32278,34 @@ Returns a list of `Location` objects.
-```python -import datetime - -from merge import Merge -from merge.resources.hris.resources.locations import ( - LocationsListRequestLocationType, - LocationsListRequestRemoteFields, - LocationsListRequestShowEnumOrigins, -) - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.locations.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - location_type=LocationsListRequestLocationType.HOME, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_fields=LocationsListRequestRemoteFields.COUNTRY, - remote_id="remote_id", - show_enum_origins=LocationsListRequestShowEnumOrigins.COUNTRY, -) - -``` -
-
- - - -#### ⚙️ Parameters - -
-
- -
-
- -**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — 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). - -
-
- -
-
- -**location_type:** `typing.Optional[LocationsListRequestLocationType]` +```python +from merge import Merge -If provided, will only return locations with this location type +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.companies.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, +) -* `HOME` - HOME -* `WORK` - WORK - +```
- -
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. -
-
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
+#### ⚙️ Parameters
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. - -
-
-
-**remote_fields:** `typing.Optional[LocationsListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**id:** `str`
@@ -32456,7 +32313,7 @@ If provided, will only return locations with this location type
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -32464,7 +32321,7 @@ If provided, will only return locations with this location type
-**show_enum_origins:** `typing.Optional[LocationsListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**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).
@@ -32484,7 +32341,8 @@ If provided, will only return locations with this location type
-
client.hris.locations.retrieve(...) +## Hris Scopes +
client.hris.scopes.default_scopes_retrieve()
@@ -32496,7 +32354,7 @@ If provided, will only return locations with this location type
-Returns a `Location` object with the given `id`. +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -32512,22 +32370,12 @@ Returns a `Location` object with the given `id`. ```python from merge import Merge -from merge.resources.hris.resources.locations import ( - LocationsRetrieveRequestRemoteFields, - LocationsRetrieveRequestShowEnumOrigins, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.locations.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, - remote_fields=LocationsRetrieveRequestRemoteFields.COUNTRY, - show_enum_origins=LocationsRetrieveRequestShowEnumOrigins.COUNTRY, -) +client.hris.scopes.default_scopes_retrieve() ``` @@ -32543,46 +32391,6 @@ client.hris.locations.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). - -
-
- -
-
- -**remote_fields:** `typing.Optional[LocationsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. - -
-
- -
-
- -**show_enum_origins:** `typing.Optional[LocationsRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -32595,8 +32403,7 @@ client.hris.locations.retrieve(
-## Hris Passthrough -
client.hris.passthrough.create(...) +
client.hris.scopes.linked_account_scopes_retrieve()
@@ -32608,7 +32415,7 @@ client.hris.locations.retrieve(
-Pull data from an endpoint not currently supported by Merge. +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -32624,18 +32431,12 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.hris import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), -) +client.hris.scopes.linked_account_scopes_retrieve() ``` @@ -32651,14 +32452,6 @@ client.hris.passthrough.create(
-**request:** `DataPassthroughRequest` - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -32671,8 +32464,7 @@ client.hris.passthrough.create(
-## Hris PayGroups -
client.hris.pay_groups.list(...) +
client.hris.scopes.linked_account_scopes_create(...)
@@ -32684,7 +32476,7 @@ client.hris.passthrough.create(
-Returns a list of `PayGroup` objects. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -32699,33 +32491,43 @@ Returns a list of `PayGroup` objects.
```python -import datetime - from merge import Merge +from merge.resources.hris import ( + FieldPermissionDeserializerRequest, + IndividualCommonModelScopeDeserializerRequest, + ModelPermissionDeserializerRequest, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.pay_groups.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", +client.hris.scopes.linked_account_scopes_create( + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="Employee", + model_permissions={ + "READ": ModelPermissionDeserializerRequest( + is_enabled=True, + ), + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ), + }, + field_permissions=FieldPermissionDeserializerRequest( + enabled_fields=["avatar", "home_location"], + disabled_fields=["work_location"], + ), + ), + IndividualCommonModelScopeDeserializerRequest( + model_name="Benefit", + model_permissions={ + "WRITE": ModelPermissionDeserializerRequest( + is_enabled=False, + ) + }, + ), + ], ) ``` @@ -32742,79 +32544,7 @@ client.hris.pay_groups.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. - -
-
- -
-
- -**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for
@@ -32834,7 +32564,8 @@ client.hris.pay_groups.list(
-
client.hris.pay_groups.retrieve(...) +## Hris DeleteAccount +
client.hris.delete_account.delete()
@@ -32846,7 +32577,7 @@ client.hris.pay_groups.list(
-Returns a `PayGroup` object with the given `id`. +Delete a linked account.
@@ -32867,11 +32598,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.pay_groups.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, -) +client.hris.delete_account.delete() ``` @@ -32887,30 +32614,6 @@ client.hris.pay_groups.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_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -32923,8 +32626,8 @@ client.hris.pay_groups.retrieve(
-## Hris PayrollRuns -
client.hris.payroll_runs.list(...) +## Hris Dependents +
client.hris.dependents.list(...)
@@ -32936,7 +32639,7 @@ client.hris.pay_groups.retrieve(
-Returns a list of `PayrollRun` objects. +Returns a list of `Dependent` objects.
@@ -32954,17 +32657,12 @@ Returns a list of `PayrollRun` objects. import datetime from merge import Merge -from merge.resources.hris.resources.payroll_runs import ( - PayrollRunsListRequestRemoteFields, - PayrollRunsListRequestRunType, - PayrollRunsListRequestShowEnumOrigins, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.payroll_runs.list( +client.hris.dependents.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -32972,14 +32670,10 @@ client.hris.payroll_runs.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - ended_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - ended_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), + employee_id="employee_id", include_deleted_data=True, include_remote_data=True, + include_sensitive_fields=True, include_shell_data=True, modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", @@ -32988,16 +32682,7 @@ client.hris.payroll_runs.list( "2024-01-15 09:30:00+00:00", ), page_size=1, - remote_fields=PayrollRunsListRequestRemoteFields.RUN_STATE, remote_id="remote_id", - run_type=PayrollRunsListRequestRunType.CORRECTION, - show_enum_origins=PayrollRunsListRequestShowEnumOrigins.RUN_STATE, - started_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - started_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), ) ``` @@ -33038,7 +32723,7 @@ client.hris.payroll_runs.list(
-**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs ended after this datetime. +**employee_id:** `typing.Optional[str]` — If provided, will only return dependents for this employee.
@@ -33046,7 +32731,7 @@ client.hris.payroll_runs.list(
-**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs ended before this datetime. +**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/).
@@ -33054,7 +32739,7 @@ client.hris.payroll_runs.list(
-**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.
@@ -33062,7 +32747,7 @@ client.hris.payroll_runs.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response.
@@ -33102,7 +32787,7 @@ client.hris.payroll_runs.list(
-**remote_fields:** `typing.Optional[PayrollRunsListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -33110,23 +32795,73 @@ client.hris.payroll_runs.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.hris.dependents.retrieve(...)
-**run_type:** `typing.Optional[PayrollRunsListRequestRunType]` +#### 📝 Description -If provided, will only return PayrollRun's with this status. Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', 'SIGN_ON_BONUS') +
+
-* `REGULAR` - REGULAR -* `OFF_CYCLE` - OFF_CYCLE -* `CORRECTION` - CORRECTION -* `TERMINATION` - TERMINATION -* `SIGN_ON_BONUS` - SIGN_ON_BONUS +
+
+ +Returns a `Dependent` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from merge import Merge + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.dependents.retrieve( + id="id", + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str`
@@ -33134,7 +32869,7 @@ If provided, will only return PayrollRun's with this status. Options: ('REGULAR'
-**show_enum_origins:** `typing.Optional[PayrollRunsListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -33142,7 +32877,7 @@ If provided, will only return PayrollRun's with this status. Options: ('REGULAR'
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs started after this datetime. +**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response.
@@ -33150,7 +32885,7 @@ If provided, will only return PayrollRun's with this status. Options: ('REGULAR'
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs started before this datetime. +**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).
@@ -33170,7 +32905,8 @@ If provided, will only return PayrollRun's with this status. Options: ('REGULAR'
-
client.hris.payroll_runs.retrieve(...) +## Hris EmployeePayrollRuns +
client.hris.employee_payroll_runs.list(...)
@@ -33182,7 +32918,7 @@ If provided, will only return PayrollRun's with this status. Options: ('REGULAR'
-Returns a `PayrollRun` object with the given `id`. +Returns a list of `EmployeePayrollRun` objects.
@@ -33197,22 +32933,51 @@ Returns a `PayrollRun` object with the given `id`.
```python +import datetime + from merge import Merge -from merge.resources.hris.resources.payroll_runs import ( - PayrollRunsRetrieveRequestRemoteFields, - PayrollRunsRetrieveRequestShowEnumOrigins, +from merge.resources.hris.resources.employee_payroll_runs import ( + EmployeePayrollRunsListRequestExpand, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.payroll_runs.retrieve( - id="id", +client.hris.employee_payroll_runs.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + expand=EmployeePayrollRunsListRequestExpand.EMPLOYEE, + include_deleted_data=True, include_remote_data=True, include_shell_data=True, - remote_fields=PayrollRunsRetrieveRequestRemoteFields.RUN_STATE, - show_enum_origins=PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + payroll_run_id="payroll_run_id", + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -33229,7 +32994,7 @@ client.hris.payroll_runs.retrieve(
-**id:** `str` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -33237,7 +33002,7 @@ client.hris.payroll_runs.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -33245,7 +33010,7 @@ client.hris.payroll_runs.retrieve(
-**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). +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -33253,7 +33018,7 @@ client.hris.payroll_runs.retrieve(
-**remote_fields:** `typing.Optional[PayrollRunsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**employee_id:** `typing.Optional[str]` — If provided, will only return employee payroll runs for this employee.
@@ -33261,7 +33026,7 @@ client.hris.payroll_runs.retrieve(
-**show_enum_origins:** `typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs ended after this datetime.
@@ -33269,71 +33034,95 @@ client.hris.payroll_runs.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs ended before this datetime.
+ +
+
+ +**expand:** `typing.Optional[EmployeePayrollRunsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
+
+
+**include_deleted_data:** `typing.Optional[bool]` — 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/). +
-
-## Hris RegenerateKey -
client.hris.regenerate_key.create(...)
-#### 📝 Description +**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). + +
+
+
-Exchange remote keys. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
+ +
+
+ +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +
-#### 🔌 Usage -
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+
-```python -from merge import Merge +**payroll_run_id:** `typing.Optional[str]` — If provided, will only return employee payroll runs for this employee. + +
+
-client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.regenerate_key.create( - name="Remote Deployment Key 1", -) +
+
-``` -
-
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + -#### ⚙️ Parameters -
+**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs started after this datetime. + +
+
+
-**name:** `str` — The name of the remote key +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return employee payroll runs started before this datetime.
@@ -33353,8 +33142,7 @@ client.hris.regenerate_key.create(
-## Hris SyncStatus -
client.hris.sync_status.list(...) +
client.hris.employee_payroll_runs.retrieve(...)
@@ -33366,7 +33154,7 @@ client.hris.regenerate_key.create(
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +Returns an `EmployeePayrollRun` object with the given `id`.
@@ -33382,14 +33170,19 @@ Get sync status for the current sync and the most recently finished sync. `last_ ```python from merge import Merge +from merge.resources.hris.resources.employee_payroll_runs import ( + EmployeePayrollRunsRetrieveRequestExpand, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.sync_status.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - page_size=1, +client.hris.employee_payroll_runs.retrieve( + id="id", + expand=EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE, + include_remote_data=True, + include_shell_data=True, ) ``` @@ -33406,7 +33199,7 @@ client.hris.sync_status.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**id:** `str`
@@ -33414,7 +33207,7 @@ client.hris.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**expand:** `typing.Optional[EmployeePayrollRunsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -33422,65 +33215,19 @@ client.hris.sync_status.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
- -
- - - - -
- -## Hris ForceResync -
client.hris.force_resync.sync_status_resync_create() -
-
- -#### 📝 Description - -
-
- -
-
- -Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. -
-
-
-
- -#### 🔌 Usage
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.force_resync.sync_status_resync_create() - -``` -
-
+**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). +
-#### ⚙️ Parameters - -
-
-
@@ -33496,8 +33243,8 @@ client.hris.force_resync.sync_status_resync_create()
-## Hris Teams -
client.hris.teams.list(...) +## Hris Employees +
client.hris.employees.list(...)
@@ -33509,7 +33256,7 @@ client.hris.force_resync.sync_status_resync_create()
-Returns a list of `Team` objects. +Returns a list of `Employee` objects.
@@ -33527,12 +33274,19 @@ Returns a list of `Team` objects. import datetime from merge import Merge +from merge.resources.hris.resources.employees import ( + EmployeesListRequestEmploymentStatus, + EmployeesListRequestExpand, + EmployeesListRequestRemoteFields, + EmployeesListRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.teams.list( +client.hris.employees.list( + company_id="company_id", created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -33540,9 +33294,21 @@ client.hris.teams.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + display_full_name="display_full_name", + employee_number="employee_number", + employment_status=EmployeesListRequestEmploymentStatus.ACTIVE, + employment_type="employment_type", + expand=EmployeesListRequestExpand.COMPANY, + first_name="first_name", + groups="groups", + home_location_id="home_location_id", include_deleted_data=True, include_remote_data=True, + include_sensitive_fields=True, include_shell_data=True, + job_title="job_title", + last_name="last_name", + manager_id="manager_id", modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -33550,8 +33316,26 @@ client.hris.teams.list( "2024-01-15 09:30:00+00:00", ), page_size=1, - parent_team_id="parent_team_id", + pay_group_id="pay_group_id", + personal_email="personal_email", + remote_fields=EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS, remote_id="remote_id", + show_enum_origins=EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + team_id="team_id", + terminated_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + terminated_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + work_email="work_email", + work_location_id="work_location_id", ) ``` @@ -33568,63 +33352,7 @@ client.hris.teams.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["parent_team"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_deleted_data:** `typing.Optional[bool]` — Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - -
-
- -
-
- -**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**company_id:** `typing.Optional[str]` — If provided, will only return employees for this company.
@@ -33632,7 +33360,7 @@ client.hris.teams.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -33640,7 +33368,7 @@ client.hris.teams.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -33648,7 +33376,7 @@ client.hris.teams.list(
-**parent_team_id:** `typing.Optional[str]` — If provided, will only return teams with this parent team. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -33656,7 +33384,7 @@ client.hris.teams.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**display_full_name:** `typing.Optional[str]` — If provided, will only return employees with this display name.
@@ -33664,72 +33392,29 @@ client.hris.teams.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**employee_number:** `typing.Optional[str]` — If provided, will only return employees with this employee number.
- -
- - - - -
- -
client.hris.teams.retrieve(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Returns a `Team` object with the given `id`. -
-
-
-
- -#### 🔌 Usage
-
-
- -```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.teams.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, -) - -``` -
-
-
-
+**employment_status:** `typing.Optional[EmployeesListRequestEmploymentStatus]` -#### ⚙️ Parameters +If provided, will only return employees with this employment status. -
-
+* `ACTIVE` - ACTIVE +* `PENDING` - PENDING +* `INACTIVE` - INACTIVE + +
+
-**id:** `str` +**employment_type:** `typing.Optional[str]` — If provided, will only return employees that have an employment of the specified employment type.
@@ -33737,7 +33422,7 @@ client.hris.teams.retrieve(
-**expand:** `typing.Optional[typing.Literal["parent_team"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[EmployeesListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -33745,7 +33430,7 @@ client.hris.teams.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**first_name:** `typing.Optional[str]` — If provided, will only return employees with this first name.
@@ -33753,7 +33438,7 @@ client.hris.teams.retrieve(
-**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). +**groups:** `typing.Optional[str]` — If provided, will only return employees matching the group ids; multiple groups can be separated by commas.
@@ -33761,116 +33446,71 @@ client.hris.teams.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**home_location_id:** `typing.Optional[str]` — If provided, will only return employees for this home location.
-
-
+
+
+**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/). +
-
-## Hris TimeOff -
client.hris.time_off.list(...)
-#### 📝 Description +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. + +
+
+
-Returns a list of `TimeOff` objects. -
-
+**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). + -#### 🔌 Usage -
+**job_title:** `typing.Optional[str]` — If provided, will only return employees that have an employment of the specified job title. + +
+
+
-```python -import datetime - -from merge import Merge -from merge.resources.hris.resources.time_off import ( - TimeOffListRequestExpand, - TimeOffListRequestRemoteFields, - TimeOffListRequestRequestType, - TimeOffListRequestShowEnumOrigins, - TimeOffListRequestStatus, -) - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.hris.time_off.list( - approver_id="approver_id", - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - employee_id="employee_id", - ended_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - ended_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - expand=TimeOffListRequestExpand.APPROVER, - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_fields=TimeOffListRequestRemoteFields.REQUEST_TYPE, - remote_id="remote_id", - request_type=TimeOffListRequestRequestType.BEREAVEMENT, - show_enum_origins=TimeOffListRequestShowEnumOrigins.REQUEST_TYPE, - started_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - started_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - status=TimeOffListRequestStatus.APPROVED, -) - -``` -
-
+**last_name:** `typing.Optional[str]` — If provided, will only return employees with this last name. + -#### ⚙️ Parameters -
+**manager_id:** `typing.Optional[str]` — If provided, will only return employees for this manager. + +
+
+
-**approver_id:** `typing.Optional[str]` — If provided, will only return time off for this approver. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -33878,7 +33518,7 @@ client.hris.time_off.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -33886,7 +33526,7 @@ client.hris.time_off.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**page_size:** `typing.Optional[int]` — Number of results to return per page.
@@ -33894,7 +33534,7 @@ client.hris.time_off.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**pay_group_id:** `typing.Optional[str]` — If provided, will only return employees for this pay group
@@ -33902,7 +33542,7 @@ client.hris.time_off.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return time off for this employee. +**personal_email:** `typing.Optional[str]` — If provided, will only return Employees with this personal email
@@ -33910,7 +33550,7 @@ client.hris.time_off.list(
-**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that ended after this datetime. +**remote_fields:** `typing.Optional[EmployeesListRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -33918,7 +33558,7 @@ client.hris.time_off.list(
-**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that ended before this datetime. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -33926,7 +33566,7 @@ client.hris.time_off.list(
-**expand:** `typing.Optional[TimeOffListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**show_enum_origins:** `typing.Optional[EmployeesListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -33934,7 +33574,7 @@ client.hris.time_off.list(
-**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/). +**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that started after this datetime.
@@ -33942,7 +33582,7 @@ client.hris.time_off.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return employees that started before this datetime.
@@ -33950,7 +33590,7 @@ client.hris.time_off.list(
-**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). +**team_id:** `typing.Optional[str]` — If provided, will only return employees for this team.
@@ -33958,7 +33598,7 @@ client.hris.time_off.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**terminated_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that were terminated after this datetime.
@@ -33966,7 +33606,7 @@ client.hris.time_off.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**terminated_before:** `typing.Optional[dt.datetime]` — If provided, will only return employees that were terminated before this datetime.
@@ -33974,7 +33614,7 @@ client.hris.time_off.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**work_email:** `typing.Optional[str]` — If provided, will only return Employees with this work email
@@ -33982,7 +33622,7 @@ client.hris.time_off.list(
-**remote_fields:** `typing.Optional[TimeOffListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**work_location_id:** `typing.Optional[str]` — If provided, will only return employees for this location.
@@ -33990,40 +33630,73 @@ client.hris.time_off.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ + + + + + +
+
client.hris.employees.create(...)
-**request_type:** `typing.Optional[TimeOffListRequestRequestType]` +#### 📝 Description -If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') +
+
-* `VACATION` - VACATION -* `SICK` - SICK -* `PERSONAL` - PERSONAL -* `JURY_DUTY` - JURY_DUTY -* `VOLUNTEER` - VOLUNTEER -* `BEREAVEMENT` - BEREAVEMENT - +
+
+ +Creates an `Employee` object with the given values. +
+
+#### 🔌 Usage +
-**show_enum_origins:** `typing.Optional[TimeOffListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - +
+
+ +```python +from merge import Merge +from merge.resources.hris import EmployeeRequest + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.employees.create( + is_debug_mode=True, + run_async=True, + model=EmployeeRequest(), +) + +``` +
+
+#### ⚙️ Parameters +
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that started after this datetime. +
+
+ +**model:** `EmployeeRequest`
@@ -34031,7 +33704,7 @@ If provided, will only return TimeOff with this request type. Options: ('VACATIO
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that started before this datetime. +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response.
@@ -34039,15 +33712,7 @@ If provided, will only return TimeOff with this request type. Options: ('VACATIO
-**status:** `typing.Optional[TimeOffListRequestStatus]` - -If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') - -* `REQUESTED` - REQUESTED -* `APPROVED` - APPROVED -* `DECLINED` - DECLINED -* `CANCELLED` - CANCELLED -* `DELETED` - DELETED +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -34067,7 +33732,7 @@ If provided, will only return TimeOff with this status. Options: ('REQUESTED', '
-
client.hris.time_off.create(...) +
client.hris.employees.retrieve(...)
@@ -34079,7 +33744,7 @@ If provided, will only return TimeOff with this status. Options: ('REQUESTED', '
-Creates a `TimeOff` object with the given values. +Returns an `Employee` object with the given `id`.
@@ -34095,33 +33760,73 @@ Creates a `TimeOff` object with the given values. ```python from merge import Merge -from merge.resources.hris import TimeOffRequest +from merge.resources.hris.resources.employees import ( + EmployeesRetrieveRequestExpand, + EmployeesRetrieveRequestRemoteFields, + EmployeesRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off.create( - is_debug_mode=True, - run_async=True, - model=TimeOffRequest(), +client.hris.employees.retrieve( + id="id", + expand=EmployeesRetrieveRequestExpand.COMPANY, + include_remote_data=True, + include_sensitive_fields=True, + include_shell_data=True, + remote_fields=EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS, + show_enum_origins=EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS, ) -``` +``` + +
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[EmployeesRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +
-#### ⚙️ Parameters -
+**include_sensitive_fields:** `typing.Optional[bool]` — Whether to include sensitive fields (such as social security numbers) in the response. + +
+
+
-**model:** `TimeOffRequest` +**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).
@@ -34129,7 +33834,7 @@ client.hris.time_off.create(
-**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. +**remote_fields:** `typing.Optional[EmployeesRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -34137,7 +33842,7 @@ client.hris.time_off.create(
-**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**show_enum_origins:** `typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -34157,7 +33862,7 @@ client.hris.time_off.create(
-
client.hris.time_off.retrieve(...) +
client.hris.employees.ignore_create(...)
@@ -34169,7 +33874,7 @@ client.hris.time_off.create(
-Returns a `TimeOff` object with the given `id`. +Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
@@ -34185,23 +33890,15 @@ Returns a `TimeOff` object with the given `id`. ```python from merge import Merge -from merge.resources.hris.resources.time_off import ( - TimeOffRetrieveRequestExpand, - TimeOffRetrieveRequestRemoteFields, - TimeOffRetrieveRequestShowEnumOrigins, -) +from merge.resources.hris import ReasonEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off.retrieve( - id="id", - expand=TimeOffRetrieveRequestExpand.APPROVER, - include_remote_data=True, - include_shell_data=True, - remote_fields=TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE, - show_enum_origins=TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE, +client.hris.employees.ignore_create( + model_id="model_id", + reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, ) ``` @@ -34218,31 +33915,7 @@ client.hris.time_off.retrieve(
-**id:** `str` - -
-
- -
-
- -**expand:** `typing.Optional[TimeOffRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- -**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
- -
-
- -**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). +**model_id:** `str`
@@ -34250,7 +33923,7 @@ client.hris.time_off.retrieve(
-**remote_fields:** `typing.Optional[TimeOffRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. +**reason:** `IgnoreCommonModelRequestReason`
@@ -34258,7 +33931,7 @@ client.hris.time_off.retrieve(
-**show_enum_origins:** `typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +**message:** `typing.Optional[str]`
@@ -34278,7 +33951,7 @@ client.hris.time_off.retrieve(
-
client.hris.time_off.meta_post_retrieve() +
client.hris.employees.meta_post_retrieve()
@@ -34290,7 +33963,7 @@ client.hris.time_off.retrieve(
-Returns metadata for `TimeOff` POSTs. +Returns metadata for `Employee` POSTs.
@@ -34311,7 +33984,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off.meta_post_retrieve() +client.hris.employees.meta_post_retrieve() ``` @@ -34339,8 +34012,8 @@ client.hris.time_off.meta_post_retrieve()
-## Hris TimeOffBalances -
client.hris.time_off_balances.list(...) +## Hris EmployerBenefits +
client.hris.employer_benefits.list(...)
@@ -34352,7 +34025,7 @@ client.hris.time_off.meta_post_retrieve()
-Returns a list of `TimeOffBalance` objects. +Returns a list of `EmployerBenefit` objects.
@@ -34370,15 +34043,12 @@ Returns a list of `TimeOffBalance` objects. import datetime from merge import Merge -from merge.resources.hris.resources.time_off_balances import ( - TimeOffBalancesListRequestPolicyType, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off_balances.list( +client.hris.employer_benefits.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -34386,7 +34056,6 @@ client.hris.time_off_balances.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - employee_id="employee_id", include_deleted_data=True, include_remote_data=True, include_shell_data=True, @@ -34397,7 +34066,6 @@ client.hris.time_off_balances.list( "2024-01-15 09:30:00+00:00", ), page_size=1, - policy_type=TimeOffBalancesListRequestPolicyType.BEREAVEMENT, remote_id="remote_id", ) @@ -34439,22 +34107,6 @@ client.hris.time_off_balances.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return time off balances for this employee. - -
-
- -
-
- -**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- **include_deleted_data:** `typing.Optional[bool]` — 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/).
@@ -34503,31 +34155,6 @@ client.hris.time_off_balances.list(
-**policy_type:** `typing.Optional[TimeOffBalancesListRequestPolicyType]` - -If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') - -* `VACATION` - VACATION -* `SICK` - SICK -* `PERSONAL` - PERSONAL -* `JURY_DUTY` - JURY_DUTY -* `VOLUNTEER` - VOLUNTEER -* `BEREAVEMENT` - BEREAVEMENT - -
-
- -
-
- -**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` — Deprecated. Use show_enum_origins. - -
-
- -
-
- **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -34536,14 +34163,6 @@ If provided, will only return TimeOffBalance with this policy type. Options: ('V
-**show_enum_origins:** `typing.Optional[typing.Literal["policy_type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -34556,7 +34175,7 @@ If provided, will only return TimeOffBalance with this policy type. Options: ('V
-
client.hris.time_off_balances.retrieve(...) +
client.hris.employer_benefits.retrieve(...)
@@ -34568,7 +34187,7 @@ If provided, will only return TimeOffBalance with this policy type. Options: ('V
-Returns a `TimeOffBalance` object with the given `id`. +Returns an `EmployerBenefit` object with the given `id`.
@@ -34589,7 +34208,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.time_off_balances.retrieve( +client.hris.employer_benefits.retrieve( id="id", include_remote_data=True, include_shell_data=True, @@ -34617,14 +34236,6 @@ client.hris.time_off_balances.retrieve(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - -
-
- -
-
- **include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -34641,22 +34252,6 @@ client.hris.time_off_balances.retrieve(
-**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` — Deprecated. Use show_enum_origins. - -
-
- -
-
- -**show_enum_origins:** `typing.Optional[typing.Literal["policy_type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -34669,8 +34264,8 @@ client.hris.time_off_balances.retrieve(
-## Hris TimesheetEntries -
client.hris.timesheet_entries.list(...) +## Hris Employments +
client.hris.employments.list(...)
@@ -34682,7 +34277,7 @@ client.hris.time_off_balances.retrieve(
-Returns a list of `TimesheetEntry` objects. +Returns a list of `Employment` objects.
@@ -34700,15 +34295,18 @@ Returns a list of `TimesheetEntry` objects. import datetime from merge import Merge -from merge.resources.hris.resources.timesheet_entries import ( - TimesheetEntriesListRequestOrderBy, +from merge.resources.hris.resources.employments import ( + EmploymentsListRequestExpand, + EmploymentsListRequestOrderBy, + EmploymentsListRequestRemoteFields, + EmploymentsListRequestShowEnumOrigins, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.timesheet_entries.list( +client.hris.employments.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -34717,12 +34315,7 @@ client.hris.timesheet_entries.list( ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", employee_id="employee_id", - ended_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - ended_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), + expand=EmploymentsListRequestExpand.EMPLOYEE, include_deleted_data=True, include_remote_data=True, include_shell_data=True, @@ -34732,15 +34325,11 @@ client.hris.timesheet_entries.list( modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - order_by=TimesheetEntriesListRequestOrderBy.START_TIME_DESCENDING, + order_by=EmploymentsListRequestOrderBy.EFFECTIVE_DATE_DESCENDING, page_size=1, + remote_fields=EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE, remote_id="remote_id", - started_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - started_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), + show_enum_origins=EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE, ) ``` @@ -34749,15 +34338,71 @@ client.hris.timesheet_entries.list(
-#### ⚙️ Parameters - +#### ⚙️ Parameters + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**employee_id:** `typing.Optional[str]` — If provided, will only return employments for this employee. + +
+
+ +
+
+ +**expand:** `typing.Optional[EmploymentsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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. + +
+
+
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. +**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).
@@ -34765,7 +34410,7 @@ client.hris.timesheet_entries.list(
-**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -34773,7 +34418,7 @@ client.hris.timesheet_entries.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -34781,7 +34426,7 @@ client.hris.timesheet_entries.list(
-**employee_id:** `typing.Optional[str]` — If provided, will only return timesheet entries for this employee. +**order_by:** `typing.Optional[EmploymentsListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date.
@@ -34789,7 +34434,7 @@ client.hris.timesheet_entries.list(
-**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries ended after this datetime. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -34797,7 +34442,7 @@ client.hris.timesheet_entries.list(
-**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries ended before this datetime. +**remote_fields:** `typing.Optional[EmploymentsListRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -34805,7 +34450,7 @@ client.hris.timesheet_entries.list(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -34813,7 +34458,7 @@ client.hris.timesheet_entries.list(
-**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/). +**show_enum_origins:** `typing.Optional[EmploymentsListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -34821,31 +34466,80 @@ client.hris.timesheet_entries.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + + + +
+
client.hris.employments.retrieve(...)
-**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). - +#### 📝 Description + +
+
+ +
+
+ +Returns an `Employment` object with the given `id`. +
+
+#### 🔌 Usage +
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - +
+
+ +```python +from merge import Merge +from merge.resources.hris.resources.employments import ( + EmploymentsRetrieveRequestExpand, + EmploymentsRetrieveRequestRemoteFields, + EmploymentsRetrieveRequestShowEnumOrigins, +) + +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.employments.retrieve( + id="id", + expand=EmploymentsRetrieveRequestExpand.EMPLOYEE, + include_remote_data=True, + include_shell_data=True, + remote_fields=EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE, + show_enum_origins=EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE, +) + +```
+
+
+ +#### ⚙️ Parameters
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +
+
+ +**id:** `str`
@@ -34853,7 +34547,7 @@ client.hris.timesheet_entries.list(
-**order_by:** `typing.Optional[TimesheetEntriesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. +**expand:** `typing.Optional[EmploymentsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -34861,7 +34555,7 @@ client.hris.timesheet_entries.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -34869,7 +34563,7 @@ client.hris.timesheet_entries.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**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).
@@ -34877,7 +34571,7 @@ client.hris.timesheet_entries.list(
-**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries started after this datetime. +**remote_fields:** `typing.Optional[EmploymentsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -34885,7 +34579,7 @@ client.hris.timesheet_entries.list(
-**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries started before this datetime. +**show_enum_origins:** `typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -34905,7 +34599,8 @@ client.hris.timesheet_entries.list(
-
client.hris.timesheet_entries.create(...) +## Hris FieldMapping +
client.hris.field_mapping.field_mappings_retrieve(...)
@@ -34917,7 +34612,7 @@ client.hris.timesheet_entries.list(
-Creates a `TimesheetEntry` object with the given values. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -34933,16 +34628,13 @@ Creates a `TimesheetEntry` object with the given values. ```python from merge import Merge -from merge.resources.hris import TimesheetEntryRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.timesheet_entries.create( - is_debug_mode=True, - run_async=True, - model=TimesheetEntryRequest(), +client.hris.field_mapping.field_mappings_retrieve( + exclude_remote_field_metadata=True, ) ``` @@ -34959,23 +34651,7 @@ client.hris.timesheet_entries.create(
-**model:** `TimesheetEntryRequest` - -
-
- -
-
- -**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. - -
-
- -
-
- -**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations.
@@ -34995,7 +34671,7 @@ client.hris.timesheet_entries.create(
-
client.hris.timesheet_entries.retrieve(...) +
client.hris.field_mapping.field_mappings_create(...)
@@ -35007,7 +34683,7 @@ client.hris.timesheet_entries.create(
-Returns a `TimesheetEntry` object with the given `id`. +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -35028,10 +34704,14 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.timesheet_entries.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, +client.hris.field_mapping.field_mappings_create( + exclude_remote_field_metadata=True, + target_field_name="example_target_field_name", + target_field_description="this is a example description of the target field", + remote_field_traversal_path=["example_remote_field"], + remote_method="GET", + remote_url_path="/example-url-path", + common_model_name="ExampleCommonModel", ) ``` @@ -35048,7 +34728,7 @@ client.hris.timesheet_entries.retrieve(
-**id:** `str` +**target_field_name:** `str` — The name of the target field you want this remote field to map to.
@@ -35056,7 +34736,7 @@ client.hris.timesheet_entries.retrieve(
-**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**target_field_description:** `str` — The description of the target field you want this remote field to map to.
@@ -35064,7 +34744,7 @@ client.hris.timesheet_entries.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
@@ -35072,7 +34752,39 @@ client.hris.timesheet_entries.retrieve(
-**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). +**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. + +
+
+ +
+
+ +**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. + +
+
+ +
+
+ +**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. + +
+
+ +
+
+ +**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. + +
+
+ +
+
+ +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping.
@@ -35092,7 +34804,7 @@ client.hris.timesheet_entries.retrieve(
-
client.hris.timesheet_entries.meta_post_retrieve() +
client.hris.field_mapping.field_mappings_destroy(...)
@@ -35104,7 +34816,7 @@ client.hris.timesheet_entries.retrieve(
-Returns metadata for `TimesheetEntry` POSTs. +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -35125,7 +34837,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.timesheet_entries.meta_post_retrieve() +client.hris.field_mapping.field_mappings_destroy( + field_mapping_id="field_mapping_id", +) ``` @@ -35141,6 +34855,14 @@ client.hris.timesheet_entries.meta_post_retrieve()
+**field_mapping_id:** `str` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -35153,8 +34875,7 @@ client.hris.timesheet_entries.meta_post_retrieve()
-## Hris WebhookReceivers -
client.hris.webhook_receivers.list() +
client.hris.field_mapping.field_mappings_partial_update(...)
@@ -35166,7 +34887,7 @@ client.hris.timesheet_entries.meta_post_retrieve()
-Returns a list of `WebhookReceiver` objects. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -35187,7 +34908,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.webhook_receivers.list() +client.hris.field_mapping.field_mappings_partial_update( + field_mapping_id="field_mapping_id", +) ``` @@ -35203,6 +34926,46 @@ client.hris.webhook_receivers.list()
+**field_mapping_id:** `str` + +
+
+ +
+
+ +**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. + +
+
+ +
+
+ +**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. + +
+
+ +
+
+ +**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. + +
+
+ +
+
+ +**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -35215,7 +34978,7 @@ client.hris.webhook_receivers.list()
-
client.hris.webhook_receivers.create(...) +
client.hris.field_mapping.remote_fields_retrieve(...)
@@ -35227,7 +34990,7 @@ client.hris.webhook_receivers.list()
-Creates a `WebhookReceiver` object with the given values. +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -35248,9 +35011,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.hris.webhook_receivers.create( - event="event", - is_active=True, +client.hris.field_mapping.remote_fields_retrieve( + common_models="common_models", + include_example_values="include_example_values", ) ``` @@ -35267,15 +35030,7 @@ client.hris.webhook_receivers.create(
-**event:** `str` - -
-
- -
-
- -**is_active:** `bool` +**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.
@@ -35283,7 +35038,7 @@ client.hris.webhook_receivers.create(
-**key:** `typing.Optional[str]` +**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers.
@@ -35303,8 +35058,7 @@ client.hris.webhook_receivers.create(
-## Knowledgebase AccountDetails -
client.knowledgebase.account_details.retrieve() +
client.hris.field_mapping.target_fields_retrieve()
@@ -35316,7 +35070,7 @@ client.hris.webhook_receivers.create(
-Get details for a linked account. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -35337,7 +35091,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.account_details.retrieve() +client.hris.field_mapping.target_fields_retrieve() ``` @@ -35365,8 +35119,8 @@ client.knowledgebase.account_details.retrieve()
-## Knowledgebase AccountToken -
client.knowledgebase.account_token.retrieve(...) +## Hris GenerateKey +
client.hris.generate_key.create(...)
@@ -35378,7 +35132,7 @@ client.knowledgebase.account_details.retrieve()
-Returns the account token for the end user with the provided public token. +Create a remote key.
@@ -35399,8 +35153,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.account_token.retrieve( - public_token="public_token", +client.hris.generate_key.create( + name="Remote Deployment Key 1", ) ``` @@ -35417,7 +35171,7 @@ client.knowledgebase.account_token.retrieve(
-**public_token:** `str` +**name:** `str` — The name of the remote key
@@ -35437,8 +35191,8 @@ client.knowledgebase.account_token.retrieve(
-## Knowledgebase Articles -
client.knowledgebase.articles.list(...) +## Hris Groups +
client.hris.groups.list(...)
@@ -35450,7 +35204,7 @@ client.knowledgebase.account_token.retrieve(
-Returns a list of `Article` objects. +Returns a list of `Group` objects.
@@ -35468,16 +35222,12 @@ Returns a list of `Article` objects. import datetime from merge import Merge -from merge.resources.knowledgebase.resources.articles import ( - ArticlesListRequestExpand, - ArticlesListRequestType, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.articles.list( +client.hris.groups.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -35485,23 +35235,20 @@ client.knowledgebase.articles.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - expand=ArticlesListRequestExpand.ATTACHMENTS, include_deleted_data=True, include_remote_data=True, include_shell_data=True, + is_commonly_used_as_team="is_commonly_used_as_team", modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + names="names", page_size=1, - parent_article_id="parent_article_id", - parent_container_id="parent_container_id", remote_id="remote_id", - root_container_id="root_container_id", - status="status", - type=ArticlesListRequestType.EMPTY, + types="types", ) ``` @@ -35542,14 +35289,6 @@ client.knowledgebase.articles.list(
-**expand:** `typing.Optional[ArticlesListRequestExpand]` — 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/).
@@ -35574,7 +35313,7 @@ client.knowledgebase.articles.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**is_commonly_used_as_team:** `typing.Optional[str]` — If provided, specifies whether to return only Group objects which refer to a team in the third party platform. Note that this is an opinionated view based on how a team may be represented in the third party platform.
@@ -35582,7 +35321,7 @@ client.knowledgebase.articles.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -35590,7 +35329,7 @@ client.knowledgebase.articles.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -35598,7 +35337,7 @@ client.knowledgebase.articles.list(
-**parent_article_id:** `typing.Optional[str]` — If provided, will only return sub articles of the parent_article_id. +**names:** `typing.Optional[str]` — If provided, will only return groups with these names. Multiple values can be separated by commas.
@@ -35606,7 +35345,7 @@ client.knowledgebase.articles.list(
-**parent_container_id:** `typing.Optional[str]` — If provided, will only return sub articles of the parent_container_id. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -35614,7 +35353,7 @@ client.knowledgebase.articles.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**remote_fields:** `typing.Optional[typing.Literal["type"]]` — Deprecated. Use show_enum_origins.
@@ -35622,7 +35361,7 @@ client.knowledgebase.articles.list(
-**root_container_id:** `typing.Optional[str]` — If provided, will only return sub articles of the root_container_id. +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -35630,7 +35369,7 @@ client.knowledgebase.articles.list(
-**status:** `typing.Optional[str]` — If provided, will only return articles of the given status; multiple statuses can be separated by commas. +**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -35638,7 +35377,7 @@ client.knowledgebase.articles.list(
-**type:** `typing.Optional[ArticlesListRequestType]` — If provided, will only return articles of the given type. +**types:** `typing.Optional[str]` — If provided, will only return groups of these types. Multiple values can be separated by commas.
@@ -35658,7 +35397,7 @@ client.knowledgebase.articles.list(
-
client.knowledgebase.articles.retrieve(...) +
client.hris.groups.retrieve(...)
@@ -35670,7 +35409,7 @@ client.knowledgebase.articles.list(
-Returns an `Article` object with the given `id`. +Returns a `Group` object with the given `id`.
@@ -35686,17 +35425,13 @@ Returns an `Article` object with the given `id`. ```python from merge import Merge -from merge.resources.knowledgebase.resources.articles import ( - ArticlesRetrieveRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.articles.retrieve( +client.hris.groups.retrieve( id="id", - expand=ArticlesRetrieveRequestExpand.ATTACHMENTS, include_remote_data=True, include_shell_data=True, ) @@ -35723,7 +35458,7 @@ client.knowledgebase.articles.retrieve(
-**expand:** `typing.Optional[ArticlesRetrieveRequestExpand]` — 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.
@@ -35731,7 +35466,7 @@ client.knowledgebase.articles.retrieve(
-**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).
@@ -35739,7 +35474,15 @@ client.knowledgebase.articles.retrieve(
-**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). +**remote_fields:** `typing.Optional[typing.Literal["type"]]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[typing.Literal["type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -35759,8 +35502,8 @@ client.knowledgebase.articles.retrieve(
-## Knowledgebase AsyncPassthrough -
client.knowledgebase.async_passthrough.create(...) +## Hris Issues +
client.hris.issues.list(...)
@@ -35772,7 +35515,7 @@ client.knowledgebase.articles.retrieve(
-Asynchronously pull data from an endpoint not currently supported by Merge. +Gets all issues for Organization.
@@ -35787,18 +35530,38 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```python +import datetime + from merge import Merge -from merge.resources.knowledgebase import DataPassthroughRequest, MethodEnum +from merge.resources.hris.resources.issues import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.async_passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", +client.hris.issues.list( + account_token="account_token", + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + end_date="end_date", + end_user_organization_name="end_user_organization_name", + first_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + first_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_muted="include_muted", + integration_name="integration_name", + last_incident_time_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + last_incident_time_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", ), + linked_account_id="linked_account_id", + page_size=1, + start_date="start_date", + status=IssuesListRequestStatus.ONGOING, ) ``` @@ -35815,7 +35578,116 @@ client.knowledgebase.async_passthrough.create(
-**request:** `DataPassthroughRequest` +**account_token:** `typing.Optional[str]` + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time + +
+
+ +
+
+ +**end_user_organization_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. + +
+
+ +
+
+ +**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. + +
+
+ +
+
+ +**include_muted:** `typing.Optional[str]` — If true, will include muted issues + +
+
+ +
+
+ +**integration_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. + +
+
+ +
+
+ +**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. + +
+
+ +
+
+ +**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+ +
+
+ +**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time + +
+
+ +
+
+ +**status:** `typing.Optional[IssuesListRequestStatus]` + +Status of the issue. Options: ('ONGOING', 'RESOLVED') + +* `ONGOING` - ONGOING +* `RESOLVED` - RESOLVED
@@ -35835,7 +35707,7 @@ client.knowledgebase.async_passthrough.create(
-
client.knowledgebase.async_passthrough.retrieve(...) +
client.hris.issues.retrieve(...)
@@ -35847,7 +35719,7 @@ client.knowledgebase.async_passthrough.create(
-Retrieves data from earlier async-passthrough POST request +Get a specific issue.
@@ -35868,9 +35740,9 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.async_passthrough.retrieve( - async_passthrough_receipt_id="async_passthrough_receipt_id", -) +client.hris.issues.retrieve( + id="id", +) ``` @@ -35886,7 +35758,7 @@ client.knowledgebase.async_passthrough.retrieve(
-**async_passthrough_receipt_id:** `str` +**id:** `str`
@@ -35906,8 +35778,8 @@ client.knowledgebase.async_passthrough.retrieve(
-## Knowledgebase Attachments -
client.knowledgebase.attachments.list(...) +## Hris LinkToken +
client.hris.link_token.create(...)
@@ -35919,7 +35791,7 @@ client.knowledgebase.async_passthrough.retrieve(
-Returns a list of `Attachment` objects. +Creates a link token to be used when linking a new end user.
@@ -35934,33 +35806,18 @@ Returns a list of `Attachment` objects.
```python -import datetime - from merge import Merge +from merge.resources.hris import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.attachments.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, - include_remote_data=True, - include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", +client.hris.link_token.create( + end_user_email_address="example@gmail.com", + end_user_organization_name="Test Organization", + end_user_origin_id="12345", + categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], ) ``` @@ -35977,15 +35834,7 @@ client.knowledgebase.attachments.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. +**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
@@ -35993,7 +35842,7 @@ client.knowledgebase.attachments.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**end_user_organization_name:** `str` — Your end user's organization.
@@ -36001,7 +35850,7 @@ client.knowledgebase.attachments.list(
-**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/). +**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
@@ -36009,7 +35858,7 @@ client.knowledgebase.attachments.list(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. +**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link.
@@ -36017,7 +35866,7 @@ client.knowledgebase.attachments.list(
-**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). +**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
@@ -36025,7 +35874,7 @@ client.knowledgebase.attachments.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
@@ -36033,7 +35882,7 @@ client.knowledgebase.attachments.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -36041,7 +35890,7 @@ client.knowledgebase.attachments.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
@@ -36049,7 +35898,7 @@ client.knowledgebase.attachments.list(
-**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
@@ -36057,72 +35906,43 @@ client.knowledgebase.attachments.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**category_common_model_scopes:** `typing.Optional[ + typing.Dict[ + str, + typing.Optional[ + typing.Sequence[IndividualCommonModelScopeDeserializerRequest] + ], + ] +]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
-
-
- - - - -
-
client.knowledgebase.attachments.retrieve(...)
-#### 📝 Description - -
-
+**language:** `typing.Optional[EndUserDetailsRequestLanguage]` -
-
+The following subset of IETF language tags can be used to configure localization. -Returns an `Attachment` object with the given `id`. -
-
+* `en` - en +* `de` - de +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.attachments.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, -) - -``` -
-
+**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` +**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options.
@@ -36130,15 +35950,11 @@ client.knowledgebase.attachments.retrieve(
-**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. - -
-
+**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` -
-
+When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. -**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). +* `SELECTIVE_SYNC` - SELECTIVE_SYNC
@@ -36158,8 +35974,8 @@ client.knowledgebase.attachments.retrieve(
-## Knowledgebase AuditTrail -
client.knowledgebase.audit_trail.list(...) +## Hris LinkedAccounts +
client.hris.linked_accounts.list(...)
@@ -36171,7 +35987,7 @@ client.knowledgebase.attachments.retrieve(
-Gets a list of audit trail events. +List linked accounts for your organization.
@@ -36187,18 +36003,28 @@ Gets a list of audit trail events. ```python from merge import Merge +from merge.resources.hris.resources.linked_accounts import ( + LinkedAccountsListRequestCategory, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.audit_trail.list( +client.hris.linked_accounts.list( + category=LinkedAccountsListRequestCategory.ACCOUNTING, cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - event_type="event_type", + end_user_email_address="end_user_email_address", + end_user_organization_name="end_user_organization_name", + end_user_origin_id="end_user_origin_id", + end_user_origin_ids="end_user_origin_ids", + id="id", + ids="ids", + include_duplicates=True, + integration_name="integration_name", + is_test_account="is_test_account", page_size=1, - start_date="start_date", - user_email="user_email", + status="status", ) ``` @@ -36215,7 +36041,17 @@ client.knowledgebase.audit_trail.list(
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**category:** `typing.Optional[LinkedAccountsListRequestCategory]` + +Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + +* `hris` - hris +* `ats` - ats +* `accounting` - accounting +* `ticketing` - ticketing +* `crm` - crm +* `mktg` - mktg +* `filestorage` - filestorage
@@ -36223,7 +36059,7 @@ client.knowledgebase.audit_trail.list(
-**end_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred before this time +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -36231,7 +36067,7 @@ client.knowledgebase.audit_trail.list(
-**event_type:** `typing.Optional[str]` — If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` +**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address.
@@ -36239,7 +36075,7 @@ client.knowledgebase.audit_trail.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. +**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name.
@@ -36247,7 +36083,7 @@ client.knowledgebase.audit_trail.list(
-**start_date:** `typing.Optional[str]` — If included, will only include audit trail events that occurred after this time +**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID.
@@ -36255,7 +36091,7 @@ client.knowledgebase.audit_trail.list(
-**user_email:** `typing.Optional[str]` — If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. +**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.
@@ -36263,65 +36099,59 @@ client.knowledgebase.audit_trail.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**id:** `typing.Optional[str]`
- -
+
+
+**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. +
-
-## Knowledgebase AvailableActions -
client.knowledgebase.available_actions.retrieve()
-#### 📝 Description - -
-
+**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. + +
+
-Returns a list of models and actions available for an account. -
-
+**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. +
-#### 🔌 Usage -
+**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. + +
+
+
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.available_actions.retrieve() - -``` -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + -#### ⚙️ Parameters -
+**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` + +
+
+
@@ -36337,8 +36167,8 @@ client.knowledgebase.available_actions.retrieve()
-## Knowledgebase Containers -
client.knowledgebase.containers.list(...) +## Hris Locations +
client.hris.locations.list(...)
@@ -36350,7 +36180,7 @@ client.knowledgebase.available_actions.retrieve()
-Returns a list of `Container` objects. +Returns a list of `Location` objects.
@@ -36368,16 +36198,17 @@ Returns a list of `Container` objects. import datetime from merge import Merge -from merge.resources.knowledgebase.resources.containers import ( - ContainersListRequestExpand, - ContainersListRequestType, +from merge.resources.hris.resources.locations import ( + LocationsListRequestLocationType, + LocationsListRequestRemoteFields, + LocationsListRequestShowEnumOrigins, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.containers.list( +client.hris.locations.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -36385,10 +36216,10 @@ client.knowledgebase.containers.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - expand=ContainersListRequestExpand.PARENT_ARTICLE, include_deleted_data=True, include_remote_data=True, include_shell_data=True, + location_type=LocationsListRequestLocationType.HOME, modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -36396,10 +36227,9 @@ client.knowledgebase.containers.list( "2024-01-15 09:30:00+00:00", ), page_size=1, - parent_article_id="parent_article_id", - parent_container_id="parent_container_id", + remote_fields=LocationsListRequestRemoteFields.COUNTRY, remote_id="remote_id", - type=ContainersListRequestType.EMPTY, + show_enum_origins=LocationsListRequestShowEnumOrigins.COUNTRY, ) ``` @@ -36440,14 +36270,6 @@ client.knowledgebase.containers.list(
-**expand:** `typing.Optional[ContainersListRequestExpand]` — 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/).
@@ -36472,7 +36294,12 @@ client.knowledgebase.containers.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +**location_type:** `typing.Optional[LocationsListRequestLocationType]` + +If provided, will only return locations with this location type + +* `HOME` - HOME +* `WORK` - WORK
@@ -36480,7 +36307,7 @@ client.knowledgebase.containers.list(
-**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -36488,7 +36315,7 @@ client.knowledgebase.containers.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -36496,7 +36323,7 @@ client.knowledgebase.containers.list(
-**parent_article_id:** `typing.Optional[str]` — If provided, will only return sub containers of the parent_article_id. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -36504,7 +36331,7 @@ client.knowledgebase.containers.list(
-**parent_container_id:** `typing.Optional[str]` — If provided, will only return sub containers of the parent_container_id. +**remote_fields:** `typing.Optional[LocationsListRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -36520,7 +36347,7 @@ client.knowledgebase.containers.list(
-**type:** `typing.Optional[ContainersListRequestType]` — If provided, will only return containers of the given type. +**show_enum_origins:** `typing.Optional[LocationsListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -36540,7 +36367,7 @@ client.knowledgebase.containers.list(
-
client.knowledgebase.containers.retrieve(...) +
client.hris.locations.retrieve(...)
@@ -36552,7 +36379,7 @@ client.knowledgebase.containers.list(
-Returns a `Container` object with the given `id`. +Returns a `Location` object with the given `id`.
@@ -36568,19 +36395,21 @@ Returns a `Container` object with the given `id`. ```python from merge import Merge -from merge.resources.knowledgebase.resources.containers import ( - ContainersRetrieveRequestExpand, +from merge.resources.hris.resources.locations import ( + LocationsRetrieveRequestRemoteFields, + LocationsRetrieveRequestShowEnumOrigins, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.containers.retrieve( +client.hris.locations.retrieve( id="id", - expand=ContainersRetrieveRequestExpand.PARENT_ARTICLE, include_remote_data=True, include_shell_data=True, + remote_fields=LocationsRetrieveRequestRemoteFields.COUNTRY, + show_enum_origins=LocationsRetrieveRequestShowEnumOrigins.COUNTRY, ) ``` @@ -36605,7 +36434,7 @@ client.knowledgebase.containers.retrieve(
-**expand:** `typing.Optional[ContainersRetrieveRequestExpand]` — 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.
@@ -36613,7 +36442,7 @@ client.knowledgebase.containers.retrieve(
-**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).
@@ -36621,7 +36450,15 @@ client.knowledgebase.containers.retrieve(
-**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). +**remote_fields:** `typing.Optional[LocationsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[LocationsRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -36641,8 +36478,8 @@ client.knowledgebase.containers.retrieve(
-## Knowledgebase Scopes -
client.knowledgebase.scopes.default_scopes_retrieve() +## Hris Passthrough +
client.hris.passthrough.create(...)
@@ -36654,7 +36491,7 @@ client.knowledgebase.containers.retrieve(
-Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Pull data from an endpoint not currently supported by Merge.
@@ -36670,12 +36507,18 @@ Get the default permissions for Merge Common Models and fields across all Linked ```python from merge import Merge +from merge.resources.hris import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.scopes.default_scopes_retrieve() +client.hris.passthrough.create( + request=DataPassthroughRequest( + method=MethodEnum.GET, + path="/scooters", + ), +) ``` @@ -36691,6 +36534,14 @@ client.knowledgebase.scopes.default_scopes_retrieve()
+**request:** `DataPassthroughRequest` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -36703,7 +36554,8 @@ client.knowledgebase.scopes.default_scopes_retrieve()
-
client.knowledgebase.scopes.linked_account_scopes_retrieve() +## Hris PayGroups +
client.hris.pay_groups.list(...)
@@ -36715,7 +36567,7 @@ client.knowledgebase.scopes.default_scopes_retrieve()
-Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Returns a list of `PayGroup` objects.
@@ -36730,13 +36582,34 @@ Get all available permissions for Merge Common Models and fields for a single Li
```python +import datetime + from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.scopes.linked_account_scopes_retrieve() +client.hris.pay_groups.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_id="remote_id", +) ```
@@ -36752,99 +36625,39 @@ client.knowledgebase.scopes.linked_account_scopes_retrieve()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
- -
- - - - -
-
client.knowledgebase.scopes.linked_account_scopes_create(...)
-#### 📝 Description - -
-
+**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. + +
+
-Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) -
-
+**cursor:** `typing.Optional[str]` — The pagination cursor value. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge -from merge.resources.knowledgebase import ( - FieldPermissionDeserializerRequest, - IndividualCommonModelScopeDeserializerRequest, - ModelPermissionDeserializerRequest, -) - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.scopes.linked_account_scopes_create( - common_models=[ - IndividualCommonModelScopeDeserializerRequest( - model_name="Employee", - model_permissions={ - "READ": ModelPermissionDeserializerRequest( - is_enabled=True, - ), - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ), - }, - field_permissions=FieldPermissionDeserializerRequest( - enabled_fields=["avatar", "home_location"], - disabled_fields=["work_location"], - ), - ), - IndividualCommonModelScopeDeserializerRequest( - model_name="Benefit", - model_permissions={ - "WRITE": ModelPermissionDeserializerRequest( - is_enabled=False, - ) - }, - ), - ], -) - -``` -
-
+**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/). +
-#### ⚙️ Parameters - -
-
-
-**common_models:** `typing.Sequence[IndividualCommonModelScopeDeserializerRequest]` — The common models you want to update the scopes for +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -36852,65 +36665,43 @@ client.knowledgebase.scopes.linked_account_scopes_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**include_shell_data:** `typing.Optional[bool]` — Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
-
-
+
+
+**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. +
-
-## Knowledgebase DeleteAccount -
client.knowledgebase.delete_account.delete()
-#### 📝 Description - -
-
+**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. + +
+
-Delete a linked account. -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +
-#### 🔌 Usage - -
-
-
-```python -from merge import Merge - -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.delete_account.delete() - -``` -
-
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. +
-#### ⚙️ Parameters - -
-
-
@@ -36926,8 +36717,7 @@ client.knowledgebase.delete_account.delete()
-## Knowledgebase FieldMapping -
client.knowledgebase.field_mapping.field_mappings_retrieve(...) +
client.hris.pay_groups.retrieve(...)
@@ -36939,7 +36729,7 @@ client.knowledgebase.delete_account.delete()
-Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Returns a `PayGroup` object with the given `id`.
@@ -36960,8 +36750,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.field_mappings_retrieve( - exclude_remote_field_metadata=True, +client.hris.pay_groups.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -36970,15 +36762,31 @@ client.knowledgebase.field_mapping.field_mappings_retrieve(
-#### ⚙️ Parameters - +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` + +
+
+
+**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**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).
@@ -36998,7 +36806,8 @@ client.knowledgebase.field_mapping.field_mappings_retrieve(
-
client.knowledgebase.field_mapping.field_mappings_create(...) +## Hris PayrollRuns +
client.hris.payroll_runs.list(...)
@@ -37010,7 +36819,7 @@ client.knowledgebase.field_mapping.field_mappings_retrieve(
-Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a list of `PayrollRun` objects.
@@ -37025,20 +36834,53 @@ Create new Field Mappings that will be available after the next scheduled sync.
```python +import datetime + from merge import Merge +from merge.resources.hris.resources.payroll_runs import ( + PayrollRunsListRequestRemoteFields, + PayrollRunsListRequestRunType, + PayrollRunsListRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.field_mappings_create( - exclude_remote_field_metadata=True, - target_field_name="example_target_field_name", - target_field_description="this is a example description of the target field", - remote_field_traversal_path=["example_remote_field"], - remote_method="GET", - remote_url_path="/example-url-path", - common_model_name="ExampleCommonModel", +client.hris.payroll_runs.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + page_size=1, + remote_fields=PayrollRunsListRequestRemoteFields.RUN_STATE, + remote_id="remote_id", + run_type=PayrollRunsListRequestRunType.CORRECTION, + show_enum_origins=PayrollRunsListRequestShowEnumOrigins.RUN_STATE, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -37055,7 +36897,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**target_field_name:** `str` — The name of the target field you want this remote field to map to. +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -37063,7 +36905,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**target_field_description:** `str` — The description of the target field you want this remote field to map to. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -37071,7 +36913,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**remote_field_traversal_path:** `typing.Sequence[typing.Optional[typing.Any]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**cursor:** `typing.Optional[str]` — The pagination cursor value.
@@ -37079,7 +36921,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**remote_method:** `str` — The method of the remote endpoint where the remote field is coming from. +**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs ended after this datetime.
@@ -37087,7 +36929,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**remote_url_path:** `str` — The path of the remote endpoint where the remote field is coming from. +**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs ended before this datetime.
@@ -37095,7 +36937,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**common_model_name:** `str` — The name of the Common Model that the remote field corresponds to in a given category. +**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/).
@@ -37103,7 +36945,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**exclude_remote_field_metadata:** `typing.Optional[bool]` — If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -37111,7 +36953,7 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. +**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).
@@ -37119,70 +36961,79 @@ client.knowledgebase.field_mapping.field_mappings_create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
-
-
+
+
+**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +
-
-
client.knowledgebase.field_mapping.field_mappings_destroy(...)
-#### 📝 Description - -
-
+**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
-Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -
-
+**remote_fields:** `typing.Optional[PayrollRunsListRequestRemoteFields]` — Deprecated. Use show_enum_origins. +
-#### 🔌 Usage -
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+
-```python -from merge import Merge +**run_type:** `typing.Optional[PayrollRunsListRequestRunType]` -client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.field_mapping.field_mappings_destroy( - field_mapping_id="field_mapping_id", -) +If provided, will only return PayrollRun's with this status. Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', 'SIGN_ON_BONUS') -``` +* `REGULAR` - REGULAR +* `OFF_CYCLE` - OFF_CYCLE +* `CORRECTION` - CORRECTION +* `TERMINATION` - TERMINATION +* `SIGN_ON_BONUS` - SIGN_ON_BONUS +
+ +
+
+ +**show_enum_origins:** `typing.Optional[PayrollRunsListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) +
-#### ⚙️ Parameters -
+**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs started after this datetime. + +
+
+
-**field_mapping_id:** `str` +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return payroll runs started before this datetime.
@@ -37202,7 +37053,7 @@ client.knowledgebase.field_mapping.field_mappings_destroy(
-
client.knowledgebase.field_mapping.field_mappings_partial_update(...) +
client.hris.payroll_runs.retrieve(...)
@@ -37214,7 +37065,7 @@ client.knowledgebase.field_mapping.field_mappings_destroy(
-Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. +Returns a `PayrollRun` object with the given `id`.
@@ -37230,13 +37081,21 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r ```python from merge import Merge +from merge.resources.hris.resources.payroll_runs import ( + PayrollRunsRetrieveRequestRemoteFields, + PayrollRunsRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.field_mappings_partial_update( - field_mapping_id="field_mapping_id", +client.hris.payroll_runs.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, + remote_fields=PayrollRunsRetrieveRequestRemoteFields.RUN_STATE, + show_enum_origins=PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE, ) ``` @@ -37253,7 +37112,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**field_mapping_id:** `str` +**id:** `str`
@@ -37261,7 +37120,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**remote_field_traversal_path:** `typing.Optional[typing.Sequence[typing.Optional[typing.Any]]]` — The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -37269,7 +37128,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**remote_method:** `typing.Optional[str]` — The method of the remote endpoint where the remote field is coming from. +**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).
@@ -37277,7 +37136,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**remote_url_path:** `typing.Optional[str]` — The path of the remote endpoint where the remote field is coming from. +**remote_fields:** `typing.Optional[PayrollRunsRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -37285,7 +37144,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-**jmes_path:** `typing.Optional[str]` — JMES path to specify json query expression to be used on field mapping. +**show_enum_origins:** `typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -37305,7 +37164,8 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-
client.knowledgebase.field_mapping.remote_fields_retrieve(...) +## Hris RegenerateKey +
client.hris.regenerate_key.create(...)
@@ -37317,7 +37177,7 @@ client.knowledgebase.field_mapping.field_mappings_partial_update(
-Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). +Exchange remote keys.
@@ -37338,9 +37198,8 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.remote_fields_retrieve( - common_models="common_models", - include_example_values="include_example_values", +client.hris.regenerate_key.create( + name="Remote Deployment Key 1", ) ``` @@ -37357,15 +37216,7 @@ client.knowledgebase.field_mapping.remote_fields_retrieve(
-**common_models:** `typing.Optional[str]` — A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - -
-
- -
-
- -**include_example_values:** `typing.Optional[str]` — If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. +**name:** `str` — The name of the remote key
@@ -37385,7 +37236,8 @@ client.knowledgebase.field_mapping.remote_fields_retrieve(
-
client.knowledgebase.field_mapping.target_fields_retrieve() +## Hris SyncStatus +
client.hris.sync_status.list(...)
@@ -37397,7 +37249,7 @@ client.knowledgebase.field_mapping.remote_fields_retrieve(
-Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). +Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
@@ -37418,7 +37270,10 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.field_mapping.target_fields_retrieve() +client.hris.sync_status.list( + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + page_size=1, +) ``` @@ -37434,6 +37289,22 @@ client.knowledgebase.field_mapping.target_fields_retrieve()
+**cursor:** `typing.Optional[str]` — The pagination cursor value. + +
+
+ +
+
+ +**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.
@@ -37446,8 +37317,8 @@ client.knowledgebase.field_mapping.target_fields_retrieve()
-## Knowledgebase GenerateKey -
client.knowledgebase.generate_key.create(...) +## Hris ForceResync +
client.hris.force_resync.sync_status_resync_create()
@@ -37459,7 +37330,7 @@ client.knowledgebase.field_mapping.target_fields_retrieve()
-Create a remote key. +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -37480,9 +37351,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.generate_key.create( - name="Remote Deployment Key 1", -) +client.hris.force_resync.sync_status_resync_create() ``` @@ -37498,14 +37367,6 @@ client.knowledgebase.generate_key.create(
-**name:** `str` — The name of the remote key - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -37518,8 +37379,8 @@ client.knowledgebase.generate_key.create(
-## Knowledgebase Groups -
client.knowledgebase.groups.list(...) +## Hris Teams +
client.hris.teams.list(...)
@@ -37531,7 +37392,7 @@ client.knowledgebase.generate_key.create(
-Returns a list of `Group` objects. +Returns a list of `Team` objects.
@@ -37549,15 +37410,12 @@ Returns a list of `Group` objects. import datetime from merge import Merge -from merge.resources.knowledgebase.resources.groups import ( - GroupsListRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.groups.list( +client.hris.teams.list( created_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), @@ -37565,7 +37423,6 @@ client.knowledgebase.groups.list( "2024-01-15 09:30:00+00:00", ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - expand=GroupsListRequestExpand.PARENT_GROUP, include_deleted_data=True, include_remote_data=True, include_shell_data=True, @@ -37576,6 +37433,7 @@ client.knowledgebase.groups.list( "2024-01-15 09:30:00+00:00", ), page_size=1, + parent_team_id="parent_team_id", remote_id="remote_id", ) @@ -37617,7 +37475,7 @@ client.knowledgebase.groups.list(
-**expand:** `typing.Optional[GroupsListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[typing.Literal["parent_team"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -37673,6 +37531,14 @@ client.knowledgebase.groups.list(
+**parent_team_id:** `typing.Optional[str]` — If provided, will only return teams with this parent team. + +
+
+ +
+
+ **remote_id:** `typing.Optional[str]` — The API provider's ID for the given object.
@@ -37693,7 +37559,7 @@ client.knowledgebase.groups.list(
-
client.knowledgebase.groups.retrieve(...) +
client.hris.teams.retrieve(...)
@@ -37705,7 +37571,7 @@ client.knowledgebase.groups.list(
-Returns a `Group` object with the given `id`. +Returns a `Team` object with the given `id`.
@@ -37721,17 +37587,13 @@ Returns a `Group` object with the given `id`. ```python from merge import Merge -from merge.resources.knowledgebase.resources.groups import ( - GroupsRetrieveRequestExpand, -) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.groups.retrieve( +client.hris.teams.retrieve( id="id", - expand=GroupsRetrieveRequestExpand.PARENT_GROUP, include_remote_data=True, include_shell_data=True, ) @@ -37758,7 +37620,7 @@ client.knowledgebase.groups.retrieve(
-**expand:** `typing.Optional[GroupsRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +**expand:** `typing.Optional[typing.Literal["parent_team"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -37794,8 +37656,8 @@ client.knowledgebase.groups.retrieve(
-## Knowledgebase Issues -
client.knowledgebase.issues.list(...) +## Hris TimeOff +
client.hris.time_off.list(...)
@@ -37807,7 +37669,7 @@ client.knowledgebase.groups.retrieve(
-Gets all issues for Organization. +Returns a list of `TimeOff` objects.
@@ -37825,37 +37687,56 @@ Gets all issues for Organization. import datetime from merge import Merge -from merge.resources.knowledgebase.resources.issues import ( - IssuesListRequestStatus, +from merge.resources.hris.resources.time_off import ( + TimeOffListRequestExpand, + TimeOffListRequestRemoteFields, + TimeOffListRequestRequestType, + TimeOffListRequestShowEnumOrigins, + TimeOffListRequestStatus, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.issues.list( - account_token="account_token", +client.hris.time_off.list( + approver_id="approver_id", + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_date="end_date", - end_user_organization_name="end_user_organization_name", - first_incident_time_after=datetime.datetime.fromisoformat( + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - first_incident_time_before=datetime.datetime.fromisoformat( + ended_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - include_muted="include_muted", - integration_name="integration_name", - last_incident_time_after=datetime.datetime.fromisoformat( + expand=TimeOffListRequestExpand.APPROVER, + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - last_incident_time_before=datetime.datetime.fromisoformat( + modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), - linked_account_id="linked_account_id", page_size=1, - start_date="start_date", - status=IssuesListRequestStatus.ONGOING, + remote_fields=TimeOffListRequestRemoteFields.REQUEST_TYPE, + remote_id="remote_id", + request_type=TimeOffListRequestRequestType.BEREAVEMENT, + show_enum_origins=TimeOffListRequestShowEnumOrigins.REQUEST_TYPE, + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + status=TimeOffListRequestStatus.APPROVED, ) ``` @@ -37872,7 +37753,23 @@ client.knowledgebase.issues.list(
-**account_token:** `typing.Optional[str]` +**approver_id:** `typing.Optional[str]` — If provided, will only return time off for this approver. + +
+
+ +
+
+ +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
+ +
+
+ +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -37888,7 +37785,7 @@ client.knowledgebase.issues.list(
-**end_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred before this time +**employee_id:** `typing.Optional[str]` — If provided, will only return time off for this employee.
@@ -37896,7 +37793,7 @@ client.knowledgebase.issues.list(
-**end_user_organization_name:** `typing.Optional[str]` +**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return employees that ended after this datetime.
@@ -37904,7 +37801,7 @@ client.knowledgebase.issues.list(
-**first_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was after this datetime. +**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that ended before this datetime.
@@ -37912,7 +37809,7 @@ client.knowledgebase.issues.list(
-**first_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose first incident time was before this datetime. +**expand:** `typing.Optional[TimeOffListRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -37920,7 +37817,7 @@ client.knowledgebase.issues.list(
-**include_muted:** `typing.Optional[str]` — If true, will include muted issues +**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/).
@@ -37928,7 +37825,7 @@ client.knowledgebase.issues.list(
-**integration_name:** `typing.Optional[str]` +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -37936,7 +37833,7 @@ client.knowledgebase.issues.list(
-**last_incident_time_after:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was after this datetime. +**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).
@@ -37944,7 +37841,7 @@ client.knowledgebase.issues.list(
-**last_incident_time_before:** `typing.Optional[dt.datetime]` — If provided, will only return issues whose last incident time was before this datetime. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -37952,7 +37849,7 @@ client.knowledgebase.issues.list(
-**linked_account_id:** `typing.Optional[str]` — If provided, will only include issues pertaining to the linked account passed in. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -37968,7 +37865,7 @@ client.knowledgebase.issues.list(
-**start_date:** `typing.Optional[str]` — If included, will only include issues whose most recent action occurred after this time +**remote_fields:** `typing.Optional[TimeOffListRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -37976,12 +37873,64 @@ client.knowledgebase.issues.list(
-**status:** `typing.Optional[IssuesListRequestStatus]` +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
-Status of the issue. Options: ('ONGOING', 'RESOLVED') +
+
-* `ONGOING` - ONGOING -* `RESOLVED` - RESOLVED +**request_type:** `typing.Optional[TimeOffListRequestRequestType]` + +If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') + +* `VACATION` - VACATION +* `SICK` - SICK +* `PERSONAL` - PERSONAL +* `JURY_DUTY` - JURY_DUTY +* `VOLUNTEER` - VOLUNTEER +* `BEREAVEMENT` - BEREAVEMENT + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[TimeOffListRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + +
+
+ +
+
+ +**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that started after this datetime. + +
+
+ +
+
+ +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return time-offs that started before this datetime. + +
+
+ +
+
+ +**status:** `typing.Optional[TimeOffListRequestStatus]` + +If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') + +* `REQUESTED` - REQUESTED +* `APPROVED` - APPROVED +* `DECLINED` - DECLINED +* `CANCELLED` - CANCELLED +* `DELETED` - DELETED
@@ -38001,7 +37950,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-
client.knowledgebase.issues.retrieve(...) +
client.hris.time_off.create(...)
@@ -38013,7 +37962,7 @@ Status of the issue. Options: ('ONGOING', 'RESOLVED')
-Get a specific issue. +Creates a `TimeOff` object with the given values.
@@ -38029,13 +37978,16 @@ Get a specific issue. ```python from merge import Merge +from merge.resources.hris import TimeOffRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.issues.retrieve( - id="id", +client.hris.time_off.create( + is_debug_mode=True, + run_async=True, + model=TimeOffRequest(), ) ``` @@ -38052,7 +38004,23 @@ client.knowledgebase.issues.retrieve(
-**id:** `str` +**model:** `TimeOffRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously.
@@ -38072,8 +38040,7 @@ client.knowledgebase.issues.retrieve(
-## Knowledgebase LinkToken -
client.knowledgebase.link_token.create(...) +
client.hris.time_off.retrieve(...)
@@ -38085,7 +38052,7 @@ client.knowledgebase.issues.retrieve(
-Creates a link token to be used when linking a new end user. +Returns a `TimeOff` object with the given `id`.
@@ -38101,17 +38068,23 @@ Creates a link token to be used when linking a new end user. ```python from merge import Merge -from merge.resources.knowledgebase import CategoriesEnum +from merge.resources.hris.resources.time_off import ( + TimeOffRetrieveRequestExpand, + TimeOffRetrieveRequestRemoteFields, + TimeOffRetrieveRequestShowEnumOrigins, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.link_token.create( - end_user_email_address="example@gmail.com", - end_user_organization_name="Test Organization", - end_user_origin_id="12345", - categories=[CategoriesEnum.HRIS, CategoriesEnum.ATS], +client.hris.time_off.retrieve( + id="id", + expand=TimeOffRetrieveRequestExpand.APPROVER, + include_remote_data=True, + include_shell_data=True, + remote_fields=TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE, + show_enum_origins=TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE, ) ``` @@ -38128,39 +38101,7 @@ client.knowledgebase.link_token.create(
-**end_user_email_address:** `str` — Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. - -
-
- -
-
- -**end_user_organization_name:** `str` — Your end user's organization. - -
-
- -
-
- -**end_user_origin_id:** `str` — This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - -
-
- -
-
- -**categories:** `typing.Sequence[CategoriesEnum]` — The integration categories to show in Merge Link. - -
-
- -
-
- -**integration:** `typing.Optional[str]` — The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. +**id:** `str`
@@ -38168,7 +38109,7 @@ client.knowledgebase.link_token.create(
-**link_expiry_mins:** `typing.Optional[int]` — An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. +**expand:** `typing.Optional[TimeOffRetrieveRequestExpand]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -38176,7 +38117,7 @@ client.knowledgebase.link_token.create(
-**should_create_magic_link_url:** `typing.Optional[bool]` — Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -38184,7 +38125,7 @@ client.knowledgebase.link_token.create(
-**hide_admin_magic_link:** `typing.Optional[bool]` — Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. +**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).
@@ -38192,7 +38133,7 @@ client.knowledgebase.link_token.create(
-**common_models:** `typing.Optional[typing.Sequence[CommonModelScopesBodyRequest]]` — An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. +**remote_fields:** `typing.Optional[TimeOffRetrieveRequestRemoteFields]` — Deprecated. Use show_enum_origins.
@@ -38200,14 +38141,7 @@ client.knowledgebase.link_token.create(
-**category_common_model_scopes:** `typing.Optional[ - typing.Dict[ - str, - typing.Optional[ - typing.Sequence[IndividualCommonModelScopeDeserializerRequest] - ], - ] -]` — When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. +**show_enum_origins:** `typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -38215,44 +38149,64 @@ client.knowledgebase.link_token.create(
-**language:** `typing.Optional[EndUserDetailsRequestLanguage]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
-The following subset of IETF language tags can be used to configure localization. -* `en` - en -* `de` - de - +
+
client.hris.time_off.meta_post_retrieve()
-**are_syncs_disabled:** `typing.Optional[bool]` — The boolean that indicates whether initial, periodic, and force syncs will be disabled. - -
-
+#### 📝 Description
-**integration_specific_config:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A JSON object containing integration-specific configuration options. - +
+
+ +Returns metadata for `TimeOff` POSTs. +
+
+#### 🔌 Usage +
-**completed_account_initial_screen:** `typing.Optional[EndUserDetailsRequestCompletedAccountInitialScreen]` +
+
-When creating a Link token, you can specifiy the initial screen of Linking Flow for a completed Linked Account. +```python +from merge import Merge -* `SELECTIVE_SYNC` - SELECTIVE_SYNC - +client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", +) +client.hris.time_off.meta_post_retrieve() + +``` +
+
+#### ⚙️ Parameters + +
+
+
@@ -38268,8 +38222,8 @@ When creating a Link token, you can specifiy the initial screen of Linking Flow
-## Knowledgebase LinkedAccounts -
client.knowledgebase.linked_accounts.list(...) +## Hris TimeOffBalances +
client.hris.time_off_balances.list(...)
@@ -38281,7 +38235,7 @@ When creating a Link token, you can specifiy the initial screen of Linking Flow
-List linked accounts for your organization. +Returns a list of `TimeOffBalance` objects.
@@ -38296,29 +38250,38 @@ List linked accounts for your organization.
```python +import datetime + from merge import Merge -from merge.resources.knowledgebase.resources.linked_accounts import ( - LinkedAccountsListRequestCategory, +from merge.resources.hris.resources.time_off_balances import ( + TimeOffBalancesListRequestPolicyType, ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, +client.hris.time_off_balances.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - end_user_email_address="end_user_email_address", - end_user_organization_name="end_user_organization_name", - end_user_origin_id="end_user_origin_id", - end_user_origin_ids="end_user_origin_ids", - id="id", - ids="ids", - include_duplicates=True, - integration_name="integration_name", - is_test_account="is_test_account", + employee_id="employee_id", + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), page_size=1, - status="status", + policy_type=TimeOffBalancesListRequestPolicyType.BEREAVEMENT, + remote_id="remote_id", ) ``` @@ -38335,18 +38298,15 @@ client.knowledgebase.linked_accounts.list(
-**category:** `typing.Optional[LinkedAccountsListRequestCategory]` +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. + +
+
-Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` +
+
-* `hris` - hris -* `ats` - ats -* `accounting` - accounting -* `ticketing` - ticketing -* `crm` - crm -* `mktg` - mktg -* `filestorage` - filestorage -* `knowledgebase` - knowledgebase +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
@@ -38362,7 +38322,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**end_user_email_address:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given email address. +**employee_id:** `typing.Optional[str]` — If provided, will only return time off balances for this employee.
@@ -38370,7 +38330,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**end_user_organization_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given organization name. +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -38378,7 +38338,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**end_user_origin_id:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given origin ID. +**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/).
@@ -38386,7 +38346,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**end_user_origin_ids:** `typing.Optional[str]` — Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models.
@@ -38394,7 +38354,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**id:** `typing.Optional[str]` +**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).
@@ -38402,7 +38362,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**ids:** `typing.Optional[str]` — Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned.
@@ -38410,7 +38370,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**include_duplicates:** `typing.Optional[bool]` — If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned.
@@ -38418,7 +38378,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**integration_name:** `typing.Optional[str]` — If provided, will only return linked accounts associated with the given integration name. +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100.
@@ -38426,7 +38386,16 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**is_test_account:** `typing.Optional[str]` — If included, will only include test linked accounts. If not included, will only include non-test linked accounts. +**policy_type:** `typing.Optional[TimeOffBalancesListRequestPolicyType]` + +If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') + +* `VACATION` - VACATION +* `SICK` - SICK +* `PERSONAL` - PERSONAL +* `JURY_DUTY` - JURY_DUTY +* `VOLUNTEER` - VOLUNTEER +* `BEREAVEMENT` - BEREAVEMENT
@@ -38434,7 +38403,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` — Deprecated. Use show_enum_origins.
@@ -38442,7 +38411,15 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-**status:** `typing.Optional[str]` — Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` +**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[typing.Literal["policy_type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -38462,8 +38439,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-## Knowledgebase Passthrough -
client.knowledgebase.passthrough.create(...) +
client.hris.time_off_balances.retrieve(...)
@@ -38475,7 +38451,7 @@ Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mk
-Pull data from an endpoint not currently supported by Merge. +Returns a `TimeOffBalance` object with the given `id`.
@@ -38491,17 +38467,15 @@ Pull data from an endpoint not currently supported by Merge. ```python from merge import Merge -from merge.resources.knowledgebase import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.passthrough.create( - request=DataPassthroughRequest( - method=MethodEnum.GET, - path="/scooters", - ), +client.hris.time_off_balances.retrieve( + id="id", + include_remote_data=True, + include_shell_data=True, ) ``` @@ -38518,7 +38492,47 @@ client.knowledgebase.passthrough.create(
-**request:** `DataPassthroughRequest` +**id:** `str` + +
+
+ +
+
+ +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + +
+
+ +
+
+ +**include_remote_data:** `typing.Optional[bool]` — Whether to include the original data Merge fetched from the third-party to produce these models. + +
+
+ +
+
+ +**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). + +
+
+ +
+
+ +**remote_fields:** `typing.Optional[typing.Literal["policy_type"]]` — Deprecated. Use show_enum_origins. + +
+
+ +
+
+ +**show_enum_origins:** `typing.Optional[typing.Literal["policy_type"]]` — A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
@@ -38538,8 +38552,8 @@ client.knowledgebase.passthrough.create(
-## Knowledgebase RegenerateKey -
client.knowledgebase.regenerate_key.create(...) +## Hris TimesheetEntries +
client.hris.timesheet_entries.list(...)
@@ -38551,7 +38565,7 @@ client.knowledgebase.passthrough.create(
-Exchange remote keys. +Returns a list of `TimesheetEntry` objects.
@@ -38566,14 +38580,50 @@ Exchange remote keys.
```python +import datetime + from merge import Merge +from merge.resources.hris.resources.timesheet_entries import ( + TimesheetEntriesListRequestOrderBy, +) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.regenerate_key.create( - name="Remote Deployment Key 1", +client.hris.timesheet_entries.list( + created_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + created_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + employee_id="employee_id", + ended_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ended_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + include_deleted_data=True, + include_remote_data=True, + include_shell_data=True, + modified_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + modified_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + order_by=TimesheetEntriesListRequestOrderBy.START_TIME_DESCENDING, + page_size=1, + remote_id="remote_id", + started_after=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + started_before=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), ) ``` @@ -38590,7 +38640,7 @@ client.knowledgebase.regenerate_key.create(
-**name:** `str` — The name of the remote key +**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime.
@@ -38598,72 +38648,119 @@ client.knowledgebase.regenerate_key.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime.
+ +
+
+ +**cursor:** `typing.Optional[str]` — The pagination cursor value. +
+
+
+**employee_id:** `typing.Optional[str]` — If provided, will only return timesheet entries for this employee. +
-
-## Knowledgebase SyncStatus -
client.knowledgebase.sync_status.list(...)
-#### 📝 Description +**ended_after:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries ended after this datetime. + +
+
+**ended_before:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries ended before this datetime. + +
+
+
-Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. +
+ +
+
+ +**include_deleted_data:** `typing.Optional[bool]` — 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/). +
-#### 🔌 Usage +
+
+ +**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). + +
+
+
-```python -from merge import Merge +**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. + +
+
-client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", -) -client.knowledgebase.sync_status.list( - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - page_size=1, -) +
+
-``` +**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. +
+ +
+
+ +**order_by:** `typing.Optional[TimesheetEntriesListRequestOrderBy]` — Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. +
-#### ⚙️ Parameters +
+
+ +**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. + +
+
+**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. + +
+
+
-**cursor:** `typing.Optional[str]` — The pagination cursor value. +**started_after:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries started after this datetime.
@@ -38671,7 +38768,7 @@ client.knowledgebase.sync_status.list(
-**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. +**started_before:** `typing.Optional[dt.datetime]` — If provided, will only return timesheet entries started before this datetime.
@@ -38691,8 +38788,7 @@ client.knowledgebase.sync_status.list(
-## Knowledgebase ForceResync -
client.knowledgebase.force_resync.sync_status_resync_create() +
client.hris.timesheet_entries.create(...)
@@ -38704,7 +38800,7 @@ client.knowledgebase.sync_status.list(
-Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +Creates a `TimesheetEntry` object with the given values.
@@ -38720,12 +38816,17 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly, ```python from merge import Merge +from merge.resources.hris import TimesheetEntryRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.force_resync.sync_status_resync_create() +client.hris.timesheet_entries.create( + is_debug_mode=True, + run_async=True, + model=TimesheetEntryRequest(), +) ``` @@ -38741,6 +38842,30 @@ client.knowledgebase.force_resync.sync_status_resync_create()
+**model:** `TimesheetEntryRequest` + +
+
+ +
+
+ +**is_debug_mode:** `typing.Optional[bool]` — Whether to include debug fields (such as log file links) in the response. + +
+
+ +
+
+ +**run_async:** `typing.Optional[bool]` — Whether or not third-party updates should be run asynchronously. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -38753,8 +38878,7 @@ client.knowledgebase.force_resync.sync_status_resync_create()
-## Knowledgebase Users -
client.knowledgebase.users.list(...) +
client.hris.timesheet_entries.retrieve(...)
@@ -38766,7 +38890,7 @@ client.knowledgebase.force_resync.sync_status_resync_create()
-Returns a list of `User` objects. +Returns a `TimesheetEntry` object with the given `id`.
@@ -38781,33 +38905,16 @@ Returns a list of `User` objects.
```python -import datetime - from merge import Merge client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.users.list( - created_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - created_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", - include_deleted_data=True, +client.hris.timesheet_entries.retrieve( + id="id", include_remote_data=True, include_shell_data=True, - modified_after=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - modified_before=datetime.datetime.fromisoformat( - "2024-01-15 09:30:00+00:00", - ), - page_size=1, - remote_id="remote_id", ) ``` @@ -38824,23 +38931,7 @@ client.knowledgebase.users.list(
-**created_after:** `typing.Optional[dt.datetime]` — If provided, will only return objects created after this datetime. - -
-
- -
-
- -**created_before:** `typing.Optional[dt.datetime]` — If provided, will only return objects created before this datetime. - -
-
- -
-
- -**cursor:** `typing.Optional[str]` — The pagination cursor value. +**id:** `str`
@@ -38848,7 +38939,7 @@ client.knowledgebase.users.list(
-**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/). +**expand:** `typing.Optional[typing.Literal["employee"]]` — Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
@@ -38872,38 +38963,6 @@ client.knowledgebase.users.list(
-**modified_after:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge after this date time will be returned. - -
-
- -
-
- -**modified_before:** `typing.Optional[dt.datetime]` — If provided, only objects synced by Merge before this date time will be returned. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` — Number of results to return per page. The maximum limit is 100. - -
-
- -
-
- -**remote_id:** `typing.Optional[str]` — The API provider's ID for the given object. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -38916,7 +38975,7 @@ client.knowledgebase.users.list(
-
client.knowledgebase.users.retrieve(...) +
client.hris.timesheet_entries.meta_post_retrieve()
@@ -38928,7 +38987,7 @@ client.knowledgebase.users.list(
-Returns a `User` object with the given `id`. +Returns metadata for `TimesheetEntry` POSTs.
@@ -38949,11 +39008,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.users.retrieve( - id="id", - include_remote_data=True, - include_shell_data=True, -) +client.hris.timesheet_entries.meta_post_retrieve() ``` @@ -38969,30 +39024,6 @@ client.knowledgebase.users.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_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -39005,8 +39036,8 @@ client.knowledgebase.users.retrieve(
-## Knowledgebase WebhookReceivers -
client.knowledgebase.webhook_receivers.list() +## Hris WebhookReceivers +
client.hris.webhook_receivers.list()
@@ -39039,7 +39070,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.webhook_receivers.list() +client.hris.webhook_receivers.list() ```
@@ -39067,7 +39098,7 @@ client.knowledgebase.webhook_receivers.list()
-
client.knowledgebase.webhook_receivers.create(...) +
client.hris.webhook_receivers.create(...)
@@ -39100,7 +39131,7 @@ client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) -client.knowledgebase.webhook_receivers.create( +client.hris.webhook_receivers.create( event="event", is_active=True, ) diff --git a/src/merge/client.py b/src/merge/client.py index 4350fe25..202dd6e3 100644 --- a/src/merge/client.py +++ b/src/merge/client.py @@ -92,8 +92,8 @@ def __init__( self._chat: typing.Optional[ChatClient] = None self._crm: typing.Optional[CrmClient] = None self._filestorage: typing.Optional[FilestorageClient] = None - self._hris: typing.Optional[HrisClient] = None self._knowledgebase: typing.Optional[KnowledgebaseClient] = None + self._hris: typing.Optional[HrisClient] = None self._ticketing: typing.Optional[TicketingClient] = None self._accounting: typing.Optional[AccountingClient] = None @@ -129,14 +129,6 @@ def filestorage(self): self._filestorage = FilestorageClient(client_wrapper=self._client_wrapper) return self._filestorage - @property - def hris(self): - if self._hris is None: - from .resources.hris.client import HrisClient # noqa: E402 - - self._hris = HrisClient(client_wrapper=self._client_wrapper) - return self._hris - @property def knowledgebase(self): if self._knowledgebase is None: @@ -145,6 +137,14 @@ def knowledgebase(self): self._knowledgebase = KnowledgebaseClient(client_wrapper=self._client_wrapper) return self._knowledgebase + @property + def hris(self): + if self._hris is None: + from .resources.hris.client import HrisClient # noqa: E402 + + self._hris = HrisClient(client_wrapper=self._client_wrapper) + return self._hris + @property def ticketing(self): if self._ticketing is None: @@ -235,8 +235,8 @@ def __init__( self._chat: typing.Optional[AsyncChatClient] = None self._crm: typing.Optional[AsyncCrmClient] = None self._filestorage: typing.Optional[AsyncFilestorageClient] = None - self._hris: typing.Optional[AsyncHrisClient] = None self._knowledgebase: typing.Optional[AsyncKnowledgebaseClient] = None + self._hris: typing.Optional[AsyncHrisClient] = None self._ticketing: typing.Optional[AsyncTicketingClient] = None self._accounting: typing.Optional[AsyncAccountingClient] = None @@ -272,14 +272,6 @@ def filestorage(self): self._filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper) return self._filestorage - @property - def hris(self): - if self._hris is None: - from .resources.hris.client import AsyncHrisClient # noqa: E402 - - self._hris = AsyncHrisClient(client_wrapper=self._client_wrapper) - return self._hris - @property def knowledgebase(self): if self._knowledgebase is None: @@ -288,6 +280,14 @@ def knowledgebase(self): self._knowledgebase = AsyncKnowledgebaseClient(client_wrapper=self._client_wrapper) return self._knowledgebase + @property + def hris(self): + if self._hris is None: + from .resources.hris.client import AsyncHrisClient # noqa: E402 + + self._hris = AsyncHrisClient(client_wrapper=self._client_wrapper) + return self._hris + @property def ticketing(self): if self._ticketing is None: diff --git a/src/merge/core/client_wrapper.py b/src/merge/core/client_wrapper.py index 8a7cd5e7..b2dbf289 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/2.5.0", + "User-Agent": "MergePythonClient/2.6.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "MergePythonClient", - "X-Fern-SDK-Version": "2.5.0", + "X-Fern-SDK-Version": "2.6.0", **(self.get_custom_headers() or {}), } if self._account_token is not None: diff --git a/src/merge/resources/chat/__init__.py b/src/merge/resources/chat/__init__.py index 97e03713..da7e6d6f 100644 --- a/src/merge/resources/chat/__init__.py +++ b/src/merge/resources/chat/__init__.py @@ -104,6 +104,8 @@ EndUserDetailsRequestLanguage, IssuesListRequestStatus, LinkedAccountsListRequestCategory, + MessagesListRequestOrderBy, + MessagesRepliesListRequestOrderBy, account_details, account_token, async_passthrough, @@ -185,6 +187,8 @@ "LinkedAccountsListRequestCategory": ".resources", "Member": ".types", "Message": ".types", + "MessagesListRequestOrderBy": ".resources", + "MessagesRepliesListRequestOrderBy": ".resources", "MethodEnum": ".types", "ModelOperation": ".types", "ModelPermissionDeserializer": ".types", @@ -324,6 +328,8 @@ def __dir__(): "LinkedAccountsListRequestCategory", "Member", "Message", + "MessagesListRequestOrderBy", + "MessagesRepliesListRequestOrderBy", "MethodEnum", "ModelOperation", "ModelPermissionDeserializer", diff --git a/src/merge/resources/chat/resources/__init__.py b/src/merge/resources/chat/resources/__init__.py index 4b19a9fd..039fd5a3 100644 --- a/src/merge/resources/chat/resources/__init__.py +++ b/src/merge/resources/chat/resources/__init__.py @@ -34,6 +34,7 @@ from .issues import IssuesListRequestStatus from .link_token import EndUserDetailsRequestCompletedAccountInitialScreen, EndUserDetailsRequestLanguage from .linked_accounts import LinkedAccountsListRequestCategory + from .messages import MessagesListRequestOrderBy, MessagesRepliesListRequestOrderBy _dynamic_imports: typing.Dict[str, str] = { "AsyncPassthroughRetrieveResponse": ".async_passthrough", "ConversationsMembersListRequestExpand": ".conversations", @@ -41,6 +42,8 @@ "EndUserDetailsRequestLanguage": ".link_token", "IssuesListRequestStatus": ".issues", "LinkedAccountsListRequestCategory": ".linked_accounts", + "MessagesListRequestOrderBy": ".messages", + "MessagesRepliesListRequestOrderBy": ".messages", "account_details": ".", "account_token": ".", "async_passthrough": ".", @@ -91,6 +94,8 @@ def __dir__(): "EndUserDetailsRequestLanguage", "IssuesListRequestStatus", "LinkedAccountsListRequestCategory", + "MessagesListRequestOrderBy", + "MessagesRepliesListRequestOrderBy", "account_details", "account_token", "async_passthrough", diff --git a/src/merge/resources/chat/resources/messages/__init__.py b/src/merge/resources/chat/resources/messages/__init__.py index 5cde0202..07bbf100 100644 --- a/src/merge/resources/chat/resources/messages/__init__.py +++ b/src/merge/resources/chat/resources/messages/__init__.py @@ -2,3 +2,34 @@ # isort: skip_file +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import MessagesListRequestOrderBy, MessagesRepliesListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "MessagesListRequestOrderBy": ".types", + "MessagesRepliesListRequestOrderBy": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["MessagesListRequestOrderBy", "MessagesRepliesListRequestOrderBy"] diff --git a/src/merge/resources/chat/resources/messages/client.py b/src/merge/resources/chat/resources/messages/client.py index 4b033d56..dbe484c3 100644 --- a/src/merge/resources/chat/resources/messages/client.py +++ b/src/merge/resources/chat/resources/messages/client.py @@ -8,6 +8,8 @@ from ...types.message import Message from ...types.paginated_message_list import PaginatedMessageList from .raw_client import AsyncRawMessagesClient, RawMessagesClient +from .types.messages_list_request_order_by import MessagesListRequestOrderBy +from .types.messages_replies_list_request_order_by import MessagesRepliesListRequestOrderBy class MessagesClient: @@ -36,8 +38,10 @@ def list( include_shell_data: typing.Optional[bool] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, + order_by: typing.Optional[MessagesListRequestOrderBy] = None, page_size: typing.Optional[int] = None, remote_id: typing.Optional[str] = None, + root_message: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedMessageList: """ @@ -69,12 +73,18 @@ def list( modified_before : typing.Optional[dt.datetime] If provided, only objects synced by Merge before this date time will be returned. + order_by : typing.Optional[MessagesListRequestOrderBy] + Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + page_size : typing.Optional[int] Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. + root_message : typing.Optional[str] + If provided as 'true', will only return root messages (messages without a parent message). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -88,6 +98,7 @@ def list( import datetime from merge import Merge + from merge.resources.chat.resources.messages import MessagesListRequestOrderBy client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -110,8 +121,10 @@ def list( modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + order_by=MessagesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, page_size=1, remote_id="remote_id", + root_message="root_message", ) """ _response = self._raw_client.list( @@ -123,8 +136,10 @@ def list( include_shell_data=include_shell_data, modified_after=modified_after, modified_before=modified_before, + order_by=order_by, page_size=page_size, remote_id=remote_id, + root_message=root_message, request_options=request_options, ) return _response.data @@ -188,6 +203,7 @@ def replies_list( include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, include_shell_data: typing.Optional[bool] = None, + order_by: typing.Optional[MessagesRepliesListRequestOrderBy] = None, page_size: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedMessageList: @@ -210,6 +226,9 @@ def replies_list( 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). + order_by : typing.Optional[MessagesRepliesListRequestOrderBy] + Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + page_size : typing.Optional[int] Number of results to return per page. The maximum limit is 100. @@ -224,6 +243,9 @@ def replies_list( Examples -------- from merge import Merge + from merge.resources.chat.resources.messages import ( + MessagesRepliesListRequestOrderBy, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -235,6 +257,7 @@ def replies_list( include_deleted_data=True, include_remote_data=True, include_shell_data=True, + order_by=MessagesRepliesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, page_size=1, ) """ @@ -244,6 +267,7 @@ def replies_list( include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, include_shell_data=include_shell_data, + order_by=order_by, page_size=page_size, request_options=request_options, ) @@ -276,8 +300,10 @@ async def list( include_shell_data: typing.Optional[bool] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, + order_by: typing.Optional[MessagesListRequestOrderBy] = None, page_size: typing.Optional[int] = None, remote_id: typing.Optional[str] = None, + root_message: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedMessageList: """ @@ -309,12 +335,18 @@ async def list( modified_before : typing.Optional[dt.datetime] If provided, only objects synced by Merge before this date time will be returned. + order_by : typing.Optional[MessagesListRequestOrderBy] + Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + page_size : typing.Optional[int] Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. + root_message : typing.Optional[str] + If provided as 'true', will only return root messages (messages without a parent message). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -329,6 +361,7 @@ async def list( import datetime from merge import AsyncMerge + from merge.resources.chat.resources.messages import MessagesListRequestOrderBy client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -354,8 +387,10 @@ async def main() -> None: modified_before=datetime.datetime.fromisoformat( "2024-01-15 09:30:00+00:00", ), + order_by=MessagesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, page_size=1, remote_id="remote_id", + root_message="root_message", ) @@ -370,8 +405,10 @@ async def main() -> None: include_shell_data=include_shell_data, modified_after=modified_after, modified_before=modified_before, + order_by=order_by, page_size=page_size, remote_id=remote_id, + root_message=root_message, request_options=request_options, ) return _response.data @@ -443,6 +480,7 @@ async def replies_list( include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, include_shell_data: typing.Optional[bool] = None, + order_by: typing.Optional[MessagesRepliesListRequestOrderBy] = None, page_size: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedMessageList: @@ -465,6 +503,9 @@ async def replies_list( 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). + order_by : typing.Optional[MessagesRepliesListRequestOrderBy] + Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + page_size : typing.Optional[int] Number of results to return per page. The maximum limit is 100. @@ -481,6 +522,9 @@ async def replies_list( import asyncio from merge import AsyncMerge + from merge.resources.chat.resources.messages import ( + MessagesRepliesListRequestOrderBy, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -495,6 +539,7 @@ async def main() -> None: include_deleted_data=True, include_remote_data=True, include_shell_data=True, + order_by=MessagesRepliesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING, page_size=1, ) @@ -507,6 +552,7 @@ async def main() -> None: include_deleted_data=include_deleted_data, include_remote_data=include_remote_data, include_shell_data=include_shell_data, + order_by=order_by, page_size=page_size, request_options=request_options, ) diff --git a/src/merge/resources/chat/resources/messages/raw_client.py b/src/merge/resources/chat/resources/messages/raw_client.py index 83d745a6..975293e2 100644 --- a/src/merge/resources/chat/resources/messages/raw_client.py +++ b/src/merge/resources/chat/resources/messages/raw_client.py @@ -13,6 +13,8 @@ from .....core.unchecked_base_model import construct_type from ...types.message import Message from ...types.paginated_message_list import PaginatedMessageList +from .types.messages_list_request_order_by import MessagesListRequestOrderBy +from .types.messages_replies_list_request_order_by import MessagesRepliesListRequestOrderBy class RawMessagesClient: @@ -30,8 +32,10 @@ def list( include_shell_data: typing.Optional[bool] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, + order_by: typing.Optional[MessagesListRequestOrderBy] = None, page_size: typing.Optional[int] = None, remote_id: typing.Optional[str] = None, + root_message: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedMessageList]: """ @@ -63,12 +67,18 @@ def list( modified_before : typing.Optional[dt.datetime] If provided, only objects synced by Merge before this date time will be returned. + order_by : typing.Optional[MessagesListRequestOrderBy] + Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + page_size : typing.Optional[int] Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. + root_message : typing.Optional[str] + If provided as 'true', will only return root messages (messages without a parent message). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -89,8 +99,10 @@ def list( "include_shell_data": include_shell_data, "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "order_by": order_by, "page_size": page_size, "remote_id": remote_id, + "root_message": root_message, }, request_options=request_options, ) @@ -170,6 +182,7 @@ def replies_list( include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, include_shell_data: typing.Optional[bool] = None, + order_by: typing.Optional[MessagesRepliesListRequestOrderBy] = None, page_size: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedMessageList]: @@ -192,6 +205,9 @@ def replies_list( 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). + order_by : typing.Optional[MessagesRepliesListRequestOrderBy] + Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + page_size : typing.Optional[int] Number of results to return per page. The maximum limit is 100. @@ -211,6 +227,7 @@ def replies_list( "include_deleted_data": include_deleted_data, "include_remote_data": include_remote_data, "include_shell_data": include_shell_data, + "order_by": order_by, "page_size": page_size, }, request_options=request_options, @@ -246,8 +263,10 @@ async def list( include_shell_data: typing.Optional[bool] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, + order_by: typing.Optional[MessagesListRequestOrderBy] = None, page_size: typing.Optional[int] = None, remote_id: typing.Optional[str] = None, + root_message: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedMessageList]: """ @@ -279,12 +298,18 @@ async def list( modified_before : typing.Optional[dt.datetime] If provided, only objects synced by Merge before this date time will be returned. + order_by : typing.Optional[MessagesListRequestOrderBy] + Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + page_size : typing.Optional[int] Number of results to return per page. The maximum limit is 100. remote_id : typing.Optional[str] The API provider's ID for the given object. + root_message : typing.Optional[str] + If provided as 'true', will only return root messages (messages without a parent message). + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -305,8 +330,10 @@ async def list( "include_shell_data": include_shell_data, "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "order_by": order_by, "page_size": page_size, "remote_id": remote_id, + "root_message": root_message, }, request_options=request_options, ) @@ -386,6 +413,7 @@ async def replies_list( include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, include_shell_data: typing.Optional[bool] = None, + order_by: typing.Optional[MessagesRepliesListRequestOrderBy] = None, page_size: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedMessageList]: @@ -408,6 +436,9 @@ async def replies_list( 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). + order_by : typing.Optional[MessagesRepliesListRequestOrderBy] + Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. + page_size : typing.Optional[int] Number of results to return per page. The maximum limit is 100. @@ -427,6 +458,7 @@ async def replies_list( "include_deleted_data": include_deleted_data, "include_remote_data": include_remote_data, "include_shell_data": include_shell_data, + "order_by": order_by, "page_size": page_size, }, request_options=request_options, diff --git a/src/merge/resources/chat/resources/messages/types/__init__.py b/src/merge/resources/chat/resources/messages/types/__init__.py new file mode 100644 index 00000000..fac1eeff --- /dev/null +++ b/src/merge/resources/chat/resources/messages/types/__init__.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .messages_list_request_order_by import MessagesListRequestOrderBy + from .messages_replies_list_request_order_by import MessagesRepliesListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "MessagesListRequestOrderBy": ".messages_list_request_order_by", + "MessagesRepliesListRequestOrderBy": ".messages_replies_list_request_order_by", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["MessagesListRequestOrderBy", "MessagesRepliesListRequestOrderBy"] diff --git a/src/merge/resources/chat/resources/messages/types/messages_list_request_order_by.py b/src/merge/resources/chat/resources/messages/types/messages_list_request_order_by.py new file mode 100644 index 00000000..f10d0646 --- /dev/null +++ b/src/merge/resources/chat/resources/messages/types/messages_list_request_order_by.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class MessagesListRequestOrderBy(str, enum.Enum): + REMOTE_CREATED_AT_DESCENDING = "-remote_created_at" + REMOTE_CREATED_AT_ASCENDING = "remote_created_at" + + def visit( + self, + remote_created_at_descending: typing.Callable[[], T_Result], + remote_created_at_ascending: typing.Callable[[], T_Result], + ) -> T_Result: + if self is MessagesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING: + return remote_created_at_descending() + if self is MessagesListRequestOrderBy.REMOTE_CREATED_AT_ASCENDING: + return remote_created_at_ascending() diff --git a/src/merge/resources/chat/resources/messages/types/messages_replies_list_request_order_by.py b/src/merge/resources/chat/resources/messages/types/messages_replies_list_request_order_by.py new file mode 100644 index 00000000..6b8df524 --- /dev/null +++ b/src/merge/resources/chat/resources/messages/types/messages_replies_list_request_order_by.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class MessagesRepliesListRequestOrderBy(str, enum.Enum): + REMOTE_CREATED_AT_DESCENDING = "-remote_created_at" + REMOTE_CREATED_AT_ASCENDING = "remote_created_at" + + def visit( + self, + remote_created_at_descending: typing.Callable[[], T_Result], + remote_created_at_ascending: typing.Callable[[], T_Result], + ) -> T_Result: + if self is MessagesRepliesListRequestOrderBy.REMOTE_CREATED_AT_DESCENDING: + return remote_created_at_descending() + if self is MessagesRepliesListRequestOrderBy.REMOTE_CREATED_AT_ASCENDING: + return remote_created_at_ascending() diff --git a/src/merge/resources/chat/types/conversation.py b/src/merge/resources/chat/types/conversation.py index def862bc..402823ad 100644 --- a/src/merge/resources/chat/types/conversation.py +++ b/src/merge/resources/chat/types/conversation.py @@ -62,6 +62,16 @@ class Conversation(UncheckedBaseModel): """ members: typing.Optional[typing.List[typing.Optional[str]]] = None + remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's conversation was created. + """ + + remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's conversation was updated. + """ + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) """ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). diff --git a/src/merge/resources/chat/types/group.py b/src/merge/resources/chat/types/group.py index 79f31c25..ee2ecc66 100644 --- a/src/merge/resources/chat/types/group.py +++ b/src/merge/resources/chat/types/group.py @@ -39,6 +39,16 @@ class Group(UncheckedBaseModel): The name of the Group """ + remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's group was created. + """ + + remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's group was updated. + """ + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) """ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). diff --git a/src/merge/resources/chat/types/member.py b/src/merge/resources/chat/types/member.py index d7acb701..40bea7ed 100644 --- a/src/merge/resources/chat/types/member.py +++ b/src/merge/resources/chat/types/member.py @@ -45,6 +45,16 @@ class Member(UncheckedBaseModel): The group that is a member of the conversation. Only populated if the member is a group. """ + remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's conversation was created. + """ + + remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's conversation was updated. + """ + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) """ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). diff --git a/src/merge/resources/chat/types/message.py b/src/merge/resources/chat/types/message.py index 71b0da11..8e5d6fb8 100644 --- a/src/merge/resources/chat/types/message.py +++ b/src/merge/resources/chat/types/message.py @@ -63,6 +63,16 @@ class Message(UncheckedBaseModel): The url of the message. """ + remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's conversation was created. + """ + + remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's conversation was updated. + """ + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) """ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). diff --git a/src/merge/resources/chat/types/user.py b/src/merge/resources/chat/types/user.py index 3f01ca47..28eb5802 100644 --- a/src/merge/resources/chat/types/user.py +++ b/src/merge/resources/chat/types/user.py @@ -66,6 +66,16 @@ class User(UncheckedBaseModel): The user's avatar image """ + remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's user was created. + """ + + remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + """ + When the third party's user was updated. + """ + remote_was_deleted: typing.Optional[bool] = pydantic.Field(default=None) """ Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). diff --git a/tests/integration/test_filestorage.py b/tests/integration/test_filestorage.py deleted file mode 100644 index 4acaa081..00000000 --- a/tests/integration/test_filestorage.py +++ /dev/null @@ -1,125 +0,0 @@ -import os -import pytest -from merge import Merge -from merge.resources.filestorage.types.permission import Permission - - -@pytest.fixture -def client(): - account_token = os.environ["SDK_TESTING_FILE_STORAGE_ACCOUNT_TOKEN"] - api_key = os.environ["SDK_TESTING_KEY"] - - return Merge( - account_token=account_token, - api_key=api_key, - ) - -def test_files_list(client): - response = client.filestorage.files.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - - -def test_files_list_permissions(client): - - response = client.filestorage.files.list(page_size=1) - assert response.results - file = response.results[0] - first_permission = file.permissions[0] - - assert isinstance(first_permission, Permission), type(first_permission) - -def test_files_retrieve(client): - files_response = client.filestorage.files.list(page_size=1) - - assert files_response.results, "No files available to test retrieve" - - file_id = files_response.results[0].id - file = client.filestorage.files.retrieve(id=file_id) - - assert file is not None - assert file.id == file_id - -def test_sync_status_list(client): - response = client.filestorage.sync_status.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_account_details_retrieve(client): - account_details = client.filestorage.account_details.retrieve() - assert account_details is not None - assert hasattr(account_details, 'id') - -def test_drives_list(client): - response = client.filestorage.drives.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_drives_retrieve(client): - drives_response = client.filestorage.drives.list(page_size=1) - - assert drives_response.results, "No drives available to test retrieve" - drive_id = drives_response.results[0].id - drive = client.filestorage.drives.retrieve(id=drive_id) - assert drive is not None - assert drive.id == drive_id - -def test_folders_list(client): - response = client.filestorage.folders.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_users_list(client): - response = client.filestorage.users.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_users_retrieve(client): - users_response = client.filestorage.users.list(page_size=1) - - assert users_response.results, "No users available to test retrieve" - - user_id = users_response.results[0].id - user = client.filestorage.users.retrieve(id=user_id) - - assert user is not None - assert user.id == user_id - -def test_groups_list(client): - response = client.filestorage.groups.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_audit_trail_list(client): - response = client.filestorage.audit_trail.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_available_actions_retrieve(client): - available_actions = client.filestorage.available_actions.retrieve() - - assert available_actions is not None - -def test_linked_accounts_list(client): - response = client.filestorage.linked_accounts.list() - - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_scopes_default_scopes_retrieve(client): - response = client.filestorage.scopes.default_scopes_retrieve() - - assert response is not None - -def test_scopes_linked_account_scopes_retrieve(client): - response = client.filestorage.scopes.linked_account_scopes_retrieve() - - assert response is not None \ No newline at end of file diff --git a/tests/integration/test_knowledgebase.py b/tests/integration/test_knowledgebase.py deleted file mode 100644 index 0b76c980..00000000 --- a/tests/integration/test_knowledgebase.py +++ /dev/null @@ -1,177 +0,0 @@ -import os -import pytest -from merge import Merge -from merge.resources.knowledgebase.resources.articles.types.articles_list_request_expand import ArticlesListRequestExpand -from merge.resources.knowledgebase.resources.articles.types.articles_retrieve_request_expand import ArticlesRetrieveRequestExpand -from merge.resources.knowledgebase.resources.containers.types.containers_list_request_expand import ContainersListRequestExpand -from merge.resources.knowledgebase.resources.containers.types.containers_retrieve_request_expand import ContainersRetrieveRequestExpand -from merge.resources.knowledgebase.resources.groups.types.groups_list_request_expand import GroupsListRequestExpand -from merge.resources.knowledgebase.resources.groups.types.groups_retrieve_request_expand import GroupsRetrieveRequestExpand - - -@pytest.fixture -def client(): - account_token = os.environ["SDK_TESTING_KNOWLEDGEBASE_ACCOUNT_TOKEN"] - api_key = os.environ["SDK_TESTING_KEY"] - - return Merge( - account_token=account_token, - api_key=api_key, - ) - -def test_articles_list(client): - response = client.knowledgebase.articles.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_articles_list_with_expand_author(client): - response = client.knowledgebase.articles.list(expand=ArticlesListRequestExpand.AUTHOR) - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_articles_list_with_expand_attachments(client): - response = client.knowledgebase.articles.list(expand=ArticlesListRequestExpand.ATTACHMENTS) - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_articles_list_with_expand_permissions(client): - response = client.knowledgebase.articles.list(expand=ArticlesListRequestExpand.PERMISSIONS) - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_attachments_list(client): - response = client.knowledgebase.attachments.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_attachments_retrieve(client): - attachments_response = client.knowledgebase.attachments.list(page_size=1) - - if attachments_response.results: - attachment_id = attachments_response.results[0].id - attachment = client.knowledgebase.attachments.retrieve(id=attachment_id) - assert attachment is not None - assert attachment.id == attachment_id - -def test_containers_list(client): - response = client.knowledgebase.containers.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_containers_retrieve(client): - containers_response = client.knowledgebase.containers.list(page_size=1) - - if containers_response.results: - container_id = containers_response.results[0].id - container = client.knowledgebase.containers.retrieve(id=container_id) - assert container is not None - assert container.id == container_id - -def test_containers_list_with_expand_permissions(client): - response = client.knowledgebase.containers.list(expand=ContainersListRequestExpand.PERMISSIONS) - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_containers_list_with_expand_parent_container(client): - response = client.knowledgebase.containers.list(expand=ContainersListRequestExpand.PARENT_CONTAINER) - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_containers_retrieve_with_expand_permissions(client): - containers_response = client.knowledgebase.containers.list(page_size=1) - - if containers_response.results: - container_id = containers_response.results[0].id - container = client.knowledgebase.containers.retrieve(id=container_id, expand=ContainersRetrieveRequestExpand.PERMISSIONS) - assert container is not None - assert container.id == container_id - -def test_containers_retrieve_with_expand_parent_container(client): - containers_response = client.knowledgebase.containers.list(page_size=1) - - if containers_response.results: - container_id = containers_response.results[0].id - container = client.knowledgebase.containers.retrieve(id=container_id, expand=ContainersRetrieveRequestExpand.PARENT_CONTAINER) - assert container is not None - assert container.id == container_id - -def test_sync_status_list(client): - response = client.knowledgebase.sync_status.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_account_details_retrieve(client): - account_details = client.knowledgebase.account_details.retrieve() - assert account_details is not None - assert hasattr(account_details, 'id') - -def test_users_list(client): - response = client.knowledgebase.users.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_users_retrieve(client): - users_response = client.knowledgebase.users.list(page_size=1) - - if users_response.results: - user_id = users_response.results[0].id - user = client.knowledgebase.users.retrieve(id=user_id) - - assert user is not None - assert user.id == user_id - -def test_groups_list(client): - response = client.knowledgebase.groups.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_groups_list_with_expand_users(client): - response = client.knowledgebase.groups.list(expand=GroupsListRequestExpand.USERS) - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_groups_list_with_expand_parent_group(client): - response = client.knowledgebase.groups.list(expand=GroupsListRequestExpand.PARENT_GROUP) - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_audit_trail_list(client): - response = client.knowledgebase.audit_trail.list() - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_available_actions_retrieve(client): - available_actions = client.knowledgebase.available_actions.retrieve() - - assert available_actions is not None - -def test_linked_accounts_list(client): - response = client.knowledgebase.linked_accounts.list() - - assert response is not None - assert hasattr(response, 'results') - assert isinstance(response.results, list) - -def test_scopes_default_scopes_retrieve(client): - response = client.knowledgebase.scopes.default_scopes_retrieve() - - assert response is not None - -def test_scopes_linked_account_scopes_retrieve(client): - response = client.knowledgebase.scopes.linked_account_scopes_retrieve() - - assert response is not None